简体   繁体   中英

Can i use static analysis in VS2012 from VS2010?

For the comparability reasons on the first stage i want to use VS2010 engine from the Microsoft Visual Studio 10.0\\Team Tools\\Static Analysis Tools\\ in the VS 2012... Is there any way to do this?


i was able to replace(fake) files of the code analysis from 11 to 10.. Analysis works. But i can't see CA errors(number and discription) when they heppens


I have overrided CodeAnalysisPath, CodeAnalysisStaticAnalysisDirectory and CodeAnalysisTargets to 10.0 version and I founded that VS 2012 invokes FxCopCmd.exe with /outputCulture:1049 and VS 2010 with /outputCulture:1033 all other parametrs are the same. So that is the reason. But i can't find outputCulture pparametr in the FxCopCmd help... that is VSLANG! (visual studio language)...It seems that problem was solved by overriding only CodeAnalysisPath and using the same language version of VS. Because before i had English VS 2010 and Russian VS 2012.

You should be able to get this working simply by pointing to the VS 2010 FxCop folder from within your VS 2012 project (eg: .csproj or .vbproj):

<CodeAnalysisPath>C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\</CodeAnalysisPath>

NB: This path does not necessarily have to be in Program Files. It will work equally well when pointing to a source-controlled relative path, which is handy if you are already managing your tool dependencies in your source tree.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM