Problem I have a static (extension method) that is referenced in my VSIX project. When I compile the VSIX project, I can see the dll in the bin/debug folder along with the VSIX dll (Same folder).
In addition, intellisense has no problems with this nor does the compile! When I run the VSIX project in debug mode. I see this error:
"Method not found: "System.String MethodName(System.String)" which is the extension method in another assembly (in the bin/debug folder).
I've read other posts like these:
Can't find VSIX dlls with DllImport
Include external .dll in Visual Studio Extension
Both solutions don't look right to me, after all, the dll is in the proper folder, it finds its own code, but not the other assembly.... The references and using statements and intellisense work!
This tells me that it's a loader issue, somehow VSIX projects are failing to load other referenced assemblies or maybe it's by design.
I've tried loading them as Assets but they are not "other" VSIX projects so all of the asset options are out.
Notice however that these asset types are all prefixed with Microsoft.VisualStudio. I've tried Microsoft.VisualStudio.Assembly and they do not work, in fact it screws up the manifest attempting to do that.
Another oddity, I did include a reference to yet another assembly that comes in as an EXE. All of those methods work fine. It's just the dlls that are not getting loaded. For these, I cannot use a USING statement rather, I have to use the fully qualifed NameSpace name to get it to work... But if I try the same trick on the DLLs it doesn't work.
One post suggested adding the assemblies manually to the manifest file... but that post was in 2010.
This doesn't work either:
To include satellite DLLs from referenced assemblies in the VSIX package, add SatelliteDllsProjectOutputGroup to the Output Groups Included in VSIX property.
What am I missing?
The root cause of this problem is that by default VSIX want's everything to be Strong Named. I had unchecked that option due to 3rd party DLLs which were not signed. I was able to get the source and "Strong Name" them.
I then strong named the VSIX project and everything worked.
Go to properties page of the project:
I began looking into tools like this, which can strong name DLLs when the source code is unobtainable.