4

When I open a project in VS 2019 (or 2017) I get the message:

The solution you are opening is bound to source control on the following...Would you like to contact this server to try to enable source control integration.

I click Yes and receive:

The solution appears to be under source control, but its binding information cannot be found...

VS 2015 opens projects just fine. What is the deal?

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
CodenameCain
  • 573
  • 1
  • 9
  • 22
  • I have connected before and I don't really want to try again considering I have submitted an issue of connecting taking hours : https://developercommunity.visualstudio.com/content/problem/527915/connect-to-a-project-with-tfs-server-takes-an-hour.html – CodenameCain Apr 26 '19 at 19:14
  • I pinged the maintainer of Team Explorer. – jessehouwing Apr 26 '19 at 20:18
  • You could try to run `tf vc status $/ /collection:https://yourtfsserver` from a Visual Studio 2019 command prompt to trigger the connection directly. – jessehouwing Apr 26 '19 at 20:21
  • That is correct. – CodenameCain Apr 26 '19 at 20:23
  • This is working. However, we have a collection per client and I find I need to run this command for each client's collection before I open a project in that collection. So, it works but it is situationally inconvenient - which is not your fault. Thank you. – CodenameCain Apr 26 '19 at 20:38

1 Answers1

2

To make sure the connection and workspace cache of your Team Explorer 2019 is populated, it needs to connect to the server at least once before it will know how to bind the solution to source control.

You can do this through the Connect to... option in Team Explorer.

If, as you described, that dialog is giving you lemons, the alternative is to connect the workspace through the commandline. Open a Developer Command for VS 201x (matching the version of Visual Studio you're trying to connect from) and from there issue the following command to force a connection:

tf vc status $/ /collection:https://yourtfsserver

enter image description here

After this one-time command that workspace should work again. if you have a lot of workspaces on your machine, or a lot of Project Collections on your TFS server, creating a little batch script may be useful ;).

jessehouwing
  • 106,458
  • 22
  • 256
  • 341