Skip to content
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

Plugin fails to load after installation #138

Closed
johnsietsma opened this issue Jun 1, 2015 · 31 comments
Closed

Plugin fails to load after installation #138

johnsietsma opened this issue Jun 1, 2015 · 31 comments
Labels

Comments

@johnsietsma
Copy link

I installed the CppCheck plugin in Visual Studio 2013. And when opening a project I get a message box that says "The 'CPPCheckPluginPackage' did not load correctly.

The ActivityLog.xml files has the error message:
"Could not load file or assembly 'Microsoft.VisualStudio.Shell.11.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified."

I imagine that it should be looking for VisualStudio.Shell.12.0. Perhaps the assembly dependency is incorrect?

@VioletGiraffe
Copy link
Owner

I get the same at home, where I don't have the VS SDK and only have VS 2013. I'll look into it tomorrow.

@Dmitry-Me
Copy link
Collaborator

Dunno if that's related, but the project currently references Microsoft.VisualStudio.Shell.X.0 with X being 8, 9, 10 and 11 but not 12. I would guess that adding such reference could magically solve the problem.

@VioletGiraffe
Copy link
Owner

I wonder when it got broken in the first place.

@johnsietsma
Copy link
Author

Well thanks for taking a look. It does sound like it needs the reference to
12. I'm happy to test a build for you if you like.

On 1 June 2015 at 19:41, Violet Giraffe notifications@github.com wrote:

The better question is, when did it get broken.


Reply to this email directly or view it on GitHub
#138 (comment)
.

VioletGiraffe added a commit that referenced this issue Jun 2, 2015
@VioletGiraffe
Copy link
Owner

I've uploaded a new release, 1.3.1. Please give it a try: https://github.com/VioletGiraffe/cppcheck-vs-addin/releases/tag/1.3.1.0

@rob100
Copy link

rob100 commented Jun 2, 2015

Hi,
I had the same problem, so I tried your new 1.3.1 release with no success. Then I tried to reproduce the problem in the debugger with your current master/head and the problem does not occurred. Everything worked fine. Is it possible, that the uploaded CppcheckPlugin.vsix from your link is not the newest one?

@VioletGiraffe
Copy link
Owner

No, I've double-checked, it's the right VSIX.

@VioletGiraffe
Copy link
Owner

The error message mentions Microsoft.VisualStudio.Shell reference, but there is no such reference in the module's assemblies. The only such extension available in the list is Microsoft.VisualStudio.Shell.12.0, there's no 11.0 or just universal Shell with no version number.

@VioletGiraffe
Copy link
Owner

Try this VSIX: http://rghost.net/8XkG8wdqs
It should solve the problem, but break compatibility with VS 2013 and 2015.

@johnsietsma
Copy link
Author

That works for me. I could install and use the add-in without any issues,

Thanks!

On 2 June 2015 at 23:11, Violet Giraffe notifications@github.com wrote:

Try this VSIX: http://rghost.net/8XkG8wdqs
It should solve the problem, but break compatibility with VS 2013 and 2015.


Reply to this email directly or view it on GitHub
#138 (comment)
.

@VioletGiraffe
Copy link
Owner

Okay, so that was it.

@manuelh
Copy link

manuelh commented Jun 8, 2015

I'm experiencing the same issue with VS2013 and the latest version I got from here: https://github.com/VioletGiraffe/cppcheck-vs-addin/releases/tag/1.3.1.0

stbrowne pushed a commit to stbrowne/cppcheck-vs-addin that referenced this issue Jun 11, 2015
@bugparty
Copy link

I am using Visual Studio 2012 update 5,
I also have this problem,the log is:

Could not load file or assembly 'Microsoft.VisualStudio.Shell.11.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
]

I tried the releases above but no one works

I tried the compile this project under vs2012, I got the follow warnings

1>------ Build started: Project: CPPCheckPlugin, Configuration: Debug Any CPU ------
1>Project file contains ToolsVersion="12.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="4.0". For more information, please see http://go.microsoft.com/fwlink/?LinkId=291333.
1>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.Shell.Interop.12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
1>  CPPCheckPlugin -> 
1>  CPPCheckPlugin -> 
1>  CPPCheckPlugin -> C:\Users\bowman\Downloads\cppcheck-vs-addin-master\cppcheck-vs-addin-master\CPPCheckPlugin\bin\Debug\CppcheckPlugin.dll
1>Project file contains ToolsVersion="12.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="4.0". For more information, please see http://go.microsoft.com/fwlink/?LinkId=291333.
1>  Creating VSIX Container...
1>  CPPCheckPlugin -> C:\Users\bowman\Downloads\cppcheck-vs-addin-master\cppcheck-vs-addin-master\CPPCheckPlugin\bin\Debug\CppcheckPlugin.vsix

haha,I got it works in vs2012, will you folks who has vs2013 try my release?
here is my release http://rghost.net/75VTbBNgg
if it works , I would like to make a pull request

@VioletGiraffe
Copy link
Owner

