VS 2008 的批量构建开源工具
在我们的项目中,我们有大约 70 个 C# 项目。我们需要将组件部署到开发服务器。我想知道是否有任何独立的工具可以帮助这个过程,而不是一个一个地构建每个项目,或者创建一个包含所有项目的 VS 解决方案。
我想象的是一个简单的应用程序,我在其中输入 .csproj 文件路径,输入 .dll 目标路径,选择配置模式(发布/调试),然后开始构建过程。定义编译顺序也很不错。
任何参考将不胜感激。
In our project, we have about 70 C# Projects. We need to deploy the components to development server. I'm wondering if there is any standalone tool which aids this process, rather than building each project one by one, or creating a VS Solution containing all the projects.
What I'm picturing is a simple application where I enter the .csproj files path, enter the .dll destination path, select configuration mode (release/debug) and then, start the building process. Defining the compilation order would also be sweet.
Any reference will be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
有多种用于 .NET 的构建工具。
其中之一是 MSBuild,它是 Visual Studio 附带的 -项目和解决方案文件是 MSBuild 构建文件。
它还具有大量的社区任务,可以为您带来很多帮助。
NAnt 是一个社区构建工具,出现在 MSBuild 之前,并且非常成熟。
查看此问题(最佳 .NET 构建工具)了解更多信息。
There are several build tools for .NET.
One of them is MSBuild, which is what comes with Visual Studio - project and solution files are MSBuild build files.
It also has a very large amount of community tasks that will achieve quite a lot for you.
NAnt is a community build tool that came before MSBuild and is very mature.
Check out this question (Best .NET build tool) for more information.
好的,我知道这有点偏离主题,但是......
当您有那么多项目时,您可能还想查看专用的构建服务器。这是一个执行 MSBuild 或 Nant 定义的构建脚本的服务器(在我看来 MSBuild 是一个更好的选择)。
构建服务器有很多选项:
如果您有的话,TeamCity 非常容易启动和运行设置 MSBuild 或 NANT 脚本来构建您的项目。您所需要的只是一些运行它的硬件。 TC 和 CC 都将与所有主要源代码控制存储库(例如 SVN、VSS 等)集成,并检测代码更改并自动运行构建。
OK, I know this is slightly off topic, but...
When you have that many projects, you may also want to look at a dedicated build server. This is a server that executes the build scripts defined by MSBuild or Nant (in my view MSBuild is a much better option).
There are many options for build servers:
TeamCity is very easy to get up and running if you have MSBuild or NANT scripts set up to build your projects. All you need is some hardware to run it on. Both TC and CC will integrate with all major source control repositories such as SVN, VSS, etc and detect changes to your code and automatically run a build.
您可以使用 NAnt 来完成此任务。或者你也可以使用MSBuild,虽然它不是开源的,但它是随.NET框架一起分发的
You can use NAnt for this task. Or you can use MSBuild as well, although it is not open-sourced, it is distributed with .NET framework
Google 的 GYP 项目(生成您的项目)也可能有用。它将为您生成 VS 项目(在 Windows 上)、xcode(在 Mac 上)和 scons(在 Linux 上)。
Google's GYP project (Generate Your Project) may be of use to use as well. It will generate VS projects for you (on Windows), xcode (on Mac) and scons (on Linux).