This project is read-only.

tied to a specific version of StyleCop?


This tool is very useful to us. However it seems to be tied to the version of StyleCop ( bundled with it, whereas our development environments use I tried replace the three .DLL files but it threw
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.StyleCop, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
I don't see access to the source. Is there some way I can point the executable to the newer version of StyleCop?
Regardless, thanks for making this available.


shuruev wrote Feb 1, 2011 at 9:39 PM

You could try assemly binding (like described here: - but obviously with another version numbers).
If you are lucky and this tool doesn't uses interfaces changed from 4.3 to 4.4 (there were several) - it will work.

The best way of course is to wait untail new version is released, my solution is just a workaround that could probably help.

dpm wrote Feb 2, 2011 at 1:12 PM

Danke! I added these lines
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <assemblyIdentity name="Microsoft.StyleCop" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="" newVersion="" />
            <assemblyIdentity name="Microsoft.StyleCop.CSharp" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="" newVersion="" />
            <assemblyIdentity name="Microsoft.StyleCop.CSharp.Rules" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="" newVersion="" />
after the <configSections> block, copied the three .DLLs in, and it worked great.

Thank you!

wrote Aug 23, 2011 at 10:42 AM

wrote Feb 13, 2013 at 8:47 PM