Thus, Visual Studio link assemblies are broken down into several different categories, which you must handle differently depending on the category:
- Interlocked assemblies: - these are the ones you collected in your question. Each interop assembly is not a newer version of the same, but rather an assembly that contains all the COM interfaces that have been added to this version of Visual Studio. The link to the old versions is fine, just donβt link to a newer version than the lowest version of Visual Studio that you want to target.
- Editors assemblies, Roslyn: Everything related to the main text editor (assemblies are Microsoft.VisualStudio.Text.Data, Microsoft.VisualStudio.Text.UI, Microsoft.VisualStudio.Text.UI.Wpf, and Microsoft.VisualStudio.Editor) , and Roslyn Visual Studio includes assembly redirects that redirect any version you link to to the VS version that you are actually running on. Re-specify the lowest version that you intend to support.
- Microsoft.VisualStudio.Shell. [version]: it confuses people a lot. How this particular assembly works for each version of Visual Studio that comes with it, a new assembly name is created (with the version in the assembly). Then, in future versions of Visual Studio, we send a new version of the assembly that you are aiming for. So again, make sure you target Microsoft.VisualStudio.Shell. [Version] with the lowest version that you are going to support.
The difficult problem here is that the VSSDK project updates projects to upgrade your projects to newer versions. Start editing your MSBuild files manually to make sure that it does not, or lower what it already did. For the final VSIX, you send to users, who are often better, either build with an older version of VS to ensure that it will not collect new things by accident. If you want to use only the newer version, you will need to find the VS binaries from the older version that you want to use and check them in your version control system to make sure that the old versions are still compiled. Try your VSIX if you are following this route, as it is easy to make a mistake and accidentally refer to something new.
source share