需要 Msbuild 新手的入门读物
我们在工作中维护一个用 vb/c# .net 开发的中型 Windows 应用程序。 现在这个应用程序的构建和部署过程仍然是手动的。 我决心使用我现在还不了解的 MSBuild 使这个过程自动化。
我们的应用程序有一个简单的构建结构,一组项目已经分为四个解决方案(.sln),只需要按顺序构建四个 sln。 然后将项目(这是最后要构建的 sln 的一部分)发布到目录。 这就对了。 一个简单的过程已经消耗了 30 分钟的手动构建时间,我非常确定这可以在至少 1/4 的时间内使用 msbuild 来完成,而无需手动干扰。
我所有的目标都设定得很好,我开始在网络上寻找 MSBuild 资源来完成我的流程,但可能会发现很多事情让我困惑。 需要一个指针或一个关于如何开始以及从哪里开始我的简单场景的良好解释。 非常感谢您的帮助。
We maintain a medium sized windows application developed in vb/c# .net in work. Still now the build and deploy process for this app is manual. I am determined to make this process automated using MSBuild on which i have no knowledge still now.
Our app has a simple build structure, set of projects already grouped into four solutions(.sln) and just need to build the four slns in an order. And then publish a project(which is part of the last sln to be built) to a directory. That is it. A simple process which is already consuming 30 mins of manual build time and i'm pretty sure that this can be accomplished without manual interference using msbuild in atleast 1/4 th of the time.
All my goals set good, i started looking around web for MSBuild resources to accomplish my process but may be looking around many things confused me. Need a pointer or a good explanation on how to start and where to start for my simple scenario. Help is much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这听起来是一个非常容易编写的脚本。 即使是批处理文件也可以:
当然,更好的是让服务器运行,例如 CruiseControl.NET,提供构建状态和历史记录的 Web 界面。
在 MS Build 中,调用者有两个主要控制点:目标及其属性。 Target 是要编译的内容、资源、编译、部署等。Properties 控制 Target 的构建方式。
您可以使用配置属性来控制配置(见上文)。 如果您打开 *.*proj 文件,您会注意到
PropertyGroup
元素。 这些可以通过命令行使用/p
参数进行设置。以下是两个参数的规格:
This sounds like a very easy script to write. Even a batch file would do:
Of course, much better would be to have a server running, say CruiseControl.NET, that gives a web interface into the build status and history.
In MS Build, there are two main control points for the caller: The Target and its Properties. The Target is what to compile, resources, compilation, deployment, etc. The Properties control how that Target is built.
You can control the configuration using the Configuration property (see above). If you open your *.*proj files, you will notice
PropertyGroup
elements. These are settable via the commandline using the/p
arg.Here are the specs for the two args:
这是一个很好的指南,其中包含有关 MSBuild、持续集成和 CuriseControl.NET 的大量重要信息。 绝对是一个很好的起点。
Here's a good guide that has a lot of great information on MSBuild, Continuous Integration and CuriseControl.NET. Definitely a good place to start.