I've got an addin that I developed and used with earlier versions of Visual Studio, and I've managed to develop an interface between it and a VS Package for VS 2015. From my "Command" class, I have a callback function that wraps a call to the corresponding function within the library (.dll) for the addin. There is another facilitating library (.dll) for the addin.
Everything seems to work well enough within the experimental instance, and now I'm trying to create a package for installation and distribution.
This is for Visual Studio 2015 Community Edition running on Windows 10.
When I double-clicked the .vsix file, I got the following warning:
This extension does not contain a digital signature.
This extension did not specify license terms in its manifest that are readable by VSIX Installer.
I loaded it anyway.
When I invoked one of my functions, I got the following error message:
The 'Commands_01Package' package did not load correctly.
The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file "C:\Users\ ... \14.0\ActivityLog.xml".
Restarting Visual Studio could help resolve this issue.
These are the entries at the bottom of "C:\Users\ ... \14.0\ActivityLog.xml":
<entry>
<record>437</record>
<time>2016/04/20 04:38:41.710</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Entering function CVsPackageInfo::HrInstantiatePackage</description>
<guid>{A683C1FD-D1DC-4790-9A79-EF3A06CA0FEB}</guid>
</entry>
<entry>
<record>438</record>
<time>2016/04/20 04:38:41.711</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [Command_01Package]</description>
<guid>{A683C1FD-D1DC-4790-9A79-EF3A06CA0FEB}</guid>
</entry>
<entry>
<record>439</record>
<time>2016/04/20 04:38:44.626</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Entering function CVsPackageInfo::HrInstantiatePackage</description>
<guid>{30D5B2E6-64BF-422F-A2BF-5D5B4D66548F}</guid>
</entry>
<entry>
<record>440</record>
<time>2016/04/20 04:38:44.626</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [Settings Store Synchronization Delayed Init Package]</description>
<guid>{30D5B2E6-64BF-422F-A2BF-5D5B4D66548F}</guid>
</entry>
<entry>
<record>441</record>
<time>2016/04/20 04:38:44.626</time>
<type>Information</type>
<source>VisualStudio</source>
<description>End package load [Settings Store Synchronization Delayed Init Package]</description>
<guid>{30D5B2E6-64BF-422F-A2BF-5D5B4D66548F}</guid>
</entry>
<entry>
<record>442</record>
<time>2016/04/20 04:38:45.926</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [Command_01Package][The type initializer for
'Wilson_Addin_01.Main_Module' threw an exception.]:
{ at Wilson_VSIX_01.Command_01.Initialize(Package package)
in I:\Visual Studio\VS_Packages\Wilson_VS_Pkg_01\Wilson_VSIX_01\Wilson_VSIX_01\Command_01.cs:line 116

at Wilson_VSIX_01.Command_01Package.Initialize()
in I:\Visual Studio\VS_Packages\Wilson_VS_Pkg_01\Wilson_VSIX_01\Wilson_VSIX_01\Command_01Package.cs:line
69

at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite
(IServiceProvider sp)}[Could not load type 'MacroXMLLib01.VS_XML_Lib_01_NS.cls_path_verification'
from assembly 'MacroXMLLib01, Version=1.0.0.0, Culture=neutral, PublicKeyToken=21ecbe15a2364220'.]:
{ at Wilson_Addin_01.XML_ctrl_module.VS_Link_XML_class..ctor(String& p_XML_path, String&
p_XML_file)

at Wilson_Addin_01.Main_Module..cctor()}</description>
<guid>{A683C1FD-D1DC-4790-9A79-EF3A06CA0FEB}</guid>
<hr>80131534</hr>
<errorinfo></errorinfo>
</entry>
<entry>
<record>443</record>
<time>2016/04/20 04:38:47.141</time>
<type>Error</type>
<source>VisualStudio</source>
<description>End package load [Command_01Package]</description>
<guid>{A683C1FD-D1DC-4790-9A79-EF3A06CA0FEB}</guid>
<hr>80131534</hr>
<errorinfo></errorinfo>
</entry>
</activity>
I know next to nothing about VS Packages. I wouldn't be bothering with this at all if Microsoft hadn't dropped support for addins, and it seems ridiculous that I have to put in the time and effort to get this working in order to retain the functionality that I had with older versions of VS.
Excuse me if this seems like a stupid question, but does the lack of a digital signature have anything to do with the "SetSite failed for package"?
If so, then what do I need to do to get a digital signature?
Any assistance with this would be most appreciated.
C:\Users\%username%\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache
Check the C:\Users\%username%\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml
I my case there was an entry like
<entry>
<record>476</record>
<time>2017/01/25 05:57:06.105</time>
<type>Error</type>
<source>VisualStudio</source>
<description>LegacySitePackage failed for package [VSPackage]Source: 'Microsoft.VisualStudio.ApplicationInsights' Description: Could not load type 'Microsoft.VisualStudio.ApplicationInsights.Interfaces.IApplicationInsightsSearchService' from assembly 'Microsoft.VisualStudio.ApplicationInsights.Interfaces, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
System.TypeLoadException: Could not load type 'Microsoft.VisualStudio.ApplicationInsights.Interfaces.IApplicationInsightsSearchService' from assembly 'Microsoft.VisualStudio.ApplicationInsights.Interfaces, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
 at Microsoft.AppInsights.GettingStarted.VSPackage.Initialize()
 at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)</description>
<guid>{1A4EFADE-F6B2-4490-A2EF-21D5F3D1C8E0}</guid>
<hr>80131522</hr>
<errorinfo></errorinfo>
</entry>
After checking for the 'insights' word in the search bar under the 'Tools -> Extensions and Updates' among the 'Installed' plugins, it showed me the plugin 'Developer Analytics Tools'. Removed this plugin and the problem went away.
I had similar issue with a third party package.
After following their online steps about deleting from '\Common7\IDE\Extensions' I still received the error.
They told me as a final step to open a vs command prompt and run:
devenv /UpdateConfiguration
And the error has gone away.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With