2017-02-25 140 views
2

我跑在构建脚本MSBuild的,我得到这个错误:的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

+0

@jessehouwing问题是,如果msbuild在CI服务器下运行,它的概率是比操作系统上的diff用户比交互式用户,所以msbuild输出需要指定DIR .... – Jonesome

回答

0

您可以运行

msbuild /v:diag > c:\log.txt

强迫你的日志文件中去c:\log.txt。可以使用/flp:filename=c:\log.txt,更多信息here