VSTS Tip: how to structure projects and solutions in TFS source control

Here is some advice for structuring projects and solutions in TFS source control from the IDE, this was cut and paste from an internal email from a PM on the TFS source control team, your mileage may vary:

  • Create a workspace that maps $/TEAMPROJECT onto your local disk.  This is really important because we’re going to create the projects and solutions under this folder and lay them out so that their relative paths according to this mapping look like what you’ve described below.  For this example, let’s assume we’ve mapped $/TEAMPROJECT to c:srcTEAMPROJECT
  • Create a new empty solution and save it in c:srcTEAMPROJECTsolutions.  You can go ahead and add it to source control, or wait until you’ve setup the 3 projects below.
  • Add to the solution the projects that you need, but make sure you specify their paths as peers to the c:srcTEAMPROJECTsolutions folder instead of underneath it.  If you’ve already added the solution to source control, these will automatically get added with the right paths according to your mappings.  If you haven’t already done so, add the solution to source control.
  • Checkin if you haven’t already.
  • Close the solution.
  • Create a new solution file and save it in c:srcTEAMPROJECTsolutions.  Add it to source control.
  • Rt-click on the new solution and choose Add->Existing Project… and add the appropriate projects for that solution.  These projects should show up with padlock icons as they’re already under source control.
  • Checkin the newly added solution.
  • Repeat steps 6-8 for each solution that you want.
Comments (2)

  1. Martin says:

    Maybe it’s just getting late (10pm here) and I’m tired, but what is the advantage of arranging the solutions and projects in this way?

  2.        Here’s a collection of interesting articles I came across in the morning’s blog…

Skip to main content