How to compile a Visual Studio C# Project with Mono

前端 未结 5 835
暖寄归人
暖寄归人 2020-12-07 17:22

I\'m new to this, and don\'t know where to start.

I want to compile a Visual Studio C# project with Mono on Linux (by command line).

The main.cs file include

5条回答
  •  余生分开走
    2020-12-07 18:07

    Have you tried xbuild? It's the MSBuild equivalent on the Mono world. If MSBuild is able to compile your project in Windows, xbuild should be able to do the same on Linux (if it doesn't, file a bug in Bugzilla).

    UPDATE: Nowadays, Mono developers/packagers are in the process of bundling the original (and recently opensourced) MSBuild, which is now crossplatform. For example it's already available in the latest Mono installers for Mac, so you can use the command-line program msbuild to build your project/solutions (note: still a long way to go to be bundled by Linux distros because msbuild depends on nuget packages, aka binary blobs).

提交回复
热议问题