Monday, 15 April 2013

Fxcop Custom code designed targeting VS 2010 not working for VS 2012 -



Fxcop Custom code designed targeting VS 2010 not working for VS 2012 -

i have written code analysis rules , created rule set file contain custom rules , miscrosoft rules. rules developed , build on ms visual studio 2010 , working fine on it. when same rule set tried utilize in ms visual studio 2012 custom rules fail load without warning.

i have tried build same project targeting vs 2012 , used same assembly new ruleset still custom rule fails load.

this referencing issue.

your custom rule uses references fxcopsdk.dll , microsoft.cci.dll. version changes every time new visual studio gets released.

where visual studio 2010 uses version 10.0, visual studio 2012 uses version 11.0.

you add together relative paths in .csproj-file. allows instant rebuilding in each new visual studio version:

<reference include="microsoft.cci"> <hintpath>$(codeanalysispath)\microsoft.cci.dll</hintpath> </reference> <reference include="fxcopsdk"> <hintpath>$(codeanalysispath)\fxcopsdk.dll</hintpath> </reference>

visual-studio-2012 code-analysis fxcop

No comments:

Post a Comment