3

I've been writing an extension (Editor Classifier project, with some other features chipped in. It works fine on VS2013, but I need to support other versions VS2012 and VS2015(when it is out of Preview).

When I just add supported versions in the vsixmanifest, the problem that I'm facing is, the export of ITestContainerDiscoverer or IClassificationTypeRegistryService fails complaining

ContractName="Microsoft.VisualStudio.Text.Classification.IClassificationTypeRegistryService")' is not assignable to type 'Microsoft.VisualStudio.Text.Classification.IClassificationTypeRegistryService'

My guess is that this is because I am referencing invalid SDK versions. I could always write different versions, but is there a way to share an extension across versions of visual studio?

Srikanth Venugopalan
  • 9,011
  • 3
  • 36
  • 76
  • Have you tried to Reference the lowest version... – ErikEJ Dec 11 '14 at 10:53
  • See if this helps: How to create a Visual Studio extensibility project that is compatible with VS 2010, 2012 and 2013 http://blogs.clariusconsulting.net/kzu/how-to-create-a-visual-studio-extensibility-project-that-is-compatible-with-vs-2010-2012-and-2013/ – Carlos Quintero Dec 11 '14 at 14:29
  • @ErikEJ - thanks for the tip, it seems to work except for my `TestAdapters`. Need to dig in a bit more. @Carlos - that blog focuses more on upgrading a project seamlessly across versions, while I need to generate binaries that works across versions. – Srikanth Venugopalan Dec 11 '14 at 14:34

1 Answers1

1

@ErikEJ's tip worked for me. I had to port the extension project to VS2012 and build it with target set to [11.0,12.0] and this ensured that the VSIX that I generated worked for both VS2012 and VS2013. No errors too!

Srikanth Venugopalan
  • 9,011
  • 3
  • 36
  • 76