@bugparty: Works for me (VS 2013 Update 4)!

bugparty pushed a commit to bugparty/cppcheck-vs-addin that referenced this issue Jan 26, 2016
VioletGiraffe added a commit that referenced this issue Jan 27, 2016
fix issue Plugin fails to load after installation #138
@thiessendg
Copy link

I just downloaded this VS add-in and it's still not working. I have a fairly vanilla VS 2013 Update 5 installed. Is there any way to get this to work?

Here is the relevant material from G:\Users\dthiessen\AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml

909 2016/03/24 12:29:38.526 Warning VisualStudio Unexpected system error mode before loading package [CPPCheckPluginPackage] {127D8BD3-8CD7-491A-9A63-9B4E89118DA9} 910 2016/03/24 12:29:38.526 Information VisualStudio Begin package load [CPPCheckPluginPackage] {127D8BD3-8CD7-491A-9A63-9B4E89118DA9} 911 2016/03/24 12:29:38.557 Error VisualStudio CreateInstance failed for package [CPPCheckPluginPackage] {127D8BD3-8CD7-491A-9A63-9B4E89118DA9}
80070002 Could not load file or assembly 'Microsoft.VisualStudio.Shell.11.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. 912 2016/03/24 12:29:38.557 Error VisualStudio End package load [CPPCheckPluginPackage] {127D8BD3-8CD7-491A-9A63-9B4E89118DA9}
80004005 - E_FAIL Could not load file or assembly 'Microsoft.VisualStudio.Shell.11.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

@VioletGiraffe
Copy link
Owner

Sorry, my mistake. I was wondering how come bugparty's fix didn't solve the problem for you (as it was supposed to), and then I realized I actually never released a fixed plugin! So please install the latest release, it should work fine: https://github.com/VioletGiraffe/cppcheck-vs-addin/releases/latest

@thiessendg
Copy link

Still doesn't work. Won't load. Here is the newest snip from the xml...

643 2016/03/24 13:52:32.462 Information VisualStudio Begin package load [CPPCheckPluginPackage] {127D8BD3-8CD7-491A-9A63-9B4E89118DA9} 644 2016/03/24 13:52:32.477 Error VisualStudio CreateInstance failed for package [CPPCheckPluginPackage] {127D8BD3-8CD7-491A-9A63-9B4E89118DA9}
80070002 Could not load file or assembly 'Microsoft.VisualStudio.Shell.11.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. 645 2016/03/24 13:52:32.477 Error VisualStudio End package load [CPPCheckPluginPackage] {127D8BD3-8CD7-491A-9A63-9B4E89118DA9}
80004005 - E_FAIL Could not load file or assembly 'Microsoft.VisualStudio.Shell.11.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

@thiessendg
Copy link

capture

@VioletGiraffe
Copy link
Owner

I assume that's with the new version?

@thiessendg
Copy link

Yes, newest version, still doesn't load.

@VioletGiraffe VioletGiraffe reopened this Mar 24, 2016
@thiessendg
Copy link

Seems like it is assuming I have VS 2012, not VS 2013 or 2015 from the Could not load file or assembly 'Microsoft.VisualStudio.Shell.11.0 lines in the xml... shrug...

@VioletGiraffe
Copy link
Owner

Could be that the 11.0 version is hardcoded, when it shouldn't be. But the problem is that the release works on both my PCs no problem with VS 2013 and 2015.

@thiessendg
Copy link

That's weird. I have VS 2015 on another machine, let me get to that and try it there.

@thiessendg
Copy link

OK, weird... works fine on Win 10 / VS 2015... So, something is haywire with my Win 7 / VS 2013 platform... I will see what I can find. Thanks!

@VioletGiraffe
Copy link
Owner

Note: this is a duplicate of #138

@thiessendg
Copy link

I tried everything I could think of, including a "Repair" of VS 2013 and nothing worked. I finally said to heck with it and downloaded the zip from GitHub and "rebuilt" the plugin. The rebuilt plugin now works. No idea why that worked.

@VioletGiraffe
Copy link
Owner

It worked because the problem is not with the actual code of the plugin (that I wrote) but with the list of dependencies (about which I don't understand the first thing).

@bugparty
Copy link

the latest source has patched by me ,maybe you haven`t download the latest
build

On Fri, Mar 25, 2016 at 3:13 AM, thiessendg notifications@github.com
wrote:

I tried everything I could think of, including a "Repair" of VS 2013 and
nothing worked. I finally said to heck with it and downloaded the zip from
GitHub and "rebuilt" the plugin. The rebuilt plugin now works. No idea why
that worked.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#138 (comment)

@VioletGiraffe
Copy link
Owner

I did git pull before building the release.

@calexiev
Copy link

Hello!
I had the same problem with the lates version on 64 bits. Could you please indicate the general solution?

@VioletGiraffe
Copy link
Owner

Closing as too old - much has changed in the add-in's settings since then (for one, VS 2013 is probably no longer supported).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants