Checkout/Checkin on TFS2008 as part of Build Process fails


I'm evaluating TeamCity and the product really seems great! However, I'm struggling to checkout/checkin a file as part of the build process. I'm using Team Foundation Server 2008 and I want to version our assemblies according to the build number generated by TeamCity as part of our daily builds. To do this I need to checkout a GlobalAssemblyInfo.cs file and replace a token in the file with the ${build.vcs.number.N} property passed on by TeamCity.

See the extract from the log file for the error:

: Target "Version" in project "ShoppingCart.proj.teamcity.patch.tcprojx" (<1s)
: [Target "Version" in project "ShoppingCart.proj.teamcity.patch.tcprojx"] D:\TeamCity\buildAgent\work\e3f031c64e73354c\ShoppingCart.proj(476, 5): error MSB3073: The command ""C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\tf.exe" checkout D:\TeamCity\buildAgent\work\e3f031c64e73354c\Source\GlobalAssemblyInfo.cs" exited with code 100.

I'm guessing that it is related to the fact that there is no workspace definition to the area where the buildAgent is making the build from. How would one accomplish this using TFS?



OK, I see from the documentation about Automatic Checkout on the server that you are not allowed to do any VCS related actions for Team Foundation Server. This probably also explains why you currently cannot Label as part of the build when using TFS. Is there absolutely no way to work around this currently? I'm thinking of creating a workspace that maps to the buildagent directory. Any other ideas?



Sorry for long the delay. The question is still actual with latest TeamCity release?

Kind regards,


Please sign in to leave a comment.