visual-studiotfstfvcsource-control-explorerteam-project

How can I add a new top-level project to TFS?


I need to add existing projects to TFS, to a server that has already been set up.

However, when I open the project in Visual Studio 2013 which I want to add to TFS, and then right-click the solution and select "Add Solution to Source Control..." and select "Team Foundation Version Control" from the "Choose Source Control" dialog, I then see this:

Add Solution to Source Control window

This allows me to add the solution to "CSReports" but I don't want to do that. I want to create a new "Location" altogether, on the same level as "CSReports".

e.g., I want a separate "Location" that is the same name as my solution, and have that be the repository for it. And later create yet another, and so on.

If I select the "Make New Folder" button, it just wants to create a new folder under the selected (by default) "CSReports" Location.

How can I create a new "Location", so that I can choose that as the location in which to store the solution open in Visual Studio?


Solution

  • Follow the instructions provided in the documentation at https://www.visualstudio.com/en-us/docs/setup-admin/create-team-project

    Paraphrased/edited for clarity, relevance, and succinctness:

    You must connect from a Visual Studio client that is at the same version level as TFS.

    That is, you must connect to TFS 2015 from a version of Visual Studio 2015, for example.

    You can create a team project from Team Explorer after you have connected to an on-premises server. If you don't see the Team Explorer pane, open the View menu and select Team Explorer.

    1. Connect to the server and team project collection where you want to create your team project.

      Tip: If you are running Team Explorer from a server that hosts SharePoint Products and SQL Server Reporting Services, you might need to run Visual Studio as an administrator. If it's your first time connecting to TFS, you’ll need to add TFS to the list of recognized servers.

    2. After you've created your team project, you can add repositories. From the Team Explorer window, click the drop-down arrow at the top right, below the search field.

    3. Select "Projects and My Teams", and then click "New Team Project...".

      Note: If you are on a different version level, the "New Team Project" option will not exist!

    4. Enter a name and a description for the project in the wizard that appears, and then click Finish.

    The top-level project now exists with the name you provided.