views:

459

answers:

4

In a prior question, I asked about using xbuild to compile a solution file, only to be told it doesn't work for that. NAnt seems a little out of date. What other options are there? I need something that supports dependencies across multiple projects.

+2  A: 

I'm not sure there's only one correct build system to use. :-)

I know that the Mono team uses make to build MonoDevelop and that MonoDevelop uses make under the covers to build projects created by MonoDevelop (http://tirania.org/blog//texts/md-build.html).

That said, there's also xBuild (http://www.mono-project.com/Microsoft.Build) which is an MSBuild compatible build engine created by the mono team. That might actually be the best tool as it would allow you to build your projects under Microsoft's .NET platform in addition to Mono. This link (http://go-mono.com/forums/#nabble-td15680662) talks about MD moving towards MSBuild also.

Jeremy Wiebe
+1  A: 

I asked a similar question:

http://stackoverflow.com/questions/54790/is-it-possible-to-build-msbuild-files-visual-studio-sln-from-the-command-line-i

And the answer (until xbuild is complete) is mdtool.

Kris Erickson
I've found mdtool in /Applications/Monodevelop.app/Contents/MacOS, but when I run it, I get this:mdtool: line 53: /tmp/build_deps/bin/mono: No such file or directoryAny ideas?
Adrian Anttila
A: 

xBuild used to be crap until 5 months ago.

I don't know if that changed, but judging from the fact the MonoDevelop still won't use it, I'd say it's still the same.

I highly doubt any official mono build contains a functional xbuild.

mdtool IMO is a very bad solution, esp. for people like me building mono apps on remote servers that don't and WILL NOT have the GUI frameworks required to get mdtool installed.

What I did find to be a working solution is to let MonoDevelop generate automake scripts for you and continue to hack them by hand.

It actually wasn't that bad as it may sound and I even made some mono app to sync up the items from the .csproj to the Makefile.am files.

damageboy
MonoDevelop has supported syncing file lists and reference lists between Makefile/Makefile.am and csproj/mdp for quite some time:http://monodevelop.com/Download/MonoDevelop_1.0_Released#Makefile_SupportWe use this for MonoDevelop itself. We've also just added an option for MonoDevelop to delegate the build to xbuild. The long-term plan is for xbuild to replace MonoDevelop's internal build system.
mhutch
+2  A: 

I am using mono-trunk (mono 2.6) and xbuild is definitely far more capable now.

Guy van den Berg