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

CPPCheckPluginPackage did not load correctly: VS2013 #142

Closed
wwarriner opened this issue Jul 1, 2015 · 74 comments
Closed

CPPCheckPluginPackage did not load correctly: VS2013 #142

wwarriner opened this issue Jul 1, 2015 · 74 comments
Labels

Comments

@wwarriner
Copy link

The following error occurs while trying to load the plugin following installation:
untitled

In the activity log is:

  <entry>
    <record>853</record>
    <time>2015/07/01 05:36:11.686</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>End package load [CPPCheckPluginPackage]</description>
    <guid>{127D8BD3-8CD7-491A-9A63-9B4E89118DA9}</guid>
    <hr>80004005 - E_FAIL</hr>
    <errorinfo>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.</errorinfo>
  </entry>

Where I noted the use of *.Shell.11.0

Going into the extension folder and changing the following entry in "extension.vsixmanifest"

<Dependency Id="Microsoft.VisualStudio.MPF.11.0" DisplayName="Visual Studio MPF 11.0" Version="11.0" />

manually to replace 11.0 with 12.0 causes the plugin to work fine.

After downloading and poking around the project, and around the internet, I've discovered what I believe to be related to the issue:
Using CTRL+SHIFT+F, and searching for "11.0" yields

Find all "11.0", Subfolders, Find Results 1, "Entire Solution ( Including External Items )", "*.cs;*.resx;*.resw;*.xsd;*.wsdl;*.xaml;*.xml;*.htm;*.html;*.css"
  ~\cppcheck-vs-addin-master\CPPCheckPlugin\CPPCheckPluginPackage.cs(17):    [DefaultRegistryRoot(@"Software\Microsoft\VisualStudio\11.0")]
  ~\cppcheck-vs-addin-master\CPPCheckPlugin\Properties\Settings.Designer.cs(16):    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
  Matching lines: 2    Matching files: 2    Total files searched: 29

Replacing those instances of 11.0 with 12.0, building, and installing the build also resolves the issue for me.

I don't know nearly enough about C# or the VS SDK, but I also found: github.com and stackoverflow.com which may be relevant to fixing the issue in a robust fashion.

@VioletGiraffe
Copy link
Owner

I believe this edit (replacing 11.0 with 12.0) will break VS 2012 support. Other than that, I don't understand anything here.

@Dmitry-Me
Copy link
Collaborator

How about using a range for "version" as in this change mkurdej@38c36a6 ?

@VioletGiraffe
Copy link
Owner

As long as it works, feel free to edit everything :)

Could you please take a look at the #141 issue? I've lost all ability to work on this project.

VioletGiraffe added a commit that referenced this issue Aug 19, 2015
Fix to #142: Plugin did not load correctly in VS2013
@SanderBouwhuis
Copy link

@wwarriner
I'm having this problem as well. Changing the 11.0 to 12.0 in the manifest did NOT fix it for me.
Can you release the fix?

@VioletGiraffe
What do you mean with "I've lost all ability to work on this project"?

@VioletGiraffe
Copy link
Owner

@SanderBouwhuis : getting a build error, see #141

@FelixBer
Copy link

FelixBer commented Sep 6, 2015

I just hit this error after upgrading from version 1.2.1 to 1.3.1.

The error occurs with 1.3 and 1.3.1, but not with 1.2.1. Reverting to 1.2.1 for now.

@VioletGiraffe
Copy link
Owner

@FelixBer: it's fixed already, just need someone to rebuild the .vsix because I can't.

@SanderBouwhuis
Copy link

@FelixBer
So, if I use v1.2.1 it will work with VS2013?

@francispauli
Copy link

i had the same error as warriner in VS2013 but got up and running with v1.2.1

@altumano
Copy link

So, the latest release 1.3.1.0 is still not working with Visual Studio 2013.
Is there any plan to release a fix?

@VioletGiraffe
Copy link
Owner

