I have a Visual Studio Community Edition 2019 solution with only one project. Whenever I add a source code file to the project, I don't see any changes to git's working tree and therefore it's not added to version control. That causes 2 problems:
- My peers have to manually add the same source code file to their projects
- I have to manually add/remove the new source code file when I move between git branches in my dev environment
Searching my git repository for the new file, it only shows up in .vs/<solution_name>/v16/.suo and the .vs directory is in .gitignore. From what I've read at Should I add the Visual Studio .suo and .user files to source control? , this .suo file contains machine-specific configuration and should be ignored by version control, but it seems it also contains the project tree? I see several *.cs files in the .csproj file, but for some reason the files I add to the project tree via the VS UI are not to this file. Am I doing this wrong?