andrewb
andrewb

Reputation: 3095

How to add an existing project to 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.

Upvotes: 24

Views: 47307

Answers (1)

Andy Li-MSFT
Andy Li-MSFT

Reputation: 30362

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

Upvotes: 51

Related Questions