Visual Studio 2022 changes the solution file. How do I disable this?

Dav*_*kle 5 visual-studio

I work on a team that uses Ryder. I want to use Visual Studio 2022.

When I open the solution, Visual Studio makes a bunch of changes to the solution file (it modifies one of the project guids and adds debugging information for it).

I'm not allowed to check in these changes, nor are they needed, so every time I check anything in to git, I have to undo the changes to the solution file.

Is there any way to disable Visual Studio 2022 from doing this?

我搜索了我能想到的所有设置并阅读了文档,但我找不到任何东西。如果我尚未添加或删除项目,我不希望 Visual Studio 更改我的解决方案文件。

小智 1

虽然不完全是“修复”,但我有一个有时非常有帮助的解决方法。复制 .sln 文件,以便获得具有不同文件名的第二个文件。让 VS 对第二个 .sln 执行它想要的操作,而不影响第一个 .sln。您可以更进一步并 gitignore 第二个文件,这样 git 就不会不断地将其“添加”到存储库中。