Skip to content

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:

  1. Convert the project to .NET 6:
    1. In the Project file/ Project element remove all attributes and add Sdk="Microsoft.Net.Sdk"
    2. Remove all file includes, since file inclusion is now implicit.
    3. Remove AssemblyInfo.cs or disable AssemblyInfo generation.
    4. Add property: net6.0
    5. All other properties can be removed. Property groups for configurations can be removed since the default values are good enough.
    6. Remove all project Import elements in the csproj.
    7. Remove packages.config.
  2. 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.
  3. Fix errors caused by API changes (currently there isn't documentation about this)

Example

You can see an example migration of an extension in the sample ShowInGithub extension: https://github.com/slluis/ShowInGithub/commit/a009a27806d648ecd436f505cba66b587a4e3d54

Clone this wiki locally