Creating a new workspace from the TFS command line - is the root working directory always added?

If I run tf workspace /new /noprompt to create a local TFS workspace, it automatically creates a display of the working folder $ / -> current-dir . This is annoying since I have to delete it before setting up the working folders that I really want. It also means that tf workspace will fail if another workspace has a work folder for any any subdirectory of my current directory.

eg. if D: is my TFS directory, starting D:\>tf workspace /new /noprompt ... will fail if any other working folder is configured, because the automatic matching / $ -> d: \ conflicts.

Can't create a workspace without initial work folders? Otherwise, I intentionally have to change the dir directory to some kind of "fake" directory to make sure.

+4
source share
2 answers

Use an existing workspace as a template: tf workspace /new /template:<wokspacename>

Alternatively, use the tf workfold .

0
source

I found another solution to this problem. The tf workspace /new command automatically creates a mapping between $/ and the current directory. Therefore, you need to do the following:

  • Change current folder
  • Run the tf workspace /new command. It creates an unnecessary display of $/
  • Run the tf workfold /map command, which maps the required TFS folder to the current folder. It overrides the unnecessary $/ value with the value you provide.
+2
source

Source: https://habr.com/ru/post/1490720/


All Articles