I store my open source projects usually on Github which works easily with VS. But once in a while I want to store a project only I use on Azure DevOps. Since I do this only once every few years and VS has changed its GIT GUI greatly, I can't figure out how to make it work.
Of course, I can use Add to Source Control and in the Create a Git repository Window Azure Dev Ops. But here I get stuck:
This window insist that I am using an already existing project on Azur DevOps. However, I want this new solution to be its own project on Azur DevOps. So I logged in to visualstudio.com and created a new project:
When I now open Add to Source Control again, I can indeed chose that new project, but now I get an error message:
The error message says: A repository with this name exists already :-(
Question:
What do I need to do to add a new VS solution to Azure DevOps and I want the Azure DevOps Project and Repository each have the same name as the VS solution.
What I tried so far
I tried to delete the repository on Azure DevOps:
I when I clicked on Delete, nothing happened, the repository was still there.
I then tried to rename the repository:
When I clicked on rename, it seemed that rename got executed.
I then opened Add to Source Control again, and this time there was no error:
So I clicked Create and Push.
Which seemed to work. I then deleted the renamed Repository on Azure DevOps, which seemed to work too.
However, I cannot imagine that such a basic operation of adding a new solution to Azure DevOps is so complicated. Is there any easier way ? Will I run into problem later because of my strange approach ?
Please Note: I have searched for similar question on SO and there are many. But please note that this question is about VS2022. Any question older than half a year cannot be about VS2022. However, the git functionality has changed a lot between different VS versions.