Compiler command line for C# projects

Faisal Mansoor picture Faisal Mansoor · Apr 1, 2011 · Viewed 8.1k times · Source

Visual Studio shows the exact command line use to compiler and link a C++ project under Project Properties -> C/C++ -> Command Line and Linker ->Command Line, but, I was not able to find similar property page for C# projects.

Does any know what's the best way to find out the csc.exe command line arguments used to compile a C# project

Answer

David picture David · Apr 1, 2011

Instead of using csc.exe directly, I would recommend looking at msbuild instead. With msbuild, you just have to run msbuild yourProject.csproj to compile it.

Also, per this MSDN blog, the csc.exe command line you see in the output window isn't really being used.