TFS was setup on a VM and we have 6 devs that are using it. We've been going for over a year. We have to move the VM to a new data center and the IP address is going to change. We all referenced the TFS server by it's IP instead of HOST or DNS (yes, i know!)
Everything is hardcoded as the IP address. How do we update the local config to piont to the new server IP?
I've found the 'Servers' entries in the registry and I've found that the solution file has the IP to the server hardcoded into it.
Is there an easy way to make these changes without manually editing the files/registry?
Here is what I have done to solve my issue.
Steps
- Edit EP2.sln in notepad. Change
from SccTeamFoundationServer = http://123.123.123.123:8080/
to SccTeamFoundationServer = http://123.123.123.124:8080/
Save. Note: file will be marked as read only. Just uncheck Read only in file properties.
- Open VS (do not have any solutions open). View -> Team Explorer 3. Right click on the server node (123.123.123.124) and choose 'Disconnect'
- Click the 'Add existing team project' button and then click the 'Servers' button 5. 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.
Done.
The team foundation server used by a solution is hardcoded in the .sln
file. You will see a section similar to this:
SccTeamFoundationServer = http://192.168.1.100:8080/
You also need to modify the TFS address in Team Explorer in Visual Studio.
The answer provided by DustinDavis is correct, however one thing worth noting is that Visual Studio may have cached your connection to Team Foundation under your user settings. After following Dustin's instructions, if you still get an error message that mentions your old IP address, try emptying the cache folder at the following location:
C:\Users[USER]\AppData\Local\Microsoft\Team
Foundation\X.0\Cache
This should force Visual Studio to use the new IP address that you provide in the sln file.