Search code examples
visual-studiovisual-studio-extensionsvsixvsxvisual-studio-sdk

How to debug VSIX extension in VS which is of other version then version of VS SDK being used


I have a solution with my Visual Studio extension. This extension should work in any VS version since VS2010. That's because I use VS 2010 SDK. I made hacks to bind my projects to VS2010 SDK assemblies and targets to work without SDK installed - thanks to this detailed guide by Aaron Marten. I can successfully build vsix of my extension and install it in any VS. Nice.

But I also want to debug my extension with F5. I want to do it not in VS2010 but in some other VS - VS 2015 in my case. I even have VS 2015 SDK installed. But it doesn't work obviously. As targets from VS2010 SDK supposed to deploy extension being built into VS2010 experimental instance.

So the question is:
how to setup project to debug a vsix extension in VS2015 with F5 if the extension itself uses VS2010 SDK?

Probably I need to use some targets/tasks from VS2015 SDK but which ones and how?


Solution

  • Step by step description of how to achieve this is available in the Commit history here: https://github.com/jaredpar/RoundTripVSIX/commits/master (I used it successfully in my VS extension "SQL Server Compact Toolbox")