views:

25

answers:

1

Hi there,

I thinking about switching to TFS2010 for my team. Right now we're using NANT scripts, and I'd like to know how the following issue could be solved with TFS2010.

The team is working on a framework which is made of several solutions (.sln). In each solution, we have a "References" folder where we put the assemblies used by the solution.

For example:

SolutionA

  • ProjectAA
  • ProjectAB
  • Reference (empty)

SolutionB

  • ProjectBA
  • Reference
    • ProjectAA.dll
    • ProjectAB.dll

During the build, we first build the low-level solutions, and we move the resulting assemblies in the appropriate "Reference" folder. Then we build the other solution, and we move the resulting assemblies in the other solutions.

Do you know how we can do that with TFS2010 ?

Thanks !

+1  A: 

That should be relatively easy to do. For each set of assemblies that you need to share around, branch them from a static location in your Source Control structure. Now grab one of your TFSBuild.proj build files (these replace your NAnt file), and override the AfterCompile target for Solution A, or the BeforeCompile target for Solution B, then use the tf command to merge your changes to the branched locations. Once merged, use the tf command to also do a checkin at that target location.

Note that there may be task libraries out there which wrap the tf command for you, but i don't have a reference on hand so i can't tell you which one to use. I personally like to invoke the tf command directly by using an Exec task.

Here is the syntax guide for the tf merge command, you will probably just want to use the T version parameter:

tf merge [/recursive] [/force] [/candidate] [/discard] [/version:versionspec]
         [/lock:(none|checkin|checkout)] [/preview] [/baseless] [/nosummary]
         [/noimplicitbaseless] [/conservative] [/format:(brief|detailed)]
         [/noprompt] [/login:username,[password]] source destination

Versionspec:
    Date/Time         D"any .Net Framework-supported format"
                      or any of the date formats of the local machine
    Changeset number  Cnnnnnn
    Label             Llabelname
    Latest version    T
    Workspace         Wworkspacename;workspaceowner
slugster
I'm going to give a try this way. I'll let you know if it works properly. Thank you for taking time to explain all that :-)
Jalfp