@altumano : I'd be happy to, as soon as someone helps me solve the problem with building the project.

@FelixBer
Copy link

I can build it at work later but my release build is only half the size of previous releases. Were you uploading debug builds or am I missing something in the build process?

@VioletGiraffe
Copy link
Owner

@FelixBer : There's nothing to miss. I don't think I'd upload a debug build, but it's not impossible.
It'd be great if I could build the project myself, too...

@SanderBouwhuis
Copy link

Yay for FelixBer.

@FelixBer
Copy link

Here we go:

built from 486b159
tested with cppcheck 1.69 x86

(edit: pushed version number to 1.3.2)
http://rghost.net/662xqRvqv

I only tested it very briefly by scanning some projects with cppcheck 1.69 x86 and Visual Studio 2013.

Would be great if someone else could test it too.

@VioletGiraffe
Copy link
Owner

I see you didn't increment the version number. That's bad because then you can't update without uninstalling the extension first.

@FelixBer
Copy link

Fixed. I built from a clean checkout and forgot to bump the version number. I can only send you a pull req for it later though.

@SanderBouwhuis
Copy link

@FelixBer
Unfortunately, it doesn't seem to work. The installation proceeds correctly, but in VS2013 I don't have any CppCheck menu items.

@FelixBer
Copy link

That's odd. Did you restart VS? Try going to tools->updates and extensions and uninstall it if its there. Then close down all VS instances and install it again. Then start VS.

I just tried it again in various constellations and settings and it works for me.

Two questions: Does anything show up in tools->updates and extensions? Does it work with version 1.3.1, the latest official release?

I'll only have time to look at this next week.

@SanderBouwhuis
Copy link

CppCheck is in Tools/Extensions and updates.

Just to make sure, should there be a new menu for CppCheck in the UI where I can change some settings? Because I don't have that.

@FelixBer
Copy link

No, there should bee two menu items under the "Tools" menu.

Tools -> check current project with cppcheck
Tools -> cppcheck settings

@SanderBouwhuis
Copy link

Aaaaah, shoot! Ok, in that case, it works.

Mea culpa.

@adm1961
Copy link

adm1961 commented Oct 1, 2015

I've just installed the current version into VS2013 and although the menu entries are there, when clicked they don't do anything. I can run cppcheck fine from the command line though. Any ideas?

@adm1961
Copy link

adm1961 commented Oct 1, 2015

I did have to use nuget to get the shell.11 file though - is it worth changing the shell version to 12 as detailed above or shouldn't that be needed?

@FelixBer
Copy link

FelixBer commented Oct 1, 2015

Make sure cppcheck 1.69 x86 is installed. You should also get an error message, either a messagebox or in the output pane or the cppcheck panel.

@VioletGiraffe
Copy link
Owner

C:\Program Files\Cppcheck\cppcheck.exe has exited with code -1073741515
Don't know what's wrong. Can't debug because of #141.

@wwarriner
Copy link
Author

The same (or similar) is now happening in VS2015, and the change may be more complex. I haven't figured out totally how to fix it, and may not figure it out. There may be changes to dependency structure.

@SanderBouwhuis
Copy link

Maybe we can ask someone from Microsoft?

@VioletGiraffe
Copy link
Owner

