Question

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!

Was it helpful?

Solution

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?

OTHER TIPS

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.

I use $(Temp)\BuildAgent\$(BuildAgentID) in TFS 2012. Note that in TFS 2010 it was slightly different. Don't expect this to be stable for future releases.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top