Compile .NET source code on Ubuntu 14.04
1. Build the latest mono from source. You can also install from apt-get. But if the source code contains C#6.0 code, you’ll get error. The build process like following:
1 2 3 4 5 6 7 |
apt-get install git autoconf libtool automake build-essential mono-devel gettext wget http://download.mono-project.com/sources/mono/mono-4.6.0.243.tar.bz2 842 cd mono-4.6.0.243.tar.bz2 tar xvf mono-4.6.0.243.tar.bz2 cd mono-4.6.0 ./configure —prefix=/usr/local make make install |
2.Download nuget from release. And also download Microsoft.Build.zip
3.Get the Nuget projects:
1 2 |
chmod +x NuGet.exe ./NuGet.exe restore your_solution.sln |
4.Build the full solution:
1 |
xbuild your_solution.sln |