Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see CSC.EXE (or VBC.EXE) parameters when building from Visual Studio

Is there a way to see what the CSC (or VBC) parameters are, when building an application using the Visual Studio?

Visual Studio calls CSC.exe/VBC.exe behind the scenes. I want to know if there is a way to see that call.

I need this info to replicate the equivalent Build script using the command line.

I set the different levels of verbosity for the build, still I do not see any CSC.EXE call in the output window.

I'm really surprised why Microsoft did not put an easy way to see the underlying CSC command.

AJ if I go through your steps I get: enter image description here

I do not see any reference to CSC


OK here is how I resolved this:

First I went to tools and options and set the verbosity to detail. (After this point still build output was empty).

Then I got Service pack for VS2010.

I also had similar issue for Visual Studio 2012 I had to get "update 4" to see the logs and CSC.EXE ion the output.

like image 283
S Nash Avatar asked Aug 26 '14 13:08

S Nash


1 Answers

I think what you're looking for can be set up in your VS environment options. Under the Tools menu, select "Options," then "Projects and Solutions." Make sure "Show Output window when build starts" is checked.

Show Output

Then, under "Projects and Solutions," select "Build and Run" and change the level of "MSBuild project build output verbosity." I changed it to "Detailed" as an experiment, but you can fiddle with the levels to get what you want.

Output Verbosity

Then, when you build/rebuild your solution, the easiest thing to do is to place your cursor in the build output window and search for "csc" (or "vbc" for VB). You should be able to see the entire command line call to the compiler.

Build Output

EDIT
To answer your comment, change the "Show output from" drop-down option at the top of the output window from "Debug" to "Build" and do a build/rebuild without running the application in debug mode.

Show Output From

like image 132
AJ. Avatar answered Oct 02 '22 06:10

AJ.