Reputation: 89
We recently started using TFS 2017 (on prem). Previously we were using TFS 2015 (on prem). Every time I start VS 2015, I have to go to the Manage Connections dialog in Team Explorer and re-connect to the new server. I used to not have to do this, as VS would reliably remember the connection.
There are others on my team who have this same issue, while others do not (i.e. their VS still automatically connects as always.)
Any advice on how to solve would be appreciated.
I found some things about how to turn this desired behavior OFF, involving registry settings. I will also point out that once you connect to the TFS, it stays connected... We don't have issues with it losing it after that.
Thanks, Gerald
MORE INFO: We use Git source control. Our team project has several repositories. When VS starts, there is no connection to TFS. When I add one, with Manage Connections, it seems to pick a repo at random. Eventually by connecting/disconnecting/connecting it will present the desired repository and I can open our solution. Is there a way to tell it which repository to use, instead of it just picking one randomly?
After I connect to my team project, I see this:
Others have reported I should be seeing a list of local and remote repositories.
Upvotes: 0
Views: 55
Reputation: 30432
Generally if you close the VS with TFS connected, then it will automatically connect to the TFS when you start VS again.
Please try to remember credentials: How can I make TFS remember my credentials when opening Visual Studio, then check it again.
If that still not work, please try below things to narrow down the issue:
Close any opened VS instances, Clean VS caches (delete the files under below path), then start VS to reconnect the TFS.
C:\Users\[user]\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache
C:\Users\[user]\AppData\Roaming\Microsoft\VisualStudio\14.0\Team Explorer
Reset the userdata, then connect to TFS again.
cd C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
devenv.exe /resetuserdata
For the issue you mentioned in comment:
Seems it's related to workspace mapping. Just try to delete the existing workspace, then configure the workspace again. Or remapping the existing workspace to let the TFS identify it.
UPDATE:
For TFVC you need to navigate to Manage Workspace (Team Explorer > Solutions > Workspace > Manage Workspace) to remap the existing workspace. For Git you need to Clone the remote repository first. See Get Started with Git and VSTS for details
Upvotes: 0