开发者

How do I set the "Version control path to custom assemblies" for custom MSBuild tasks

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!


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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