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 …
Solution
Local File System
C:\MyApp \MyApp.sln \Source \MyAppWeb \ClassLibrary1
Source Control (Team Foundation Server)
/Main /Build /Docs /Source /MyApp MyApp.sln /Source /MyAppWeb /ClassLibrary1 /UnitTests /MyAppWebTests /ClassLibrary1Tests /Tests
Key points
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.)
Repro Steps
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:
C:\MyApp \MyApp.sln \Source \MyAppWeb \ClassLibrary1
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
/Main /Source /MyApp /MyApp.sln /Source /MyAppWeb /ClassLibrary1
More Information
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
- Multi-solution