Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiler command line for C# projects

Tags:

c#

.net

csc

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

like image 994
Faisal Mansoor Avatar asked Dec 07 '22 22:12

Faisal Mansoor


1 Answers

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.

like image 135
David Avatar answered Dec 27 '22 00:12

David