Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
456 views
in Technique[技术] by (71.8m points)

tfs - Modular TeamBuilds

I have 3 TFS Builds (2 Dev and 1 Cert).

I would like to modularize the builds so I don't have to edit 3 files each time I make a change to the common items.

The problem I have is that Only the items in the build folder (under TeamBuildTypes) are automatically retrieved by the Team Build. I can put in code in my build process to get other files, but by then it is too late.

Here is the scenario that I have. I make a "Common" location for common tasks. I then went and made changes to that file. Because the file does not down load until my build process tells it to down load it is retrieved too late (the import has already happened and the MSBuild process has constructed the build targets in memory).

I thought about adding it to the build's workspace, but then it will be retrieved in the Get Sources target (which is also too late).

I can't see a solution that will not have me duplicating the file or not using source control...

Any Ideas?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

There's no "ideal" solution to this problem in Team Build 2008, your best option is to put the common things on the build machine in $(MSBuildExtensionsPath) which resolves to C:Program FilesMSBuild and then reference them from there.

If your build configurations are very similar you could:

  1. Point all of your build definitions to a single configuration folder.
  2. Put the common build logic in TFSBuild.proj.
  3. At the bottom of TFSBuild.proj add <Import Project="TFSBuild.$(BuildDefinitionName).proj" />.
  4. Add the configuration that varies between build definitions in TFSBuild.<BuildDefinitionName>.proj.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...