I'm a Unix guy who needs to try and compile some C# code for work. I've downloaded Mono for Mac, and the mcs command line tool. There's a csproj file attached to this library which contains XML with all of the files I need to compile.
Can Mono/mcs read this csproj file and generate a DLL from it?
If you don't want to use MonoDevelop and want to use the command-line, you can use xbuild. xbuild is the Mono equivalent of MSBuild.
xbuild /p:Configuration=Release HelloWorld.csproj
The easiest way is to head over to monodevelop and download their IDE. It can open project files generated by Visual Studio.
Now you can also use the convenience of aptitude as below:
sudo apt-get install monodevelop mono-gmcs
This question is old and answers are deprectated. I succeed to generate and run DLL from a csproj by following theses steps:
apt-get install openssl
Then, use dotnet build YourProject.csproj
to compile the project and dotnet run YourProject.csproj
to run it.
For Ubuntu, and probably other Debian-based distributions:
sudo apt-get install monodevelop mono-gmcs
(mono-gmcs
may be needed to compile .net 2.0 or 3.5 projects)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With