VS.2017 cannot add project to TFS Source Control
Asked Answered
K

2

8

Visual Studio 2017 has been the crappiest so far. I have an existing solution that I want to add to source control (VisualStudioOnline.com) but every time I do it simply creates a GIT repository locally and I DO NOT want GIT. It does not even ask.

I changed the options to default to VisualStudioOnline. But when I try to add the solution I select Manage Connections, then I see the project repository I created on VSO website and click on it then Connect. After a while the window simply disappears giving no error and the Team Explorer still says I am Offline, so it was not added to TFS. My VS.2017 however is connected to my VSO account.

What is the problem here? can't they even give a hint as to why it is not connecting?

Kiss answered 19/6, 2017 at 18:14 Comment(2)
Try to refer to these steps and check the result: 1. Open Team explorer and connect to your TFVC team project 2. Create a new folder (e.g. D:\Project) 3.Click File > New > Project to create a new project in D:\Project 4. Right click the solution >Add to source controlLipoma
I agree with the OPs frustration It should be seamless and without a hint. I was facing the same issue and was frustrated setting the Source Control under Tools to "Visual Studio Team Foundation Server" and getting a git repo while adding the files to source control. It should ask which source control the user wants to use. Why to default to git?Bcd
I
5

So you want to add project to TFVC VCS not git in VSTS (visual studio team services). First you should create a TFVC repo on VSTS, then connect with VS2017, finally add the existing project in source control and check in. Detail steps as below:

  1. Create a TFVC repo by creating a new project or adding a new repo for existing project in VSTS.

    enter image description hereenter image description here

  2. Connect with VS2017.

    VS -> Team explorer -> Manage connections -> connect to project -> make sure your email for VSTS acount is selected -> select your new created TFVC repo -> connect -> Map & Get. enter image description here

    enter image description here enter image description here

  3. Add the existing project to source control.

    Copy the project file to the subfolder that you just mapped -> Team explorer -> source control explorer -> select the folder with the TFVC repo you created -> click Add Items to Folder -> select the project -> Finish.

    enter image description here

  4. Check in changes to VSTS.

    Now the project is added in source control, you can click pending changes to check in the project to VSTS.

Ineffable answered 20/6, 2017 at 1:53 Comment(0)
H
1

Yes, it is not intuitive and I hate it too. These are the most "automated" steps:

  1. Open the solution you want to add to VSTS.
  2. Go to Team->Manage connections...
  3. You will see all your VSTS connections, I happen to use two VSTS, one from visualstudio.com and one on-premises. Choose the connection you want and right-click then select connect.
  4. Once connected, select File->Source Control->Add solution to source control...
  5. It will show up the VSTS dialog and let you choose a folder for your solution.
  6. Done.

Cheers,

MarianoC

Hallow answered 1/3, 2019 at 18:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.