Merging csproj files can turn into a difficult task. Sometimes two branches haven’t been merged in a while, and then at the time of putting them together a lot of conflicts arise.

I’ve looked through a lot of Stackoverflow posts and recommendations. It’s true that when merging often and with small changes there are fewer issues, but sometimes it’s “too late for that”. The version of Visual Studio you use also has relevance - my understanding is that it is both important to use the latest version and to make sure everyone in the team uses the same version.

The way I found to overcome a difficult merge was to approach it by parts: I would use git diff to compare the csproj file in both branches and apply small changes manually, making sure the project still builds after applying them. After overcoming the most difficult changes it is possible to use git merge and succeed in putting together a merged file that doesn’t break the build.