在 Microsoft Visual Studio 中禁用解决方案级别的代码分析 [英] Disable code analysis at solution level in Microsoft Visual Studio

查看:44
本文介绍了在 Microsoft Visual Studio 中禁用解决方案级别的代码分析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的产品中,大约有 400 个项目,所以在 VS 2012 中,如果我想进行构建,那么它会为所有 400 个项目生成代码分析,我无法手动禁用每个 & 代码分析.每个项目.因此,我正在寻找一种机制,可以禁用整个解决方案(所有项目)的代码分析,而不是将这些设置应用于单个项目.

In our product, there are around 400 projects, so in VS 2012, if I want to make a build then it generates code analysis for all 400 projects and I can't manually disable code analysis for each & every project. So I am looking for a mechanism which disables code analysis for entire solution (all projects) rather then applying those settings to individual projects.

推荐答案

您可以使用一个小技巧来禁用整个 Visual Studio 实例的静态代码分析,如这里.简而言之:

You can use a little trick to disable the static code analysis for a whole Visual Studio instance as described here. In short:

  • 打开 VS2012 的开发人员命令提示符
  • type set DevDivCodeAnalysisRunType=Disabled
  • 输入 devenv 以启动 Visual Studio
  • Open a Developer Command Prompt for VS2012
  • type set DevDivCodeAnalysisRunType=Disabled
  • type devenv to start Visual Studio

同样的解决方案通过 Developer Command Prompt for VS2015 适用于 Visual Studio 2015.

Same solution works for Visual Studio 2015 via Developer Command Prompt for VS2015.

这篇关于在 Microsoft Visual Studio 中禁用解决方案级别的代码分析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