Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

'Method not found' exception when using context menu #16

Closed
jasonaughton opened this issue Sep 14, 2015 · 9 comments
Closed

'Method not found' exception when using context menu #16

jasonaughton opened this issue Sep 14, 2015 · 9 comments

Comments

@jasonaughton
Copy link

When running StyleCop from the right-click context menu on a Solution Explorer item or on the file itself, I get a model dialog with the following message:

Method not found: 'Void StyleCop.CodeProject.ctor(Int32, System.String, StyleCop.Configuration, Double).

Version is 4.7.55.26 in VS2015 Enterprise

@ptittof57
Copy link
Contributor

@jasonaughton do you get this message each time you use the right-click context menu ?
Which kind of project you try to run StyleCop ?

@ptittof57 ptittof57 added the bug label Sep 14, 2015
@ptittof57 ptittof57 self-assigned this Sep 14, 2015
@jasonaughton
Copy link
Author

I get this irrespective of what I right-click - on the solution, any project type and all C# files. Have removed and reinstalled the extension, the problem remains.

2015-09-15_083932

@ptittof57
Copy link
Contributor

It seems that your version try to load an old version of StyleCop.dll.
I updated the constructor since version 4.7.52.0.

Try to uninstall again and search for "StyleCop.dll" in folder / C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions and check the version. Remove previous versions manually if necessary.

Then run VS2015 as admin and try to reinstall.

Let me know if you need more help.

@jasonaughton
Copy link
Author

The StyleCop.dll in that location is version 4.7.55

However, I also have a StyleCop.dll in C:\Program Files (x86)\StyleCop 4.7 and that is version 4.7.49

@ptittof57
Copy link
Contributor

4.7.49 is the original version from codeplex and doesn't support VS2015. I think this dll shouldn't be in folder C:\Program Files (x86)\Microsoft Visual Studio 14.0

Uninstall version 4.7.49 and delete all references in C:\Program Files (x86)\Microsoft Visual Studio 14.0 and reinstall version 4.7.55.26, it should work.

There is no direct download for previous versions but I am working on that for next releases.

@jasonaughton
Copy link
Author

I tried that and it worked. However, I had to update the Resharper.Stylecop extension to use the 4.7.55 version, and once that was done the Resharper integration no longer worked.

I'm going to leave this for now and continue to rely on Resharper with 4.7.49.

@ptittof57
Copy link
Contributor

No fix available for now, current version of Visual StyleCop is incompatible with R# plugin.

@readingdancer
Copy link

Hi, I just thought I would add a comment to say we have been using R# and Stylecop since they first worked together. Do you know what would be required to make this new version compatible with the latest version of R# 10 as it's a bit of a show stopper for us using it. We'd potentially be happy to help if we can with either testing or even coding if we can find the time :)

@ptittof57
Copy link
Contributor

Hi @readingdancer, I think to work with R#10 and Visual-StyleCop you should create a fork and a new project based on StyleCop CodexPlex sources.
In the current repo, I removed R# because I don't have a license to test it. Another solution maybe is to try https://github.com/StyleCop/StyleCop that should support R#.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants