我可以查看MSBuild实际执行了哪些构建命令吗? [英] Can I view what build commands are actually executed with MSBuild?
问题描述
我使用MSBuild生成项目文件. 默认情况下,MSBuild仅打印出编译结果,但是我需要检查正在执行哪些命令.
I use MSBuild to build the project file. By default, MSBuild just prints out the compilation results, but I need to check what commands are being executed.
我可以查看实际执行了哪些构建命令吗?我要检查编译器选项,并且引用与csc
命令一起使用.
Can I view what build commands are actually executed? I want to check the compiler options and references are used with csc
command.
推荐答案
您可以使用/v [erbosity]标志.我不知道您可以获得传递给CSC的标志的列表,但是如果使用/v:Detailed或/v:diagnostic,它将转储有关正在执行的目标,所有MSBuild变量及其变量的大量信息.值,以及所有已解析的参考程序集.
You can use the /v[erbosity] flag. I don't know that you can get a list of the flags passed to CSC, but if you use /v:Detailed or /v:diagnostic it will dump a ton of information about the targets being executed, all the MSBuild variables and their values, and all of the resolved reference assemblies.
[edit:]如果您寻找它,它看起来也会向您显示对csc.exe的命令行调用,即使在/v:detailed上也是如此.
[edit:] if you hunt for it, it looks like it will show you the command line call to csc.exe as well, even on /v:detailed.
这篇关于我可以查看MSBuild实际执行了哪些构建命令吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!