We can ask on MSDN forums (https://social.msdn.microsoft.com/Forums/en-US/home?forum=vsx).

@GrenMeera
Copy link

@VioletGiraffe I just uninstalled the plugin, cleared my %Appdata Extension cache, restarted a fresh Visual Studio 2012, then closed it again so that I had a fully clean %Appdata Extension cache.

I then ran the 1.3.3 Release installer. The bug is still present in Visual Studio 2012 on this release.

If I go through this entire process with bugparty's release, the error message is gone and the plugin works fine.

It may be possible that this bug was fixed in 2013, but it still seems very present in 2012.

@VioletGiraffe
Copy link
Owner

That suggests @bugparty didn't commit some of the important changes, IMO.

@bugparty
Copy link

oh, I am sure I have commit all the changes,maybe the compiler maters?I am
using visual studio 2012,so maybe the guys who are using visual studio 2012
could use my build

On Fri, Mar 25, 2016 at 2:44 AM, Violet Giraffe notifications@github.com
wrote:

That suggests @bugparty https://github.com/bugparty didn't commit some
of the important changes, IMO.


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

@VioletGiraffe
Copy link
Owner

No idea... I used VS2015 to build the release.

@bugparty
Copy link

I have both VS2015 and VS2012,I will build two relase later, Maybe We can
find some reasons

On Fri, Mar 25, 2016 at 4:26 PM, Violet Giraffe notifications@github.com
wrote:

No idea... I used VS2015 to build the release.


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

@GrenMeera
Copy link

@VioletGiraffe @bugparty Let me know if you need an additional testing bench as I have been able to reproduce this consistently.

@lohengrin
Copy link

Since I have this problem for a long time, I was using the @bugparty 's release without problem.
I Just installed the new 1.3.3 version and it does not solved this issue (same error message as before)
Going back to @bugparty 's release works fine.
Using Visual Studio 2013 Update 5.

@bugparty
Copy link

bugparty commented Apr 15, 2016

I checkout the latest master source code and build with vs2012 and 2015
build with vs2012,this build works fine with my vs2013
http://rghost.net/6DPj2MMYh

build with vs2015
http://rghost.net/7xBctbtwz

@VioletGiraffe
Copy link
Owner

VioletGiraffe commented Apr 15, 2016

@bugparty
The latest release is built from the current master source. If your builds do work for people who have this issue, I suppose we'd have to look into your project settings or IDE settings that aren't in the repository.

@bugparty
Copy link

it works for my vs2012 and vs2013,but I don`t have any settings different
from others

On Fri, Apr 15, 2016 at 6:36 PM, Violet Giraffe notifications@github.com
wrote:

@bugparty https://github.com/bugparty
The latest release is built from the current master source. If your builds
do work for people who have this issue, I suppose we'd have to look into
your project settings or IDE settings that aren't in the repository.


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

@lohengrin
Copy link

Yes, @bugparty version VS2012 and VS2015 works fine on my VS2013 Update 5 (the official version does not work).
The Extensions and Updates manager still display version 1.3.1 version (and not 1.3.3) with both. Is it normal ?

@VioletGiraffe
Copy link
Owner

VioletGiraffe commented Apr 15, 2016

@bugparty @lohengrin
No, that's not normal. The latest commit in the repo is 1.3.3: https://github.com/VioletGiraffe/cppcheck-vs-addin/blob/master/CPPCheckPlugin/source.extension.vsixmanifest

It means that you didn't build the latest source. It might also mean there are some uncommited changes on your PC that fix this issue.

@bugparty
Copy link

but I just clone a new copy on the master and build it

On Fri, Apr 15, 2016 at 8:09 PM, Violet Giraffe notifications@github.com
wrote:

@bugparty https://github.com/bugparty @lohengrin
https://github.com/lohengrin
No, that's not normal. The source code in the report is 1.3.3:
https://github.com/VioletGiraffe/cppcheck-vs-addin/blob/master/CPPCheckPlugin/source.extension.vsixmanifest

It means that you didn't build the latest source. It might also mean there
are some uncommited changes on bugparty's PC that fix this issue.


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

@VioletGiraffe
Copy link
Owner

But you can see that my link is correct, and the manifest says 1.3.3, right? Then how come your builds are 1.3.1?

@bugparty
Copy link

sorry,I will double check it

On Sat, Apr 16, 2016 at 12:32 AM, Violet Giraffe notifications@github.com
wrote:

But you can see that my link is correct, and the manifest says 1.3.3,
right? Then how come your builds are 1.3.1?


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

@VioletGiraffe VioletGiraffe reopened this Apr 15, 2016
@GrenMeera
Copy link

@bugparty
Both of your builds made in 2012 and 2015 work with my 2012 Professional.

I am also getting the same results as @lohengrin and my builds are listed as version 1.3.1 in my Extension manager.

Also oddly enough the plugins are listed as version 1.2.0 if you go to Help->About Microsoft Visual Studio

@VioletGiraffe
Copy link
Owner

@GrenMeera
Yes, it does show 1.2.0 in About - clearly, that number is coming from a different place, possibly from the source code. That's not a concern in the context of this issue.
I have just double-checked that the latest release does indeed show up as 1.3.3 in "Extensions and updates".

@christheenchanter
Copy link

christheenchanter commented Sep 16, 2016

Visual studio 2013 update 5 version# 12.0.40629.00. windows 10 pro 64-bit.
ActivityLog.txt

also VS 2015 is not installed on this machine.

@T-Jin
Copy link

T-Jin commented Sep 19, 2016

Finally got it working!

I had exact same problem with @christheenchanter.
I'm only using VS2013 update 5 #12.0.40629.00 with win7 64-bit.

Clone the repo and build it on my machine solved the problem.

@VioletGiraffe
Copy link
Owner

@T-Jin : could you attach your VSIX here so that other people with the same problem can try it out? I wonder if it only works when built on the same machine where it'll be used or not.

@LinuxdevelopersOrg
Copy link

LinuxdevelopersOrg commented Sep 20, 2016

The one built by @bugparty on Mar 18 works on my machine with only VS2013. The official one does not. The official one did work in VS2013 when I had VS2015 installed, though (uninstalled it yesterday, and cppcheck stopped working). Seemingly there's something in bugpartys build that works ;)

@VioletGiraffe
Copy link
Owner

VioletGiraffe commented Sep 20, 2016

@LinuxdevelopersOrg What about this one?
CppcheckPlugin.zip

@LinuxdevelopersOrg
Copy link

LinuxdevelopersOrg commented Sep 20, 2016

@VioletGiraffe Sorry, did not work for me. I cloned and rebuilt this one, and this one works on my machine(tm) (after a rudimentary check-on-save quick test).

CppcheckPlugin.zip

Edit: Tried my version on my coworkers VS2013 machine and it works there too (his did NOT run with the official client either before).

@T-Jin
Copy link

T-Jin commented Sep 21, 2016

@VioletGiraffe Here is my release build. It worked on my win7 64-bit with only VS2013 installed.
CppcheckPlugin.zip

@MikelLuri
Copy link

My cppcheckplugin didn't work. I've tried with the build by @T-Jin and now it works. I also have win7 x64 and only VS2013 installed.

@andrei-dragusanu
Copy link

andrei-dragusanu commented Jan 10, 2017

On Visual Studio 2012/Windows 7 64bit it is also not working (realease 1.3.3):
image

<entry>
    <record>450</record>
    <time>2017/01/10 16:03:52.004</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Begin package load [CPPCheckPluginPackage]</description>
    <guid>{127D8BD3-8CD7-491A-9A63-9B4E89118DA9}</guid>
  </entry>
  <entry>
    <record>451</record>
    <time>2017/01/10 16:03:52.016</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>CreateInstance failed for package [CPPCheckPluginPackage]</description>
    <guid>{127D8BD3-8CD7-491A-9A63-9B4E89118DA9}</guid>
    <hr>80070002</hr>
    <errorinfo>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.</errorinfo>
  </entry>
  <entry>
    <record>452</record>
    <time>2017/01/10 16:03:52.016</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>End package load [CPPCheckPluginPackage]</description>
    <guid>{127D8BD3-8CD7-491A-9A63-9B4E89118DA9}</guid>
    <hr>80004005 - E_FAIL</hr>
    <errorinfo>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.</errorinfo>
  </entry>

@VioletGiraffe
Copy link
Owner

VS 2013 is no longer supported. If you get this error on a newer version of Visual Studio with the latest release, open a new issue.

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