views:

153

answers:

2

With TFS 2010 build controllers/agents there is the option to set a version control path to custom assemblies that will be available on all build agents. The documentation states that this works for custom workflow activities as well as custom MSBuild tasks (about in the middle of the page):

http://msdn.microsoft.com/en-us/library/ee330987.aspx

Does someone know how this feature can be used for custom MSBuild tasks? I checked into version control an assembly with a custom task and set the option on our build controller to the correct version control path. But I don't know where the assembly will be on the build agent and how I can reference it from within my MSBuild targets file (i.e., UsingTask).

I even searched for the assembly on the build agent but could not find it...

Any help is very much appreciated!

A: 

It's possible, but the simpler solution is to just check your custom MSBuild tasks into a shared location in version control, then map that location into the source configuration for your build. That will also make it easier to use the MSBuild tasks for both desktop and server builds.

Jim Lamb
That may work as long as you have a single branch and rarely create new builds. But we regularly create new branches and builds for them and developers are often switching between branches. If it's possible, can you briefly describe how, so that we can test it and decide if it works for us?
Daniel
A: 

Here's the answer: the contents of the version control path is stored on the build agent in this folder:

C:\Documents and Settings\<user>\Local Settings\Temp\BuildAgent\<num>\

where <user> is the account that runs the build service, and <num> is the number of your build agent.

I have no clue why it was not there at first and what caused the build agent to finally fetch it from source control. Maybe just some patience is required if the version control path is changed or its contents gets updated?

Daniel