Can I view what build commands are actually execut

2019-07-09 02:08发布

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.

Can I view what build commands are actually executed? I want to check the compiler options and references are used with csc command.

2条回答
爷的心禁止访问
2楼-- · 2019-07-09 02:09

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:] 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.

查看更多
Bombasti
3楼-- · 2019-07-09 02:31

You can set the output of a Visual Studio build to be detailed. Go to menu Tools -> Options -> Projects and Solutions -> Build and Run. Change the MSBuild project build output verbosity option, typically from the default Minimal to Normal, Detailed or Diagnostic.

查看更多
登录 后发表回答