8

I'd like to build and run a Monodevelop solution from the OS X Terminal. What are the appropriate tools/commands to do this?

I tried running mdtools build from the directory containing MySolution.sln. This results in -bash: mdtools: command not found. Where can I download and install mdtools? (if this is the right way to go).

I built the solution from the IDE. Then I tried to run it from bin/Debug with mySolution.exe. This resulted in the error message -bash: mySolution.exe: command not found (even though ls shows it exists).

SundayMonday
  • 19,147
  • 29
  • 100
  • 154

3 Answers3

9

On a Mac, mdtool is not in the PATH, but can be found inside the MD app bundle, for example

/Applications/MonoDevelop.app/Contents/MacOS/mdtool build MySolution.sln

Alternatively you could try xbuild, which is installed as part of Mono, and is in PATH. This is an implementation of MSBuild. Unfortunately it can't yet handle all the custom project types that mdtool can handle.

xbuild MySolution.sln
Mikayla Hutchinson
  • 16,113
  • 2
  • 44
  • 50
  • The command looks simple enough, but it seems to silently fail: http://stackoverflow.com/questions/15143410/how-to-build-monotouch-project-using-mdtool – Jamie Starke Feb 28 '13 at 19:19
  • For anyone looking for *mdtool* in Xamarin Studio the path is "/Applications/Xamarin Studio.app/Contents/MacOS/mdtool" – Ian Mercer Feb 04 '15 at 00:36
0

Nowadays if you run xbuild you also will get:

">>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<"

So, you should go for:

msbuild Solution.sln
mayo
  • 3,845
  • 1
  • 32
  • 42
-2

See http://monodevelop.com/Developers/Mac_Support/Building_MonoDevelop_on_OS_X

Lluis Sanchez
  • 1,737
  • 10
  • 11