2

I've been developing a small Visual Studio extension (purely for in-house use) and it consists of the VSIX project itself, which then references another dll (in the same solution) that then references some other project (also in the same solution). This all works fine when I debug the extension and run it in the experimental instance of Visual Studio. However, if I try to install the VSIX in Visual Studio for real (by double clicking the .vsix file) It does not work. There is one command that doesn't reference anything from the other assemblies that works fine and then there is another command that does that just fails silently.

Looking at the installation under C:\Users\matt.burland\AppData\Local\Microsoft\VisualStudio\14.0Exp\Extensions and C:\Users\matt.burland\AppData\Local\Microsoft\VisualStudio\14.0\Extensions I can see the difference is that the other dependencies where not installed by the VSIX.

I saw this question for VS2010: VSIX package doesn't include localized resources of referenced assembly

But the solution there doesn't seem to be relevant. I don't see an Output Groups Included in VSIX property to set.

I tried looking at source.extension.vsixmanifest and it has a tab for dependencies. I selected New, Selected A project in current solution as source, selected one of my projects, selected Embed in this VSIX, but when I click Ok I get an error message:

VSIX Manifest Editor

No Extenders could be found for the name 'VsixProjectReferenceContentItemObjectExtender' under the CATID {2F0FA3B8-C855-4a4e-95A5-CB45C67D6C27}. Make sure that the extender provider for this Extender is correctly registered.

Community
  • 1
  • 1
Matt Burland
  • 44,552
  • 18
  • 99
  • 171

1 Answers1

0

I realized I should be looking at assets rather than dependencies, but I was unable to add as an asset using the manifest editor either with a similar error. So I created an entirely new, empty VSIX project in a new solution, added an empty class library, referenced it in the VSIX project and then looked at the manifest editor. For whatever reason, I was able to add the assembly without any problem.

Then looking at the .vsixmanifest file in the XML editor, I could figure out the correct syntax to reference an assembly and copy it to my real project. For the record (because the documentation on the .vsixmanifest isn't at all informative here), it looks like this:

<Asset Type="Microsoft.VisualStudio.Assembly" d:Source="Project" d:ProjectName="MyProject" 
       Path="|MyProject|" AssemblyName="|MyProject;AssemblyName|" />

Where MyProject is the name of the dependent class library in your solution that needs to be included in the VSIX.

Matt Burland
  • 44,552
  • 18
  • 99
  • 171