问题描述
是否可以在不启动 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 可执行文件(例如 rmdir
或 xcopy
),它们应该仍然可以工作.
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 年):
Mono 2.0 answer (2008):
这篇关于是否可以从 Mono 的命令行构建 MSBuild 文件(visual studio sln)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!