Question: What are the proven practices for workspace mapping?

- J.D. Meier, Jason Taylor, Alex Mackman, Prashant Bansode


Workspace mapping is the means by which you map files and folders on the server to a location on your local hard drive.

Consider the following practices for creating workspace mappings:
  • Create mappings at the team project root level. For new team projects, map your team project root ($/MyTeamProject) to a folder with the same name on your local drive; for example, C:\TeamProjects. Because mappings are recursive, your entire local folder structure is created automatically and will be exactly the same as the structure in source control.
  • Use a unique local folder path on shared computers. Two users of a single computer cannot share the same workspace mapping. For example, you and a colleague cannot map the same team project ($/MyTeamProject) to the same folder on the local computer. Instead, create mappings beneath My Documents (although this leads to long location paths) or establish a team folder naming convention on the local computer (e.g., C:\TeamProjects\User1, C:\TeampProjects\User2 etc).
  • You may not need the entire tree. To improve performance and reduce disk size requirements, only map the files you need for your development project. In general, you will only need the files and projects associated with the solution on which you will work.
  • Avoid using workspace mapping to support cross-project dependencies. In general, you should avoid dependencies that cross team projects and try to have all the related/dependent solutions/projects under the same team project. This reduces the need for build script customization. If you have a dependency, use project references to define the dependency, or branch the dependency from a shared project into your project. You should avoid file references because they are more difficult to manage. The exception is when the dependent project is developed in parallel and you need to make real-time changes. In this case, you can consider using the workspace mapping. You can still consider branching to create a buffer of isolation if the dependent code is causing too many breaking changes.

Additional Resources

Last edited Jul 18, 2007 at 11:05 PM by jtaylorsi, version 7


No comments yet.