5

I'm trying to create a TFS workspace using the tf command.

It works perfectly from Windows command prompt:

C:\Tmp> "c:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe" workspace /new TemporaryWorkspace /s:http://srv:8080/tfs /noprompt

Exactly the same command fails when executed from a MinGW (msys) window (MinGW 3.18 under Windows XP SP2):

$ "C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/TF.exe" workspace /new TemporaryWorkspace /s:http://srv:8080/tfs /noprompt
Specify one workspace.

Other TFS commands (such as get, workspaces etc.) work correctly under MinGW.

Any ideas what went wrong?

pantelif
  • 8,524
  • 2
  • 33
  • 48

1 Answers1

0

I'm guessing that the shell you are using is parsing /n as a newline so not passing the option along correctly to tf.exe. However because of this issue tf actually accepts a hypden (-) instead of slash (/) for all options. So try something like:

$ "C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/TF.exe" workspace 
      -new TemporaryWorkspace 
      -collection:http://srv:8080/tfs/DefaultCollection 
      -noprompt

If you are doing this programmatically you might also need -login:username@domain:password

Martin Woodward
  • 11,770
  • 31
  • 45