使用 VSS 自动构建

发布于 2024-07-29 02:13:05 字数 92 浏览 6 评论 0原文

如何在 VSS 中自动构建? 它应该从 VSS 获取最新文件,并在预定时间(例如午夜)使用 Visual Studio 2005(VSS 不提供任何构建工具)构建代码。

How can I make my auto build in VSS? It should get the latest files from VSS and build the code using Visual Studio 2005 (VSS does not provide any build facility) at a scheduled time (like in the mid night).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

司马昭之心 2024-08-05 02:13:05

使用 CruiseControl.NET。 它可以进行自动化构建、运行单元测试、收集统计数据,并且它是开源的,因此您无需购买许可证!

Use CruiseControl.NET. It can do your automated builds, run your unit tests, gather statistics and it is open source, so you don't have to buy a license!

明明#如月 2024-08-05 02:13:05

我认为 VSS 没有能力做这样的事情。

您所说的是持续集成工具的工作,例如 Cruise Control。 您可以在此处指定何时检查源代码并构建应用程序。 此外,您还可以将其配置为运行应用程序的单元测试或通过 FxCop 检查您的代码。

对于跑步,巡航控制将为您提供每一步的详细信息,这样您就可以看到哪里出现了问题,或者庆幸自己根本没有问题。

我之前已经测试过巡航控制。 设置起来有点困难,但是当它最终运行时,它绝对很棒。 你应该尝试一下。

更新:

您说过,您只想在构建中使用 VSS 和 VS。 因此,您可能应该联系 MSBuild。 使用 MSBuild-scipts 应该可以从存储库中签出代码并自动构建它。 构建脚本是从 Windows 任务规划器运行的,因此它会在您需要时启动。

有关更多信息,您应该深入研究 MSBuild 文档。 我非常确定您可以通过 MSBuild 脚本实现您想要的一切。

I don't think VSS is capable of such things.

What you're talking about is a job for a Continuous Integration tool like Cruise Control. Here you can specify when to check out the sources and build the application. Additionally you can configure it to run Unit Tests for the application or to check your code by FxCop.

For a run Cruise Control will give you detailed information about every step, so you can see where you had problems or be happy that you had none at all.

I already tested Cruise Control a time ago. It's a little difficult to set up, but when it finally runs, it's absolutely great. You should give it a try.

UPDATE:

You said, you only want to use VSS and VS for your builds. So probably you should get in touch with MSBuild. With MSBuild-scipts it should be possible to check out code from your repository and build it automatically. The build-script is run from Windows task planer, so it would be launched whenever you wanted it.

For further information you should dig into the MSBuild documentation. I'm pretty sure you can achieve all you want just by MSBuild-scripts.

花开浅夏 2024-08-05 02:13:05

如上所述,VSS 不提供任何构建类型功能,即 TFS。

如果您遇到困难并且无法使用任何有用的构建工具,例如 Cruise ControlNAnt(顺便说一下,免费和开源)或深入了解 MSBuild,可通过 Visual Studio 使用,您可以编写批处理文件从 VSS 获取(有一个命令行界面可以执行此操作),然后使用 MSBuild 或 devenv.exe(我真的不建议使用 DevEnv.exe)来实际编译您的解决方案和项目。 因此,只需使用批处理文件和 Windows 调度程序来控制构建时间,就可以创建基本的自动化构建系统。

As stated above VSS does not offer any build type functionality, that would be TFS.

If you are stuck and are unable to use any helpful build tools like Cruise Control,NAnt (Both free and Open Source by the way) or get deeper into MSBuild, which is available to you with Visual Studio you could write a batch file to do a get from VSS (there is a command line interface for doing that) and then use MSBuild, or devenv.exe(I really don't recommend using DevEnv.exe) to actually compile your solutions and projects. So just using batch files and the windows scheduler to control when you build you can create a basic automated build system.

千里故人稀 2024-08-05 02:13:05

巡航控制系统很难设置。 使用 TeamCity。 它非常简单且功能强大。 JetBrain TeamCity

并且它有免费的专业版。

Cruise Control is very hard to set up. Use TeamCity. It is very easy and powerful. JetBrain TeamCity

And it has free Professional Edition.

呆橘 2024-08-05 02:13:05

正如前面提到的,最简单的方法是设置 TeamCity。 这可以监视您的源代码控制的更改,然后直接自动构建您的解决方案文件。

如果您必须仅使用 VSS,那么您需要编写某种脚本来执行以下操作:

  1. 从 VSS 检出源代码。
  2. 构建解决方案文件。
  3. 报告结果。

我会为此推荐 MSBuild,因为它至少可以本地构建您的解决方案文件。 对于 vss 集成和报告 MSBuild 社区任务 将非常有用

当然,您需要找到一个触发 vss 签入构建的方式。 我不知道这是否可能。

As has been mentioned the easiest way of doing things is to set up TeamCity. This can watch your source control fro changes and then automatically build your solution files directly.

If you must use VSS only then you need to write some sort of script that does the following:

  1. Check out source from VSS.
  2. Build the solution file.
  3. Report on the results.

I would reccomend MSBuild for this as it can at least build your solution files natively. for the vss integration and the reporting the MSBuild Community Tasks Will be very useful

Of course You then need to find a way of triggering your build on vss checkin. I do not know if this is possible.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文