开发者

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

开发者 https://www.devze.com 2023-04-09 04:22 出处:网络
I am trying to build an automatic download, compile & run pro开发者_StackOverflowgram for a project just to make it easier for other users on mac and myself so we do not have to do everything over

I am trying to build an automatic download, compile & run pro开发者_StackOverflowgram 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


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


The full answer of course depends on the sources concerned and the build system it uses. For mono relates sources you can often do the following:

tar -xf sources.tar.gz
cd sources
./configure
make
sudo make install

If you have a .sln file and csproj files, you need to use mdtool or xbuild. mdtool comes with monodevelop, xbuild comes with mono. Both understand visual studio solution and csproj files and will build them. xbuild a mono equivalent of msbuild.

0

精彩评论

暂无评论...
验证码 换一张
取 消