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