Multiple copies of a solution on one user/machine with TFS 2010
Is there a way 开发者_如何学Cto pull two copies of a single solution from TFS 2010 for the same user/machine?
You can have multiple copies of a single solution either by having multiple branches in TFS or by setting up different workspaces.
The branches are good for when you need to be able to check in code for both copies of the solution, and have other people work with it too.
I use the multiple workspaces when I need to have a last good state of the code on my dev box while at the same time and still working on new features.
Sean L's answer is correct.
My addition is that I coded up some command line calls to do it. Makes the "What exactly is going on here" stuff a little clearer, IMHO.
Put the below in .bat file. And save it to c:\ (anywhere you want)......if your BASEDIRECTORY is set to c:\ (somewhere) (or match the drive letters).
set __MYWORKSPACENAME=MySuperCoolNewWorkSpaceName001
set __BASEDIRECTORY=c:\tfsstuff\
MD %__BASEDIRECTORY%
CD %__BASEDIRECTORY%
set __tfExe=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\TF.exe
"%__tfExe%" workspace /new %__MYWORKSPACENAME% /collection:http://myteamfoundationserver:8080/tfs/my_super_cool_projects /noprompt
"%__tfExe%" workfold /map $/MyBranch %__BASEDIRECTORY%\MyBranch
"%__tfExe%" get %__BASEDIRECTORY%\MyBranch\ /recursive /noprompt
set __BASEDIRECTORY=
set __MYWORKSPACENAME=
set __tfExe=
精彩评论