How do I add a project to Git (solution already added)

David Thielen 2,421 Reputation points
2022-04-05T17:50:51.987+00:00

Hi all;
This is weird, I have a solution with one project that is all in Git/DevOps. I created it and added it through VisualStudio. This is all working fine.

I added a UnitTest project to the solution and it's added fine. But this project is not added to Git.

And all the expected menu items to "add to Git" don't exist. It's like VisualStudio thinks it's added, but it isn't.

Part of the problem may be that both projects are in peer folders and the .sln file is in the folder of the main project.

How do I fix this?

thanks - dave

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,765 questions
{count} votes

2 answers

Sort by: Most helpful
  1. David Christian 110 Reputation points
    2023-05-18T12:50:33.79+00:00

    I am running into the same issue except in my case it makes no sense to move the files from the 2nd project under the first. The first project that GIT is managing is a .NET framework desktop application and the new project is a SQL Server CLR stored procedures project - they need to be separate projects. What is the process to add the 2nd project in the solution under GIT source control in Azure DevOps?

    0 comments No comments

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more