I hit a problem recently where, after an attempt to connect to my local TFS server failed, I was left in a situation where Visual Studio would refuse to automatically connect to the TFS server, even when it was available. This meant that auto-checkouts would not work. When loading a solution, I would get the message: “The solution was offline during its previous session and will remain offline”.
I finally found the solution here. Since that appears to be the only page that shows up in google describing this, I will duplicate the solution here:
1) Close Visual Studio
2) Edit the following registry entry: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\Servers\[Your TFS server name]
3) Set AutoReconnect = 0
4) Set Offline = 0
When you next open your solution, you will be prompted to reconnect to the TFS server.
UPDATE: 10th January 2012
In Visual Studio 2010, it appears that the registry location has changed to the following:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\TeamFoundation\Instances\[Your TFS server name]\Collections\[Your TFS server name]
Also, the AutoReconnect property has been removed.