When my company installed TFS (Team Foundation Server) we put it on a VM and since my company was in the stone age still, there was no domain or internal DNS so we connected directly to the IP address.
Well, the time came to move everything into a data center and all the VMs to a new giant server. As you can imagine, the IP for the TFS VM was changing. No one wanted to deal with trying to check-in or shelve their changes. The easiest solution was to trick Visual Studio into using the new server without disturbing what we already had setup. After messing around, I figured out how to do it.
Steps 1: The solution
Open your .sln in notepad. The setting you want is ‘SccTeamFoundationServer‘. Just do a find for it and it will be right around the middle of the solution file. Change from
Save your changes and the close notepad. Note: file will be marked as read only. Just uncheck Read only in file properties.
Step 2: Team Explorer
Open Visual Studio (do not have any solutions open).
- Click the View menu and then Team Explorer.
- Right click on the server node (220.127.116.11) and choose ‘Disconnect’.
- Click the ‘Add existing team project‘ button and then click the ‘Servers‘ button.
- Click on ‘Add‘ to add a new server. Enter the IP address and leave the defaults.
- Click ‘OK’ and then click ‘Close‘
- From the drop down, choose the new server (will be labeled as the IP you entered). Click the ‘(Select All)‘ check box and then click OK. The server information will start to refresh, wait until it’s done.
At this point, close Team Explorer window and open the solution. There will be a dialog
“There appears to be a discrepancy between the solution’s source control information about some project(s) and the information in the project file(s)”.
Just click OK and wait for the solution to load.
That’s all there is to it. You don’t have to check-in or shelve any changes you might have waiting.