locked
Sharing components between projects RRS feed

  • Question

  • I'm trying to sort out how to set up our TFS install; I've so far spent most of the day trying to decided how to handle project references across Team Projects in TFS and am going round in circles and was hoping someone could see if I'm on the right track here. 

    At the moment I use VSS, and we label all versions of our source as they are released and binaries of shared components are dropped on a network share to be included into current projects.  This does not work very well if you ever go back to label and try to rebuild it as the referenced binaries are hopeless out of sync!

     

    So I am hoping to rectify this!  We are planning on using branch on release number for our source control.  Very important is whatever we end up with must be buildable under Team Build.

     

    What we have is somewhat like this at the moment. 

     

    $Component1

       trunk

          bin  <- all projects copy there output here

          Solution1

             ClassLib1

          Solution2

             ClassLib2

       release

          v1.0   <- Branched from $Component1/trunk

             bin

             Solution1

                ClassLib1

             Solution2

                ClassLib2

     

    $Project1

       trunk

          bin   <-   Contains baseless merge from $Component1/release/V1.0/bin 

          Solution3

             Project1

       release

          v1.0   <-   Branch from $Project1/trunk

             bin

             Solution3

                Project1

     

     

    So what I am planning on doing at the moment is whenever I need to update Component1 in $project1, I do a baseless merge from  $Component1/release/vx.x/bin onto $Project1/trunk/bin. 

     

    Is this a good way of doing it.  As far as I can see this means the release branches will always build with the correct version and I can’t see any other way to do it.  Is there a better way to copy from one branch to another than using a baseless merge?

     

    Thanks

     

    Stephen.

     

    Monday, March 19, 2007 9:07 PM

Answers

All replies

  • Hello Stephen,

    This is a common problem a lot of us face. But the final answer needs to be determined by you, based on your environment and development practices. So instead of telling you what to do, here are two useful links that at the very least will make you go around in circles a couple more times ;-).

    http://blogs.vertigosoftware.com/teamsystem/archive/2006/08/22/3403.aspx
    http://geekswithblogs.net/murraybgordon/archive/2005/10/25/58103.aspx

    Is you stay with your current configuration/scenario. Baseless merges are probably your best bet.

    Hope this helps.

    -OmarV

    Tuesday, March 20, 2007 3:50 AM
  •  

    Assuming that I stick with the $(SolutionRoot)\bin option, is there a way to link the contents of this directory to a solution?   The solution builds fine in Team build as it by default pulls the entire workspace (modified tfsbuild.proj in line with http://blogs.msdn.com/manishagarwal/archive/2005/12/22/506635.aspx to only get what I need).  But I was wondering if I could do something like that so when I do 'Open Solution from Source Control...' in VS it could pull the bin directory out of source control as well rather than having to rely on me to remember to refresh it?  I would very much like to be able to do get latest on the solution and have it refresh the bin dir too.  Is there some sort of container project type I could include into my solution to manage these external dlls?

    Thanks,

    Stephen

    Tuesday, March 20, 2007 4:57 PM
  • Sure.  Rightclick the root node in Solution Explorer -> Add -> Existing Item.  You can also group them into "Solution Folders" (rightclick -> Add -> Solution Folder).
    Tuesday, March 20, 2007 7:54 PM
    Moderator
  •  

    Thanks, for some reason I couldn't get to work first time (errors about files already under source control) but seems to work now :)

    Wednesday, March 21, 2007 12:15 AM