Q:

How can I use Visual studio 2015 to debug an extension for visual studio 15?

I have an extension developed for Visual Studio 2015 that I'd like to start testing for Visual Studio 15.
To try and do this I set the project to launch C:\Program Files (x86)\Microsoft Visual Studio\VS15Preview\Common7\IDE\devenv.exe instead of C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe, keeping the command line arguments set as /rootsuffix Exp. I also set an appropriate install target in the manifest:
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[14.0,15.0)" />
<InstallationTarget Version="[14.0,15.0)" Id="Microsoft.VisualStudio.Pro" />
<InstallationTarget Version="[14.0,15.0)" Id="Microsoft.VisualStudio.Enterprise" />
<InstallationTarget Version="15.0" Id="Microsoft.VisualStudio.Enterprise" />
<InstallationTarget Version="15.0" Id="Microsoft.VisualStudio.Pro" />
<InstallationTarget Version="15.0" Id="Microsoft.VisualStudio.Community" />

(I've tried installation targets of [14.0,16.0) too).
When I debug the project the experimental instance of VS 15 launches ok, however it doesn't have the extension installed.
Is it possible to use Visual studio 2015 to debug an extension for visual studio 15 and if so, how?

A:

What was happening is that the extension was still getting installed to the VS2015 experimental instance. This is because of these lines in the proj file:
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
...
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />

Because I was running VS2015 the path to the targets file resolved to the VS2015 one. It's that which defines how the VSIX gets installed to the experimental instance.
I tried changing the reference to the newer VSSDK targets file, however that caused all sorts of errors that I didn't want to wade through.
To test the extension I debugged it (making it install on VS2015 experimental), found the installed extension in the file structure (VS14Exp), copied that to the VS15 folder, debugged again, launching VS15 devenv. experimental instance. At that point breakpoints were being hit etc since it loaded the extension from the folder.

