Search code examples
tfsazure-devopstfvc

Add existing project to Azure DevOps TFVC Not Git


I want to add an existing local C# VS2017 project to our TFS repository.

The project has been created locally and worked on to a point where I want it inside source control.

I logged on to what is now known as 'Azure DevOps' and created a new project, naively believing I knew how to do this and overcome the bias to GIT.

Wrong.

I now have a project in Azure DevOps that is GIT orientated. I can't see how to tell it to use TFS as its repository. I can't even see how to delete it and start over.

So, how do I convince this new Azure DevOps project to use TFS or failing that, blow it out of the water and make a new one that has TFS as its repository.

thanks


Solution

  • First make sure you have a team project with TFVC version control selected. If not, you need to create one first, then check in your files/project to this team project.

    enter image description here

    Since your local project already exist, give a try with below way:

    1. Tools -> Options -> Source Control tab -> Choose None in the plugin selection. (It may close the solution).

    2. Again Tools -> Options -> Source Control tab -> Choose VS TFS in plugin selection

    3. Go to the root folder of your project and delete any .git files and folders (It may be hidden - may need to show it first)

    4. In visual studio connect to able TFVC team project

    5. Try adding the solution to source control -> this should display the TFS dialogue

    enter image description here

    Besides, you could also create a totally new project in Visual Studio, you should select Add to Source Control when you create projects. Then move your work from old project to the newly project. Also connect to TFVC team project in Team Explorer before creating new projects. This should do the trick.

    enter image description here

    Hope this helps.