Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building C# console project from Linux terminal using Mono

I have Mono Develop installed on my Ubuntu machine. How could I build my C# console project from terminal. My objective is to write a Makefile.

I wish to find out the equivalent of:

msbuild MyProject.csproj /p:OutputPath=%~dp0
like image 431
softwarematter Avatar asked Sep 15 '11 21:09

softwarematter


2 Answers

You can use xbuild to build sln or csproj files. xbuild is bundled with a standard mono install.

like image 109
Femaref Avatar answered Nov 12 '22 17:11

Femaref


You can call dmcs, which is the .NET 4 Mono compiler, directly. For details, see the CSharp Compiler page.

like image 23
Reed Copsey Avatar answered Nov 12 '22 17:11

Reed Copsey