<MSBuild.ExtensionPack.CodeQuality.StyleCop
TaskAction="Scan"
ShowOutput="true"
ForceFullAnalysis="true"
CacheResults="false"
LogFile="$(ResultsDir)\StyleCopLog.txt"
SettingsFile="E:\Program Files\StyleCop 4.7\Settings.StyleCop"
SourceFiles="@(StyleCopFiles)"
>
<Output TaskParameter="Succeeded" PropertyName="AllPassed"/>
<Output TaskParameter="ViolationCount" PropertyName="Violations"/>
<Output TaskParameter="FailedFiles" ItemName="Failures"/>
</MSBuild.ExtensionPack.CodeQuality.StyleCop>
I get the following error:
error : FileNotFoundException: Could not load file or assembly 'StyleCop, Version=4.7.1000.0, Culture=neutral, PublicKeyToken=f904653c63bc2738' or one of its dependencies. The system cannot find the file specified.
I'm not sure how to fix this. Any suggestions?
Comments: ** Comment from web user: mikeFourie **
SO the stylecop team used to update their assembly version with every release which is near on impossible to deal without implementing some binding redirects etc. If I remember correctly the last release shipped with compatibility with what they had at the time. I raised this issue with them and now they only update the assembly file version so we can be compatible with a 'generation'.
Right now to work around this you can compile the latest code in the 4.5.6 or 3.5.12 release branch and add that msbuild.extensionpack.stylecop.dll file to your stylecop installation folder.
You will need to disable string name verification for the assembly, see: http://msbuildextensionpack.codeplex.com/wikipage?title=DevelopingLatest&referringTitle=Documentation
If that works, let me know, you might hit this though - http://stylecop.codeplex.com/workitem/7378
Vote it up if you do.
Mike