22
votes

I have a Visual Studio online Team Project with a repository. I have been using this with VS 2013 for a while now.

I installed VS 2015 and connected to Visual Studio online in team explorer and chose the project in question.

however, under solutions it says:

You must clone the repository to open solutions for this project.

I did go to settings and edit my global settings to set my repository root correctly. (same location as set in Visual Studio 2013)

But, it is already cloned and on my local machine.

Why isn't VS 2015 Team Explorer seeing the existing repository folder? How can I fix this other than deleting the folder and doing clone again?

4

4 Answers

28
votes

Because Visual Studio 2013 maintains a list of the repositories that it's seen (and their remotes) separately from where VS 2015 stores this information.

Open Team Explorer, go to the Connect page, and in the Local Git Repositories section, click the Add button. Navigate to the repository that you cloned previously.

Since you're connected to the server, VS will realize that the repository you just opened is a clone of a repository in your server and enable the TFS functionality.

1
votes

At least for Visual Studio 2017 and Visual Studio Team Services:

If you have several repositories in your Team Foundation Server or VSTS project make sure you are connected to the specific repo your clone is for, not just the project. You can then enter the location at the bottom of the "Connect to Project" dialog or just add it as described in the other answer.

0
votes

Or just close VS, then navigate to the directory that you have cloned and open the solution in your newer Visual studio.

You will see VS changes "applicationhost.config" file, and then remembers that it was cloned

0
votes

I suddenly had the same problem. VS2015 didn't longer recognize, that one of the local repos is a clone and I should make a new clone to "[ProjName]2"...

For me it helped to reconnect to the remote Team Project:

  1. Open the local repository solution
  2. Go to the connection manager ("Manage Connections")
  3. Uncheck the remote project ("Team Projects")
  4. Close Window by click on Connect
  5. Reopen the Connection Manager
  6. Check the Team Project again and "Connect"

and everything was fine again!