這是一個真正無用的信息預警。我認爲將所有中間文件導入臨時文件夾是一個很好的主意。至少在涉及到C++時。
該警告是由於VS2017 Microsoft.CppBuild.targets
(395)的設置:
<VCMessage Code="MSB8029" Type="Warning" Condition="'$(DesignTimeBuild)'!='true' and '$(IgnoreWarnIntDirInTempDetected)' != 'true' and ('$(_IntDirFullpath.StartsWith($(Tmp), true, null))' == 'true' or '$(_IntDirFullpath.StartsWith($(Temp), true, null))' == 'true' or '$(_OutDirFullpath.StartsWith($(Tmp), true, null))' == 'true' or '$(_OutDirFullpath.StartsWith($(Temp), true, null))' == 'true')"/>
實施是VS版本之間有些不同,但該溶液是相同的。您需要的只是通過分配宏來禁用觸發器。
- 打開或創建自己的屬性文件
Microsoft.Cpp.x64.user.props
和 Microsoft.Cpp.Win32.user.props
- 添加宏
IgnoreWarnIntDirInTempDetected
與價值true
完成
該解決方案適用於VS2013和VS2015爲好。
%LOCALAPPDATA%\Microsoft\MSBuild\v4.0
:個人屬性文件將被發現