Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS.2017 cannot add project to TFS Source Control

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?

like image 549
Lord of Scripts Avatar asked Jun 19 '17 18:06

Lord of Scripts


People also ask

How do I add a project to Source Control in Visual Studio 2017?

a Right-click the project in the Solution Explorer pane and select Add Project to Source Control.

How do I add an existing project to TFS Source Control?

In the Connect to Team Project dialog box, select the TFS instance you want to connect to, select the team project collection, select the team project you want to add to, and then click Connect. In the Team Explorer window, expand your team project, and then double-click Source Control.

How do I add a project to Source Control?

On the Project tab, in the Source Control section, click Use Source Control. In the Source control Information dialog box, click Add Project to Source Control. In the Add to Source Control dialog box, in the Source control tool list, select Git to use the Git source control tool provided by the project.

How do I add a project to TFS in Visual Studio?

In the Team Explorer window, right-click the team project collection, and then click New Team Project. In the New Team Project dialog box, provide a name and a description for the team project, and then click Next.


1 Answers

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.

like image 150
Marina Liu Avatar answered Nov 16 '22 02:11

Marina Liu