-->

How to add an existing solution to a Team Foundati

2019-03-22 20:22发布

问题:

I have a solution, which contains 7 projects. I wanted to try out TFS (just to see how it works etc.), so I would like to add this existing solution to my TFS' DefaultCollection.

Is this possible without re-creating all the projects and adding their files?

回答1:

  1. Create a Team Project to hold them
  2. Create a workspace mapping between the team project and the current location of your code on disk
  3. Go to Team Explorer, connect to your new project, double-click "Source Control"
  4. Right-click the node for the new project and choose "Add to Source Control"


回答2:

Sure, just right click on the solution in Solution Explorer and select "Add Solution to Source Control".



回答3:

For Team Foundation Service:

  1. Go to your http://.visualstudio.com
  2. Create a new Project via the website
  3. Open your solution in Visual Studio 2017
  4. Go to "Team Explorer" and double click the newly added project name from TFS (it is normally set in a gray color)
  5. Go back to "Solution Explorer" and to right mouse click on the solution and select "Add to source control"
  6. Right mouse click on the solution in "Solution Explorer" and select "Check in" for an initial check in to TFS

;-)