Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add an existing project to TFS

Tags:

tfs

I have a solution with 6 projects already in TFS. Each project is in its own folder.

I right clicked the solution and added a new project, so the solution XML knows about my new project.

I checked in the solution file, but the newly added project is not listed in the source control explorer, presumably because I never checked in the files.

My question is how can I check in the project and ensure that the new project files go into its own folder?

If I right click in the root of the solution and select the new project files the "Destination source control folder" is set to the root - do I need to first create a folder in TFS which matches the name of my project folder? That seems backwards.

like image 398
andrewb Avatar asked Jul 18 '17 21:07

andrewb


People also ask

How do I connect an existing project to TFS?

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.


1 Answers

Sounds the solution is not in source control when you add the new project. Normally the new project will be created in the solution root folder and the files will be added in source control automatically if the solution has already been in source control.

So, please open the solution root folder with Windows Explorer to check if the new project exists in the workspace (solution root folder). If the project exists, then follow below steps to add the existing project in source control.

  1. Navigate to solution root in Source Control Explorer
  2. Right click in Source Control Explorer and select Add items to folder
  3. Select the Project folder you have created, then Next
  4. Select items to add or Excluded, then Finish
  5. Check in the changes

enter image description here

like image 103
Andy Li-MSFT Avatar answered Oct 13 '22 15:10

Andy Li-MSFT