I’ve seen a few customers asking how to structure projects for Team Foundation Server. I don’t blame them. Finding a structure that works well for you can be tricky, particularly if you don’t have the benefit of hind-sight or a bunch of reference examples to draw from.
My team spent some time this past week evaluating various approaches and lessons learned from various projects We boiled it down to something that seems to be working well, and distills what’s worked for some teams. With the caveat that we’re still evaluating, here’s what we learned …
Local File System
Source Control (Team Foundation Server)
Here’s a few highlights about this approach:
- On the client side, we explicitly creat our solution file up front instead of rely on defaults
- The project folder containts one master solution.
- The project has source and unit tests. Loading the solution for the project, loads the source and unit tests
- The Main folder in TFS holds the project assets (Build, Docs, Source, Tests). Using Main lets us create other folders for potential branches (Development, Production, Maintenance … etc.)
Here’s a brief walkthrough to test using a file-based Web:
- Create a blank solution in VSTS
- Create a source folder on the file system (C:\MyApp\Source)
- Add new Web project (C:\MyApp\Source\MyAppWeb)
- Add new Class Library (C:\MyApp\Source\ClassLibrary1)
Verify your folder structure on your File System:
Adding to TFS
- Add your solution to source control
- Create a Main folder
- Create a Source folder beneath Main
Verify your folder structure in Source Control Explorer
You should know that while I talked through the single solution scenario, there are additional patterns. Here’s the key patterns we see:
- Single solution
- Partitioned single solution
You can find more on these patterns at Team Development with Visual Studio .NET and Visual SourceSafe. You should also know that we have a few How Tos on structuring your projects coming your way. We’ll post them to our VSTS Guidance Project.
Share Your Story
If you’ve got lessons learned the hard way or practices to share, I’d like to hear them. Now’s a great time to share since we’re actively building guidance. Either comment here or write a post and leave a link.