简体   繁体   English

我可以在VS2010的VS2012中使用静态分析吗?

[英]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.

相关问题 将项目从VS2010迁移到VS2012后无法继承接口 - can't inherit interface after migrating project from VS2010 to VS2012 如何在VS2010和VS2012中加载数据库项目? - How to load database project in VS2010 and VS2012? DeploymentItem在VS2010和VS2012中的行为方式不同 - DeploymentItem behaving differently in VS2010 and VS2012 无法在vs2012中打开vs2010 csproj文件 - can't open vs2010 csproj file in vs2012 从vs2010迁移到vs2012后,Linq包含不起作用 - Linq Contains not working after migrate from vs2010 to vs2012 从VS2010移至VS2012后,HTML渲染间歇性丢失内容 - After move from VS2010 to VS2012 HTML rendering is intermittently losing content 在项目开发过程中从VS2010升级到VS2012会有任何风险吗? - Is there any risk in upgrading from VS2010 to VS2012 in the middle of project development? 从VS2010升级到VS2013(或VS2012)后,无法打开Visual Studio C#解决方案,错误消息“不支持给定路径的格式” - Can not open Visual Studio C# solution after upgrading from VS2010 to VS2013 (or VS2012), error message “The given path's format is not supported” AppFabric DataCacheFactory()初始化在VS2013中挂起,在VS2010和VS2012中正常工作 - AppFabric DataCacheFactory() initialization hangs in VS2013, works fine in VS2010 and VS2012 VS2012 OutOfMemoryException与VS2010没有异常的工作 - VS2012 OutOfMemoryException vs. VS2010 working w/o Exception
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM