Exception Loading StyleCop+

Mar 20, 2012 at 11:20 PM

Hi

I am getting an Exception, when I copy StyleCopPlus.dll into the StyleCop Directory and starting VS2010.

StyleCopPlus.dll 1.7.0.0 (unblocked as explained)

StyleCop.dll 4.7.12.0

VS2010 Ultimate

x64 Windows 7

---------------------------StyleCop---------------------------An exception occurred while loading one of the StyleCop add-ins: System.IO.FileLoadException, Could not load file or assembly 'file:///C:\Program Files (x86)\StyleCop 4.7\StyleCopPlus.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)---------------------------OK   ---------------------------

 

Thank you

thomas

Coordinator
Mar 21, 2012 at 8:17 AM

Hi Thomas,

StyleCop+ 1.7 is built over StyleCop 4.7.11.0. That is why it doesn't work with 4.7.12.0.

This "tightly-coupled" thing has been the most annoying thing around StyleCop plugins for years (http://stylecopplus.codeplex.com/wikipage?title=Compatibility%20Issues&referringTitle=Documentation).

Good news are that, starting from 4.7.15.0, this problem seems to disappear (according to http://stylecop.codeplex.com/workitem/7156).

So I am going to release new StyleCop+ built over StyleCop 4.7.15.0 (or later) soon, and we will have a chance to check.
If you don't want to wait, you can also build your own StyleCop+ version over your current StyleCop, taking sources from GitHub.

Thanks!

Best regards,
Oleg Shuruev

Mar 22, 2012 at 9:39 PM

Thank you so much Oleg.

Thomas

Sep 15, 2012 at 5:40 PM

This problem was indeed solved for a while but it's now back for me:

StyleCopPlus.dll 1.8.0.0 (unblocked as explained)

StyleCop.dll 4.7.36.0

VS2012 Professional

x64 Windows 8

Are you planning on building a new StyleCop+ dll?

Oct 23, 2012 at 8:29 PM

Is using StyleCop+ with newer builds of StyleCop than 4.7.17 supported? If not, is an official updated build of StyleCop+ forthcoming?

Thanks :)

Dominic

Coordinator
Nov 2, 2012 at 11:41 AM

Hi guys,

Sorry for the long delay - was very busy with my job.

StyleCop+ 1.8 works with any StyleCop version, newer than 4.7.17.
Right now, I am using StyleCop 4.7.39.0, both in Windows 7 + VS2010 as well as Windows 8 + VS2012.

All the compatibility issues seems gone in past.
I guess I should update release comment and documentation to make it more clear.

Please let me know if something does not work, I think I can help.

Thank you!

Nov 3, 2012 at 4:49 PM
Edited Nov 3, 2012 at 5:14 PM

*Edit*

Never mind, I found out what the issue was for me. It seems in Windows 8 you have to be extra careful when unblocking the dll. If you do it with the dll in the StyleCop dir (where you need admin rights), it fails silently (if you go back to properties you'll see the Unblock button is there again).

To get around this, you have to first put the dll in a dir you own, your desktop for example, unblock it there, then copy it over to the StyleCop dir. That fixed it for me.

Oleg, you might want to amend your documentation with this info.