Visual在每次编译时抱怨使用warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build.
我正在检查项目,并更改了输出目录和中间目录,但我仍然收到了解决方案中每个项目的消息。
我怎么才能解决这个问题?
发布于 2016-01-12 13:00:17
我找到了答案-我错过了环境变量。在添加它们并重新启动之后,问题就消失了。
如何在Windows 7中修复它
发布于 2017-09-17 21:21:37
这是一个真正无用的信息警告。我认为将所有中间文件定向到临时文件夹是一个很好的主意。至少当涉及到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
发布于 2020-02-19 13:52:11
对于那些遇到这个问题的人使用VS 2019年(可能是后者)。(它与TEMP环境变量无关)。
VS 2019不支持用户设置,您应该使用项目设置禁用警告。知道MSBuild也从环境中计算属性,您可以定义与MSBuild属性同名的环境变量。在要禁用警告的会话中创建以下属性
set IgnoreWarnIntDirInTempDetected=true
然后开始建造。
https://stackoverflow.com/questions/34744098
复制相似问题