Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i build a visual studio solution using xbuild (from Mono)?

I recently downloaded Mono 2 for my new MacBook. I'm trying to figure out how to compile Visual Studio solutions with xbuild, which is included in Mono. Any ideas?

like image 724
Adrian Anttila Avatar asked Oct 31 '08 19:10

Adrian Anttila


People also ask

What is Xbuild?

xbuild is Mono's implementation of msbuild and it allows projects that have an msbuild file to be compiled natively on Linux. xbuild has been part of the standard Mono distribution for some time now, but it is not 100% complete yet. xbuild supports C# and VB.NET projects out of the box.

What is Mono msbuild?

Sponsored by Microsoft, Mono is an open source implementation of Microsoft's . NET Framework based on the ECMA standards for C# and the Common Language Runtime.

How do you make a SLN file?

Go to your folder with your solution sln file, and just type msbuild. It will automatically start building the sln files. If you use nuget packages, you will get errors about missing packages. You may have read somewhere that you only need to type “msbuild /t:restore”, but I think that it's only works for .


2 Answers

Update: xbuild supports solution files now. see xbuild

like image 128
radical Avatar answered Sep 28 '22 03:09

radical


The last time I checked, solutions weren't supported by xbuild (they use a different file format), but *.*proj files are.

If you have a relatively simple solution, you may be able to get away with using xbuild on each project separately, but if your solution is very complex (with interdependencies between projects, etc.), you'll probably have to do a bit of hacking to make everything work.

Furthermore, it's worth noting the C++ projects in Visual Studio don't use msbuild, either (although Visual Studio 2010 is supposed to fix this), so if you need to compile any C++, you're totally on your own (of course, Mono doesn't have a C++/CLI compiler, so you wouldn't get very far with xbuild, anyway).

This question/answer suggests that you may wish to use mdtool, instead.

like image 33
Amanda Mitchell Avatar answered Sep 28 '22 03:09

Amanda Mitchell