1

I've modified the default template to run some custom activities in the build process.

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).

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.

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 ?

jessehouwing
  • 87,636
  • 19
  • 214
  • 286
Khh
  • 2,421
  • 1
  • 23
  • 41

1 Answers1

2

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.

Community
  • 1
  • 1
pantelif
  • 8,449
  • 2
  • 30
  • 47
  • Yes the files have to checked in after the manipulation. I think after the hints I can finish it, thanks – Khh Dec 20 '11 at 17:20