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

查看:76
本文介绍了是否可以从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.sln man 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天全站免登陆