-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The add-in fails to load in VS 2015 #169
Comments
I just reinstalled windows (was on 8.1, now on 10) and VS 2015, downloaded your addon, and had that issue too! CreateInstance failed for package [CPPCheckPluginPackage]Source: 'mscorlib' Description: Could not load file or assembly 'Microsoft.VisualStudio.Shell.15.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Shell.15.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.VisualStudio.Shell.15.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type) at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) at System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo) at System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName) WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. |
So, the plugin currently depends on Shell 15.0 which is the VS 2017 version. For compatibility with VS 2015, Shell 14.0 reference should be added. But then I'm getting numerous errors of the following kind:
|
I created pull request #177 to resolve this issue. The latest appveyor build is here: https://ci.appveyor.com/project/icnocop/cppcheck-vs-addin/build/1.3.5 Notice that there are separate vsix artifacts for Visual Studio 2015 and Visual Studio 2017 because of the different references to "Microsoft.VisualStudio.Shell". Thank you. |
@icnocop |
VSIX files can support multiple versions of Visual Studio. I think it would need to be configured in the vsixmanifest file if it's not already configured. I personally don't have a lot of experience with vsixmanifest files. The problem here is the dependency on I'm thinking we can try to either decouple that dependency, or maybe include those assemblies within the VSIX (if the license permits for example), then we may not need to build two versions of the VSIX. |
Here's a good reference: It seems that instead of referencing https://stackoverflow.com/a/37880406/90287 indicates we can use the NuGet Package I'll have to test it out. :) |
I tested CppcheckPlugin.vsix from https://ci.appveyor.com/project/VioletGiraffe/cppcheck-vs-addin/build/1.3.8/artifacts in Visual Studio 2015 Update 3 on Windows 10 64-bit and it works without issues. :) |
Hi, I'm facing this error with VS2015, is there any way to overcome it? |
Try the VSIX linked above. |
Yes, thanks I tried that one and it worked! Anyway thou I'm wondering why it's not included as a Project Relase, the latest relase there is 1.3.4 while the one on the link provided is 1.3.8, shouldn't this be harmonized/synced? |
I remember how I thought it's time to update the release, but don't recall why I didn't go through with that after all. Perhaps, another important bug was discovered. But you're right, I should probably release the latest version and see what happens. |
If support is needed I'll be glad to help. |
The artifact at https://ci.appveyor.com/project/VioletGiraffe/cppcheck-vs-addin/build/1.3.8/artifacts has been deleted as it was more than 6 months old. Can you generate a new one or include it in the Project Release? |
@gordon-proctor : try this one. |
That worked, thank you. |
Should be fixed in the latest release now. |
Not sure what's going on. There's nothing on it in the Activity Log, and when I attempt to debug the add-in in VS 2015, the plugin is not even installed in the experimental instance, even though the debugging settings are correct. There are no related messages.
The text was updated successfully, but these errors were encountered: