3

I've connected to my cloud TFS. Added my solution to the source control under a specific projects collection.

Even applied a label. I see that I perfectly did it with TFS. When I double-click on the .sln VS does not open it. VS switches this solution to local Git repo (it seems like that). VS just opens up the Team Explorer on its Home page and shows Git-related menu options. I even turned off Git as a default VCS in options.

Update My team explorer connections look like this: enter image description here

When I remove my application from the local Git Repositories and try to open it, VS again attach it to the Local Git Repo.

Update 2 Seems like a solution from this thread on stackoverflow solves the problem.

Community
  • 1
  • 1
EngineerSpock
  • 2,575
  • 4
  • 35
  • 57
  • How did you add the project to source control? Can you share the detailed steps? – Eddie Chen - MSFT May 26 '16 at 07:02
  • I've set up my VS-online account. Connected. Downloaded all the sources to the bound directory. Then I copied my solution (it might be that it has already been captured by Git) to the root of my workspace directory. Then I added this folder through the Explorer in VS to the Source Control. As I remember, I did this the way I always did before many times. After that when I double-click on the .sln file, it opens up under Git. – EngineerSpock May 31 '16 at 15:34

1 Answers1

2

According to your info, it seems that you had added your solution to a Git team project. You can double check it through Manage Connections ( Team Explorer-Projects and My teams ) As you can see there are some difference between TFVC icon and Git icon. (Git icon is two people with a branch)

enter image description here

If the files add to a Git team project, you can remove the source control blinding for the solution and add remapping it to a TFVC team project.

Update


About removing blinding, the simplest way just right click the local repositorie and click "open in File Explorer " and remove .git folder. More details please refer this question: Remove git mapping in Visual Studio 2015

Community
  • 1
  • 1
PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • How can I "remove the source control blinding for the solution and add remapping it to a TFVC team project." After removing it becomes acquired by Git again. – EngineerSpock May 31 '16 at 15:36
  • 1
    Here is a full answer http://stackoverflow.com/questions/32304977/remove-git-mapping-in-visual-studio-2015 – EngineerSpock May 31 '16 at 15:49
  • Sorry, for the later reply. Gald you have figured out this issue. According to your desprction of the detailed steps. It seems VS trackes the files download from your TFS could as local Git Repositorie. Even though you had add it to a TFVC project collection. About removing blinding, the simplest way just like the answer mentioned right click the local repositorie and click "open in File Explorer " and remove `.git` folder. – PatrickLu-MSFT Jun 01 '16 at 03:11
  • Remove the `.git` folder!?! Isn't that folder a little bit important!?! That doesn't contain some random bindings, _that's your Git repository_. – Edward Thomson Jun 01 '16 at 04:31
  • @EdwardThomson Even though this is not a valid solution for those of people that do indeed work out of a git repository but do not wish to use Visual Studio's git features. However, it's suitable for OP's situation. Removing the `.git` folder, Visual Studio will no longer consider it a git project. – PatrickLu-MSFT Jun 01 '16 at 06:28