c00*_*0fd 5 mfc visual-studio-2017
由于大约是Visual Studio 2017的最新更新之一,因此我在构建MFC项目期间开始收到以下警告:
1> C:\ Program Files(x86)\ Microsoft Visual Studio \ 2017 \ Community \ Common7 \ IDE \ VC \ VCTargets \ Platforms \ x64 \ PlatformToolsets \ v141_xp \ Toolset.targets(39,5):警告MSB8051:支持定向Windows XP已过时,以后的Visual Studio版本中将不再提供。有关更多信息,请参阅 https://go.microsoft.com/fwlink/?linkid=2023588。
如何禁用此警告?
这是项目配置:
将此添加到您的.vcxproj文件中,或者添加到现有PropertyGroup中,或者添加到其自己的一个中。
<PropertyGroup>
<XPDeprecationWarning>false</XPDeprecationWarning>
</PropertyGroup>
Run Code Online (Sandbox Code Playgroud)
或通过命令行
msbuild [project file] /p:XPDeprecationWarning=false
Run Code Online (Sandbox Code Playgroud)
另一种可能性是转到“属性管理器”窗口,然后在项目中“添加新的属性表...”。右键单击新工作表,然后选择“公共属性”->“用户宏”->“添加宏”,并使用名称XPDeprecationWarning和值false。遗憾的是,您不能仅在项目上执行此操作,因为Visual Studio不允许您使用GUI编辑根项目文件上的UserMacros(我一直想知道为什么节点位于文件中)。
这些都应该做完全相同的事情,因此,如果一个对您不起作用,那么我不确定为什么其他任何一个会更成功。
| 归档时间: |
|
| 查看次数: |
1057 次 |
| 最近记录: |