C++ VS2011代码分析

C++ VS2011代码分析,c++,code-analysis,visual-studio-2012,C++,Code Analysis,Visual Studio 2012,我最近安装了VS2011测试版,以了解Microsoft在最新版本的编译器中实现的新C++11功能 但是,我在返回使用VS2010时遇到了一个意想不到的问题。我已经在VS2010中打开了一个Windows SDK 7.1示例项目 现在,当我在VS2010中构建时,我得到以下输出,表示正在执行代码分析工具(似乎是在编译之后,但在链接之前) 我试图确定项目的哪些更改导致代码分析工具被执行,但在项目属性中找不到任何内容。我曾尝试在VS2011中重新加载该项目,但没有可以关闭()的代码分析选项 项目完全

我最近安装了VS2011测试版,以了解Microsoft在最新版本的编译器中实现的新C++11功能

但是,我在返回使用VS2010时遇到了一个意想不到的问题。我已经在VS2010中打开了一个Windows SDK 7.1示例项目

现在,当我在VS2010中构建时,我得到以下输出,表示正在执行代码分析工具(似乎是在编译之后,但在链接之前)

我试图确定项目的哪些更改导致代码分析工具被执行,但在项目属性中找不到任何内容。我曾尝试在VS2011中重新加载该项目,但没有可以关闭()的代码分析选项

项目完全是纯C++,我从来没有用CLR < /P>使用C++ 此外,我还尝试打开其他项目(我自己的项目),现在他们也在调用这个代码分析阶段。在许多情况下,由于Microsoft代码的问题,这会阻止生成!构建似乎在VS2011测试版中取得了成功


有人能提供关于如何关闭此代码分析工具的见解吗?我希望安装VS2011 beta版,所以请不要建议卸载它,除非它是唯一的选择

我认为只有VS2010 Ultimate支持代码分析。我没有VS2012,但我认为您应该手动编辑vcxproj文件

如果项目文件中存在以下参数,请查找其中一个或两个:
true
true

将这两个值都更改为
false
,它应该可以工作


请注意,这些名称是VS2010使用的,我不确定他们是否在VS2012中更改了它。

Wow。我知道以前会有人看到这个问题。像这样的答案是对网站工作方式的赞扬+1专业版和高级版中还包括静态代码分析:VS2012和VS2010的项目文件完全兼容,因此名称相同。
1>------ Rebuild All started: Project: MFCaptureToFile, Configuration: Debug Win32 ------
1>  winmain.cpp
1>  capture.cpp
1>  Running Code Analysis for C/C++...
1>capture.cpp(112): error C2220: warning treated as error - no 'object' file generated
1>c:\program files\microsoft sdks\windows\v7.1\samples\multimedia\mediafoundation\mfcapturetofile\capture.cpp(105): warning C6309: Argument '3' is null: this does not adhere to function specification of 'IMFAttributes::GetAllocatedString'
1>c:\program files\microsoft sdks\windows\v7.1\samples\multimedia\mediafoundation\mfcapturetofile\capture.cpp(105): warning C6387: 'argument 3' might be '0': this does not adhere to the specification for the function 'IMFAttributes::GetAllocatedString': Lines: 98, 103, 105
1>c:\program files\microsoft sdks\windows\v7.1\samples\multimedia\mediafoundation\mfcapturetofile\capture.cpp(353): warning C6309: Argument '3' is null: this does not adhere to function specification of 'IMFAttributes::GetAllocatedString'
1>c:\program files\microsoft sdks\windows\v7.1\samples\multimedia\mediafoundation\mfcapturetofile\capture.cpp(353): warning C6387: 'argument 3' might be '0': this does not adhere to the specification for the function 'IMFAttributes::GetAllocatedString': Lines: 336, 338, 340, 343, 351, 353
1>C:\Program Files\Microsoft SDKs\Windows\v7.1\Include\ks.h(53): error C2220: warning treated as error - no 'object' file generated
1>c:\program files\microsoft sdks\windows\v7.1\include\ks.h(53): warning C6244: Local declaration of 'GUID_NULL' hides previous declaration at line '28' of 'c:\program files\microsoft sdks\windows\v7.1\include\cguid.h'
1>  Generating Code...
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========