与从命令行运行DevEnv.exe相比,使用MSBuild或NAnt的优势 [英] Advantages of using MSBuild or NAnt versus running DevEnv.exe from command-line

查看:76
本文介绍了与从命令行运行DevEnv.exe相比,使用MSBuild或NAnt的优势的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁能解释使用MSBuild(或NAnt)之类的工具来构建项目集合与从命令行运行DevEnv.exe相比有什么优势?

Can anyone explain what advantages there are to using a tool like MSBuild (or NAnt) to build a collection of projects versus running DevEnv.exe from the command-line?

我过去与之共事的一位同事曾解释说(至少使用旧版本的Visual Studio)使用DevEnv.exe的速度比其他技术慢得多,但是我没有读过任何证据,或者我没有读过任何证据.从2005年开始,Visual Studio就在幕后使用MSBuild,这已经成为一个有争议的问题.

A colleague I had worked with in the past had explained that (at least with older versions of Visual Studio) using DevEnv.exe was much slower than the other techniques, but I haven't read any evidence of that or if that is now a moot point now that starting with 2005, Visual Studio uses MSBuild under the hood.

我知道使用MSBuild的一个优点是可以构建项目而无需在构建计算机上安装Visual Studio,但是我不确定是否还有其他功能.

I know one advantage of using MSBuild allows you to build your projects without requiring Visual Studio to be installed on the build machines, but I wasn't sure if there were others.

推荐答案

一个原因是,构建产品不仅仅是编译产品.由于这些工具(及其扩展名)提供了哪些功能,因此创建安装,更新版本号,创建托管,分发最终软件包等任务会变得更加容易.

One reason is because there's much more to building a product than just compiling it. Tasks such as creating installs, updating version numbers, creating escrows, distributing the final packages, etc. can be much easier because of what these tools (and their extensions) provide.

尽管您可以使用常规脚本来完成所有这些操作,但是使用NAnt或MSBuild可以为您提供一个可靠的框架来完成所有这些操作.两者都有很多社区支持,包括可以下载的其他任务(例如 MSBuild社区任务项目 ).另外,许多第三方和开源产品都对它们提供了支持.

While you could do all this with regular scripts, using NAnt or MSBuild give you a solid framework for doing all this. There's a lot of community support for both, including additional tasks that can be downloaded (such as the MSBuild Community Tasks Project). Plus, there's support for them in numerous third party and open source products.

如果您仅对编译感兴趣(而不是对整个构建过程感兴趣),则可能会发现MSBuild的一项节省时间的好处是

If you're just interested in compiling (and not the entire build process), you may find one time saving benefit of MSBuild is the support for building with multiple processors.

这篇关于与从命令行运行DevEnv.exe相比,使用MSBuild或NAnt的优势的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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