如何在MSBuild目标ClCompile中禁用代码分析? [英] How to disable code analysis in MSBuild target ClCompile?
问题描述
当我通过MSBuilds脚本构建项目时,在ClCompile
目标工作期间会收到以下消息:Running Code Analysis for C/C++…
When I build my projects via MSBuilds scripts, I obtain the following message during the work of ClCompile
target: Running Code Analysis for C/C++…
MSBuild的输出如下:
Output of MSBuild looks like:
ClCompile:
....
Source1.cpp
Source2.cpp
Running Code Analysis for C/C++…
将构建脚本中的<RunCodeAnalysis>
属性更改为false后:
After changing <RunCodeAnalysis>
property in build scripts to false:
<PropertyGroup>
<RunCodeAnalysis>false</RunCodeAnalysis>
</PropertyGroup>
这只是禁用了运行RunCodeAnalysis
MSBuild目标,但是它不会影响在ClCompile
目标中运行代码分析-似乎应该在其他地方禁用它.
this just disabled running RunCodeAnalysis
MSBuild target, but it does not affect running code analysis in ClCompile
target - it seems it should be disabled somewhere else.
在执行ClCompile
目标期间如何禁用代码分析?
How can I disable code analysis during execution of ClCompile
target?
推荐答案
<EnablePREfast>
应该设置为false
.
我使用了以下代码:
<PropertyGroup>
<EnablePREfast>false</EnablePREfast>
</PropertyGroup>
更多信息,请参见 CL任务
这篇关于如何在MSBuild目标ClCompile中禁用代码分析?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!