Visual Studio (.sln) 生成运行程序和 MSBuild 之间的差异 [英] Differences between Visual Studio (.sln) build runner and MSBuild

查看:35
本文介绍了Visual Studio (.sln) 生成运行程序和 MSBuild 之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将 TeamCity 设置为使用 .Net 执行 CI 并配置我拥有的构建运行器:

I'm trying to set TeamCity to do a CI using .Net and configuring build runners I have:

  1. Visual Studio (sln)
  2. MSBuild
  3. Visual Studio 2003

有什么区别?为什么三个构建工作在同一类型的项目上?(除了 2003 年,我相信它只适用于 2003 年,为什么?)

What's the difference? Why three build to work on the same type of project? (With the exception of 2003 which is only for 2003 I believe, Why?)

考虑到这个问题,我们有这个 .exe 文件的构建运行器:

Taking the issue, we have this build runners for .exe files:

  1. .NET 进程运行器
  2. 命令行

命令行"构建运行器不适用于任何 .net 程序集?为什么是 .Net Process Runner?

The "Command Line" build runner not works with any .net assembly? Why the .Net Process Runner?

推荐答案

Visual Studio (sln)
如果您的解决方案小型,并且您不需要做花哨的事情,则可以使用 Visual Studio (sln) 构建运行程序.它的作用与您执行 Project->Build(从 VS 菜单)时完全相同.此选项非常易于配置,只需单击几下,您的 CI 服务器就会编译您的解决方案.

Visual Studio (sln)
If your solution is small and you are not required to do fancy things you can use Visual Studio (sln) build runner. It does exactly the same thing as when you do Project->Build (from VS menu). This option is very easy to configure, a few clicks and your CI server compiles your solution.

MSBuild
如果你需要做更多的高级场景,除了简单的编译,比如应用不同的配置文件,将转换后的值插入配置文件,部署二进制文件等,你会选择 MSBuild 选项.你会知道什么时候需要使用它,仅仅是因为 sln builder 无法做任何事情.这个选项需要一些构建脚本语言的知识,这是一种基于任务的和类似 xml 的语言.

MSBuild
If you need to do more advanced scenarios, apart from simple compilation, like apply different config files, insert transformed values into config file, deploy binaries etc, you would select MSBuild option. You will know when you need to use this, simply because sln builder will not be capable of doing stuff. This option requires some knowledge of build scripting language, which is a task-based and xml-like.

这篇关于Visual Studio (.sln) 生成运行程序和 MSBuild 之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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