Leon Mayne

Is it possible to set the workspace a build will use in an .rsp file or in the build type I tried setting:

Code Snippet
/p:SolutionRoot="C:\My Workspace"

In the response file, which didn't work.



Re: Team Foundation Server - Build Automation Change workspace

Steve St.Jean

The workspace for a Team Build is destroyed and re-created during the build based on the entries in the WorkspaceMappings.xml file.

What are you trying to accomplish Maybe we can give some alternatives.

- Steve






Re: Team Foundation Server - Build Automation Change workspace

Leon Mayne

I need to be able to unshelve some changes into the workspace after the getlatest. However, I also need to specify the shelveset when starting the build programatically. The two options are:

  1. My code creates a workspace, gets the latest sources, unshelves changes into this workspace, and then tells the build to use this workspace (with SkipGet=true)
  2. My code starts the build passing in the shelveset name and owner to unshelve after the build performs a get latest

From what you're saying it looks like 1 is out of the question. For 2 I could use this (from another post):

<PropertyGroup>

<TF>&quot;$(TeamBuildRefPath)\..\tf.exe&quot;</TF>

</PropertyGroup>

<Target Name="AfterGet">

<Exec WorkingDirectory="$(SolutionRoot)"

Command="$(TF) unshelve $(ShelvesetName)" />

</Target>

And pass in the shelveset name and owner. How can I pass in $(ShelvesetName) when starting the build using a BuildController object with BuildParams





Re: Team Foundation Server - Build Automation Change workspace

Aaron Hallberg - MSFT

In V1, you cannot do this - the only options that can be specified when starting a build are the build machine and the build directory. (In Orcas, you'll be able to pass arbitrary MSBuild command-line parameters into the build)

Your best bet, unfortunately, is to check out TfsBuild.rsp, stick whatever properties you need in there, and then check it back in (all before kicking off the build).

-Aaron





Re: Team Foundation Server - Build Automation Change workspace

Leon Mayne

Damnit!

OK, what if I specify in the response file:

Code Snippet

/p:ShelveSet=ActiveShelveset;TFSSERVICE

And then rename the shelveset I want to work with to ActiveShelveset under the build user's username (TFSSERVICE) and then call the build as normal with my unshelve task, deleting the shelveset after unshelving Would that work





Re: Team Foundation Server - Build Automation Change workspace

Aaron Hallberg - MSFT

Hmm - I guess something like this might work. I'm not sure about "renaming the sheveset ... under the build user's username", though - are you thinking that any arbitrary user's shelveset could be renamed and moved over to a new owner I'm not sure how easy that is. It looks like you have another thread on this issue over in the version control forum: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1459707&SiteID=1.

Good luck, and hope you get it all working!





Re: Team Foundation Server - Build Automation Change workspace

Leon Mayne

Yes, I meant unshelving and reshelving under the fixed name as in http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1456630&SiteID=1

I got it working last night and it seems to be fine. Thanks for the input.