Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2008: how to avoid project file merge hell?

When you're working on a VS C# project with multiple developers which all add new projects and files to the same solution the last one to try and check in his changes gets conflicts on the project solution file which aren't easy to merge.

The easiest solution to this problem I've found is to dismiss my own changes and accept the server's latest version. Then I reintegrate my own changes. Depending on the amount of new files added to the project this can be easy, or a really annoying tasks.

I'm wondering if there's an easier way to do this. Read: can I make VS/TFS/merge do this for me?

like image 420
jurgenb Avatar asked Mar 16 '10 16:03

jurgenb


2 Answers

My suggestion would be to update and commit more frequently. In particular, make sure you run Get Latest before pending any changes on a solution file.

"Merge hell" with things like XML and text files (which all project and solution files are) typically only occurs because people are trying to commit single changes that are very large.

If you get into the habit of doing regular commits, the merges tend to be smaller, and the tools tend to do a perfect job of it.

like image 160
Reed Copsey Avatar answered Oct 20 '22 04:10

Reed Copsey


I made a tool to specifically to compare / merge solution file (and can also be used to dynamically create filtered solution as well).

It can be found at: http://slntools.codeplex.com/

like image 43
Christian Warren Avatar answered Oct 20 '22 02:10

Christian Warren