MSBuild 日志文件位置

4

我在构建脚本中运行msbuild,但出现了以下错误:

MSBUILD : error MSB4166: Child node "2" exited prematurely. Shutting down. Diagnostic information may be found in files in the temporary files directory named MSBuild_*.failure.txt.

我在我的电脑上找不到MSBuild_*.failure.txt文件。这是需要配置的吗?如果不是,那么该文件的默认位置在哪里?


2
试过 %temp% 了吗?那应该可以让你进入默认的临时目录... - jessehouwing
问题在于,如果 msbuild 在 CI 服务器上运行,则它可能是操作系统上与您的交互用户不同的 diff 用户,因此 msbuild 输出需要指定目录... - Jonesome Reinstate Monica
1个回答

2
你可以运行以下命令: msbuild /v:diag > c:\log.txt 将日志文件强制定向到 c:\log.txt
或者,你也可以使用以下参数:/flp:filename=c:\log.txt。更多信息请参见此处

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接