是否可以从 Mono 的命令行构建 MSBuild 文件(visual studio sln)? [英] Is it possible to build MSBuild files (visual studio sln) from the command line in Mono?

查看:32
本文介绍了是否可以从 Mono 的命令行构建 MSBuild 文件(visual studio sln)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在不启动 MonoDevelop 的情况下构建 Visual Studio 解决方案?

Is it possible to build Visual Studio solutions without having to fire up MonoDevelop?

推荐答案

当前状态(Mono 2.10,2011):xbuild 现在能够构建所有版本的 Visual Studio/MSBuild 项目,包括 .sln 文件.只需像在 Microsoft .Net Framework 上执行 msbuild 一样运行 xbuild.你不需要安装 Monodevelop,xbuild 自带了标准的 Mono 安装.

Current status (Mono 2.10, 2011): xbuild is now able to build all versions of Visual Studio / MSBuild projects, including .sln files. Simply run xbuild just as you would execute msbuild on Microsoft .Net Framework. You don't need Monodevelop installed, xbuild comes with the standard Mono installation.

如果您的构建使用自定义任务,如果它们不依赖于 Windows 可执行文件(例如 rmdirxcopy),它们应该仍然可以工作.

If your build uses custom tasks, they should still work if they don't depend on Windows executables (such as rmdir or xcopy).

当您编辑项目文件时,请使用标准 Windows 路径语法 - 如果需要,它们将由 xbuild 转换.此规则的一个重要警告是区分大小写 - 不要混合相同文件名的不同大小写.如果您有一个这样做的项目,您可以通过调用 MONO_IOMAP=case xbuild foo.sln(或尝试 MONO_IOMAP=all)来启用兼容模式.Mono 有一个页面描述了更高级的 MSBuild 项目移植 技术.

When you are editing project files, use standard Windows path syntax - they will be converted by xbuild, if necessary. One important caveat to this rule is case sensitivity - don't mix different casings of the same file name. If you have a project that does this, you can enable compatibility mode by invoking MONO_IOMAP=case xbuild foo.sln (or try MONO_IOMAP=all). Mono has a page describing more advanced MSBuild project porting techniques.

Mono 2.0 答案(2008 年):xbuild 尚未完成(它适用于 VS2005 .csproj 文件,VS2008 .csproj 有问题并且不处理 .sln).Mono 2.1 计划将 mdtool(MonoDevelop 命令行构建引擎)的代码库合并到其中,但目前 mdtool 是更好的选择.mdtool build -f:project.slnman mdtool 如果你安装了 MonoDevelop.

Mono 2.0 answer (2008): xbuild is not yet complete (it works quite well with VS2005 .csproj files, has problems with VS2008 .csproj and does not handle .sln). Mono 2.1 plans to merge the code base of mdtool (MonoDevelop command line build engine) into it, but currently mdtool is a better choice. mdtool build -f:project.sln or man mdtool if you have MonoDevelop installed.

这篇关于是否可以从 Mono 的命令行构建 MSBuild 文件(visual studio sln)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