How to update TFS workspace after computer name changes?

前端 未结 11 1467
感情败类
感情败类 2021-01-30 13:06

I renamed my computer name, and now my TFS workspace is broken in Visual Studio 2012.

When I type:

tf workspaces /computer:ABOTONJIC-PC /owner:* /format:         


        
相关标签:
11条回答
  • 2021-01-30 13:31

    To get this to work in Visual Studio 2017 use the following (new location)

    C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe workspaces /collection:https://youraccountnamehere.visualstudio.com /updateComputerName:OLD-COMPUTERNAME
    

    Hope this saves someone some time!

    0 讨论(0)
  • 2021-01-30 13:34

    Open the visual studio command prompt and type the following command

    tf workspaces /updateComputerName:oldcomputername  /s:http://tfservername:port#/tfs
    

    for example

    tf workspaces /updateComputerName:abc-PC  /s:http://mytfsserver:8080/tfs
    

    You can run the following command before and after running the above command, this is just to check the workspaces information on your computer.

    Remember: run all these commands on client computer (which is renamed) and not on the computer where TFS server is installed.

    If user name is also changed then run the following command

    tf workspaces /updateUserName:oldUserName  /s:http://mytfsserver:8080/tfs
    

    Hope it will help.

    0 讨论(0)
  • 2021-01-30 13:39
    1. Install Team Foundation Sidekicks. It's free.
    2. Open the Workspace Sidekick, click Search, and select your workspace from the list.
    3. Click the blue computer icon to Update Workspace Computer Name and you're done.
    0 讨论(0)
  • 2021-01-30 13:40

    You can add new workspace then use vs 2017 delete your previous workspace:

    0 讨论(0)
  • 2021-01-30 13:41

    Open Command prompt and type as shown in below

    C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE

    and type the following code with your credential

    tf workspaces /updateComputerName:OldComputerName /s:"https://tfsServerName"

    In CMD prompt

    C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE>tf workspaces /updateComputerName:OldComputerName/s:"https://tfsServerName"

    0 讨论(0)
提交回复
热议问题