Skryptowa linia poleceń TFS dla uzyskania najnowszej wersji, Check Out I Check in, programowo
Używam WinXP, VS 2008 i Team Explorer, aby połączyć się z serwerem Team Foundation.
Muszę wykonać skrypt (np. BAT file script):
- Pobierz najnowszą wersję folderu w projekcie Team.
- Sprawdź pliki folderu w projekcie Team.
- Sprawdź pliki folderu w projekcie Team.
Mój TFSProject to $/Arquitectura/Main/
, mapowany do ścieżki C:\TFS\Arquitectura
Czy ktoś ma jakiś przykładowy kod lub sugestie?
4 answers
Użyj tf.exe w wierszu poleceń.
W poniższych przykładach %PathToIde%
znajduje się zwykle na ścieżce takiej jak ta: %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE
, lub w systemie Windows x64: %ProgramFiles(x86)%\Microsoft Visual Studio 10.0\Common7\IDE
(w zależności od wersji Visual Studio i ustawień instalacji).
przykład dla get:
cd C:\TFS\Arquitectura
"%PathToIde%\TF.exe" get $/Arquitectura/Main /recursive
przykład realizacji zamówienia:
cd C:\TFS\Arquitectura
"%PathToIde%\TF.exe" checkout $/Arquitectura/Main /recursive
przykład dla checkin:
cd C:\TFS\Arquitectura
"%PathToIde%\TF.exe" checkin $/Arquitectura/Main /recursive
Zobacz więcej informacji na linii poleceń tf.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2015-05-27 13:18:49
"C:\Program Files (x86) \ Microsoft Visual Studio 9.0 \ Common7 \ IDE \ tf.exe " get "$ / ProjectName / Main " / force / recursive
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2012-05-17 14:57:08
Pobierz aktualny kod Dla Windows 7 64bit
"%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe" get /recursive
To mi pomogło.Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2014-03-07 11:25:51
Aktualizacja dla VS2017
C:\Program Files (x86) \ Microsoft Visual Studio \ 2017 \ Enterprise \ Common7 \ IDE \ CommonExtensions \ Microsoft\TeamFoundation\Team Explorer \ tf.exe "
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2018-02-08 19:11:06