tfs2010 - How to create Explorer Shortcuts to specific TFS 2010 Source Control Paths -


we moving projects old file based storage (don't ask) tfs. our coders still used find code in file system.

since talking 100 projects each sort of history, have move them 1 one. resulting have live time existing file structure mixed tfs managed files.

to make life easier our coders, create shortcut in filesystem, each project moved. developers can if project has been moved, , if yes, go double click open tfs source control explorer pointing directly correct project.

is possible? response.

i found simple solution needs, based on small batch script, you'll have click. it's not shortcut though can still create shortcut of batchfile.

here's script:

call "%vs100comntools%\..\..\vc\vcvarsall.bat" x86 reg add "hkcu\software\microsoft\visualstudio\10.0\teamfoundation\sourcecontrol\explorer\<guidoftfs>" /v "scemostrecentpath" /d "$/<pathtotfsproject>" /f devenv /command view.tfssourcecontrolexplorer 

in fact combined 2 ideas found in separate sources:

1. start vs source control explorer

2. manipulate registry open source control explorer in specific path

with command devenv /command view.tfssourcecontrolexplorer can start vs , automatically open source control explorer. unfortunately there no way give parameter point directly location wish. noticed vs2010 seems persist last used path , reopens place on restarts. quick research resulted in registry entry

hkcu\software\microsoft\visualstudio\10.0\teamfoundation\sourcecontrol\explorer\058104ed-f0e2-4126-9ccc-0e37e19c4f91\scemostrecentpath

by manipulating value of scemostrecentpath can trick vs2010 open source control explorer path in there. keep in mind: need replace 058104ed-f0e2-4126-9ccc-0e37e19c4f91 guid of tfs installation.


since using vs 2010 installation paths differ, implemented path dynamically making use of vs100comntools variable. first set tfs command line environment:

call "%vs100comntools%\..\..\vc\vcvarsall.bat" x86` 

then change registry:

reg add "hkcu\software\microsoft\visualstudio\10.0\teamfoundation\sourcecontrol\explorer\[putyourtfsguidhere]" /v "scemostrecentpath" /d "$/<yourtfspath>" /f 

finally simple call of devenv.exe source explorer command:

devenv /command view.tfssourcecontrolexplorer 

Comments