Teambuild 中的签出文件 (TFS2010) [英] Checkout files in Teambuild (TFS2010)
问题描述
我修改了默认模板以在构建过程中运行一些自定义活动.
I've modified the default template to run some custom activities in the build process.
在构建过程中会创建一些 CodeAnalysisRuleset 文件,并将其分配给相应的 c# 项目文件.
In the build process some CodeAnalysisRuleset files are created and shall be assigned to the corresponding c# projectfiles.
我已经实现了两个代码活动来创建(第一个活动)和分配规则集(第二个活动).
I have implemented two code activies to create (first activity) and assign the rulesets (second activity).
如果我运行 teambuild,就会发生异常(拒绝访问").我查看了构建代理上的源文件夹,文件是只读的.
If I run the teambuild, an exception happened ("access denied"). I looked in the source folder on the build agent and the files are readonly.
这两个代码活动放在If CreateLabel"活动之后,因为我虽然此时文件已经被检出.
The two code activities are placed after the "If CreateLabel" - activity because I though the files are already checked out at this point.
文件什么时候被检出以便我可以修改它们?
When are the files are getting checked out so i can modify them?
这是实现我目标的正确方式吗?
Is it the right way to accomplish my goal ?
推荐答案
默认情况下,文件实际上从不签出.
真正的问题是:您是否希望在您的操作发生后也进行更改签入了吗?
如果是,请查看 this Hofman - 描述如何检出 & 的帖子在 TFS 构建期间签入.
如果没有,您可以简单地添加一个额外的步骤,使目标文件在构建期间可读写.请在 这个 帖子,在第一部分中,我描述了我们如何使用自定义活动 MakeFileWriteable
在我们的构建过程模板中实现这一点.
一般来说,我倾向于看到检查- 在构建期间进入是一件可怕的事情,所以到目前为止我已经设法避免了这种情况.
By default the files are actually never checked out.
The real question is: would you like after your actions have taken place, to also have the changes checked in?
If yes, check this Hofman - post that describes how to check out & check in during TFS build.
If no, you can simply add an additional step to make the target file(s) read-write during build. Please check my answer in this post, where in the first section I had described how we 've implemented this in our build process template with custom activity MakeFileWriteable
.
Generally speaking I tend to see checking-in during build as a horrible thing to do, so i've managed to avoid this so far.
这篇关于Teambuild 中的签出文件 (TFS2010)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!