Is it possible to create MSBuild (visual studio sln) files from the command line in Mono?

Is it possible to create Visual Studio solutions without having to run MonoDevelop?

+58
mono msbuild
Sep 10 '08 at 17:36
source share
4 answers

Current status (Mono 2.10, 2011): xbuild can now create all versions of Visual Studio / MSBuild projects, including .sln files. Just run xbuild same way you would do msbuild in the Microsoft.Net Framework. You do not need to install Monodevelop, xbuild comes with a standard Mono installation.

If your build uses custom tasks, they should still work if they are not dependent on Windows executables (e.g. rmdir or xcopy ).

When you edit project files, use the standard Windows path syntax - they will be converted to xbuild if necessary. One of the important points of this rule is case sensitivity - do not mix different shells of the same file name. If you have a project that does this, you can enable compatibility mode by calling MONO_IOMAP=case xbuild foo.sln (or try MONO_IOMAP=all ). Mono has a page describing more advanced methods xbuild is not yet complete (it works fine with VS2005.csproj files, has problems with VS2008.csproj and does not process .sln). Mono 2.1 plans to merge the mdtool code base (the MonoDevelop command-line build engine), but currently mdtool is the best choice. mdtool build -f:project.sln or man mdtool if you have MonoDevelop installed.

+63
Sep 11 '08 at 9:19
source share

xbuild now supports solutions and projects, both VS2005 and VS2008.

+6
Oct 11 '09 at 12:34
source share

I think you are looking for xbuild: http://www.mono-project.com/Microsoft.Build

+4
Sep 10 '08 at 17:38
source share

At the moment, as of August 2017, we can use

Msbuild

as xbuild depreciates.

+2
Aug 2 '17 at 9:56 on
source share



All Articles