[英]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? 由于第一阶段的可比性原因,我想在VS 2012中使用Microsoft Visual Studio 10.0 \\ Team Tools \\ Static Analysis Tools \\中的VS2010引擎。有什么办法吗?
i was able to replace(fake) files of the code analysis from 11 to 10.. Analysis works. 我能够从11到10替换(伪造)代码分析文件。分析工作正常。 But i can't see CA errors(number and discription) when they heppens
但是当它们急剧增加时,我看不到CA错误(数字和说明)
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. 我已将CodeAnalysisPath,CodeAnalysisStaticAnalysisDirectory和CodeAnalysisTargets覆盖到10.0版本,并且我发现VS 2012调用带有/ outputCulture:1049的FxCopCmd.exe和带有/ outputCulture:1033的VS 2010的所有其他参数都是相同的。 So that is the reason.
这就是原因。 But i can't find outputCulture pparametr in the FxCopCmd help... that is VSLANG!
但是我无法在FxCopCmd帮助中找到outputCulture pparametr ...这就是VSLANG! (visual studio language)...It seems that problem was solved by overriding only CodeAnalysisPath and using the same language version of VS.
(Visual Studio语言)...似乎可以通过仅覆盖CodeAnalysisPath并使用相同语言版本的VS来解决问题。 Because before i had English VS 2010 and Russian VS 2012.
因为之前我有英文VS 2010和俄文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): 您只需在VS 2012项目中指向VS 2010 FxCop文件夹(例如:.csproj或.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.
指向源代码控制的相对路径时,它将同样有效,如果您已经在源代码树中管理工具依赖项,这将非常方便。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.