Visual Studio Extension (VSPackage) runs in all Experimental Instances, but does not run after being installed as a .vsix, except in VS2010

StackOverflow https://stackoverflow.com/questions/23586219

I am writing a Visual Studio extension which targets VS2010, VS2012, and VS2013. It runs and is initialized successfully in each Experimental Instance with no issues. When I install the VSIX generated by the build, it installs in all versions without a problem, but only in VS2010 does it actually execute. In the others it's never instantiated or initialized.

There are no exceptions being thrown. Running the non-Experimental instance with the /log flag does not produce any other diagnostic information (other than confirming it is installed, and has a newer version than its counterpart already in the gallery.)

My reading and experiences suggest that this is due to some sort of missing assembly or reference, but I can't confirm that. I am also at a loss as how one would figure out what's missing, especially without an exception or log message.

I've been at this for several days now trying things like signing my assemblies, various vsixmanifest changes, changing the required framework versions, and many other things found here on SO that have not been fruitful.

Additionally, I have tried installing the old, already published version from the VS Gallery, and it also does not run. However, I have received feedback (bugs and thanks) from several individuals, so I know it works for some people. I have not received any feedback stating that "nothing happens," but do not rule out the fact that those are unreported.

I don't intend to plug, but the currently published version is here: http://visualstudiogallery.msdn.microsoft.com/5cc44f63-4ea8-4c17-8aa4-95037a2d32ef

The entire source for where I currently stand can be found on github in branch "ForStackOverflow". The difference between that and master is a TraceAppender which I used to confirm that the VSPackage was not being instantiated. https://github.com/alexcpendleton/Pendletron.Vsix.LocateInTFS/tree/ForStackOverflow

Any suggestions, experiences, or anything would be helpful. Thank you.

有帮助吗?

解决方案

Thanks to Erti-Chris Eelmaa's suggestion to enable FusionLog I was able to figure out what was going on.

Visual Studio was not looking for my extension in the installed extension's directory, rather from the GAC and elsewhere. Curiously, it was finding an included assembly just fine.

I examined the .vsixmanifest of other extensions and discovered that mine was missing a .pkgdef Content node for my project. It would seem VS2010 accounts for this, or for some other reason happened to look in the extension's installation directory for the package assembly, where 2012 and 2013 did not. Adding this content node to my .vsixmanifest allowed Visual Studio to load and run the extension.

<Content>
  <VsPackage>Pendletron.Vsix.LocateInTFS.pkgdef</VsPackage>
</Content>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top