-
Notifications
You must be signed in to change notification settings - Fork 26
Migrating AddInMaker projects to support Visual Studio 2022 for Mac v17.x
Jordan Matthiesen edited this page Mar 30, 2022
·
1 revision
Currently Visual Studio 2022 for Mac doesn't officially support new extensions, but continues to support a few pre-existing extensions from Visual Studio 2019 for Mac. For any extensions that previously used AddinMaker, there are some manual steps you need to follow to add support for Visual Studio 2022 for Mac, which includes migrating your extension to run on .NET 6:
- Convert the project to .NET 6:
- In the Project file/ Project element remove all attributes and add Sdk="Microsoft.Net.Sdk"
- Remove all file includes, since file inclusion is now implicit.
- Remove AssemblyInfo.cs or disable AssemblyInfo generation.
- Add property: net6.0
- All other properties can be removed. Property groups for configurations can be removed since the default values are good enough.
- Remove all project Import elements in the csproj.
- Remove packages.config.
- Add the package Microsoft.VisualStudioMac.Sdk. It’s a preview package, so the “Include prereleases” option needs to be set in the NuGet manager. Pick the latest version available.
- Fix errors caused by API changes (currently there isn't documentation about this)
You can see an example migration of an extension in the sample ShowInGithub extension: https://github.com/slluis/ShowInGithub/commit/a009a27806d648ecd436f505cba66b587a4e3d54