How to update TFS workspace after computer name changes?

前端 未结 11 1466
感情败类
感情败类 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:18

    In

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

    run in CMD as admin this command

    tf workspaces /collection:https://SERVER_NAME.visualstudio.com/DefaultCollection /updateComputerName:OLD_COMPUTER_NAME
    
    0 讨论(0)
  • 2021-01-30 13:18

    Look at this link

    Vaccano said :

    This command did the trick:

    tf workspaces /updateComputerName:MyOldComputerName 
    /s:"http://MyServer:8080/tfs/MyCollection"
    

    It had to be run from the computer I wanted to assign the workspace to (that is how it gets the new computer name. >

    0 讨论(0)
  • 2021-01-30 13:18
    tf workspaces /updateComputerName:REPLCATEOLDCOMPUTERNAMEHERE /collection:REPLACETFSURL
    

    example:

    tf workspaces /updateComputerName:DESKTOP-42CLO97 /collection:https://testuserxx.visualstudio.com
    

    VS2017

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

    I had the same issue, also a VisualStudio.com account.

    I've tried what the prompt told me :

    enter image description here

    Like so :

    tf workspaces /updateComputerName:MyOldComputerName

    but I got back :

    The /collection option must be specified whenever /updateComputerName or /updateUserName is specified.

    In order to get the collection name I ran :

    tf workspaces

    which listed my collections and I got the name of my collection (...myusername.visualstudio.com...)

    Then I ran :

    tf workspaces /collection:http://myusername.visualstudio.com /updateComputerName:MyOldComputerName

    Didn't work as I got this:

    TF31002: Unable to connect to this Team Foundation Server: http://myusername.visuals tudio.com/defaultcollection. Team Foundation Server Url: http://myusername.visualstudio.com/defaultcollection.

    Possible reasons for failure include: - The name, port number, or protocol for the Team Foundation Server is incorrect - The Team Foundation Server is offline. - The password has expired or is incorrect.

    Technical information (for administrator): The remote server returned an error: (404) Not Found.

    Then I noticed that I've typed http instead of https, corrected, retried and it worked!

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

    What worked for me was typing

    tf workspaces /updateComputerName:MyOldComputerName /collection:"anything".visualstudios.com/DefaultCollection/
    
    0 讨论(0)
  • 2021-01-30 13:31

    I installed Sidekicks. It did not work for this issue, but this did:

    C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE>tf workspaces /updateComputerName:OldComputerName /s:"https://tfsServerName"
    
    0 讨论(0)
提交回复
热议问题