Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# Mono on mac - compile and run another project with code

I am trying to build an automatic download, compile & run program for a project just to make it easier for other users on mac and myself so we do not have to do everything over and over as the project progresses. I cant find anything on how to compile and run a C# monodevelop project with code when i google. Does anyone here know how it could be done?

thanks

Edit: using xbuild as mentioned below compiles the project, but i cannot seem to find a command to run the build? the only output seems to be .exe and that launches vmware when i try to run, is there som command that i add somewhere? like execute

tar -xf sources.tar.gz
cd *project*
xbuild project.sln
like image 612
Viktor Alm Avatar asked Jan 18 '23 15:01

Viktor Alm


1 Answers

To build applications you can use gmcs , to run then you can use mono. From a Terminal shell, you can try it out:

$ gmcs hello.cs
$ mono hello.exe
Hello, World
like image 59
Udrian Avatar answered Jan 30 '23 06:01

Udrian