1

My visual studio solution has projects from 3 disparate Git repositories (no sub modules, etc.). I have a default project, web site, and various class libraries. When starting Visual Studio 2015 the default Git repo is that of one of the class libraries and not the main web site I'm typically working in. Every time I start work I have to go to the Team Explorer to double-click the connection to the repo corresponding to my main/startup project. I'm not using VSTS, it's a separate Git hosting provider (self-hosted).

How can I tell Visual Studio to select this Git repo as the one to activate by default for this solution? All Git repo's are in D:\Dev as sub-folders to the default path so all Git repo's are visible in the Team Explorer so the default path there is D:\Dev.

Neal
  • 9,487
  • 15
  • 58
  • 101

1 Answers1

0

When opening a solution, Team Explorer will check the solution and project folders to see if any of them are in Git repos. IIRC, the order is to check the solution first, followed by the projects in the order in which they are returned from the solution. The first Git repo that is found will be opened since Team Explorer currently only supports having a single repo open at a time.

I suspect that the class library is the first project we see in the list, so that is the repo we open. This is the as-designed behavior for VS 2013-2017, but we are seeing customers' solutions use more than one repo more frequently now. We plan to improve this behavior in a future release, but I cannot commit to a specific release at this time.

Hope this helps.

Chad B
  • 1,416
  • 9
  • 12