2
votes

I have a Visual Studio solution with 6 projects in it.

In one of the projects I created a folder to store some classes in there. I created the folder via Project -> New Folder and then I copied the classes into there.

In Source Control Explorer, at the project level, I can right click and click Add Items to Folder, but I am unable to add the new folder to source control.

If I select the folder and click Next it shows me the files inside the folder, with the destination folder being the project root.

Is there a way in Visual Studio 2015 to add an existing folder to TFS/source control?

1

1 Answers

3
votes

Next time when you want to add a new folder of a project in source control. You just need to right click in source control explorer and select New Folder, you will see a new created folder with a "+" symbol in front and "add" pending changes status in source control explorer. Then check in the pending changes.

enter image description here

For now, to add existing folder and files in source control, the simplest way should be drag the folder in source control explorer.

  1. Find the folder in windows file system(should in the project folder of the mapping workspace),
  2. Drag the folder and check in the pending changes.

enter image description here

More ways of adding folder and files to version control for your reference.