Hi all,
Merging project/solution files is a well-known disaster among developers/SCM admins performing merges in their source control.
Take, for example, a common scenario: development is done on a project/solution in two different branches. When time comes to merge back into a main development line, there is a very small resemblence between the VCPROJ's (and SLNs).
The reason is, Visual Studio may change (and DOES change) location of the various XML-like elements within these files. E.g., Configurations Debug and Release may swap order upon every save operation on the proj file. This makes it impossible to easily incorporate changes from each development branch, not even considering an automatic merge.
I can assume that Microsoft are using some perl hashing system to hold the vcproj structures, hence the rendering of the files upon a save operation is not ordered.
I'd first like to ask: did anyone found some elegant method to workaround this?
Second, I'd like to make two suggestions:
Have Microsoft please reimplement the above files and restrict them to some rigid ordering of elements.
find a tool (or write one) that sorts vcproj (xml format) and sln (sln format...) files alphabetically, recursively (all elements within elements etc.). Using this tool on both source and target files would enable to easily point (and merge) the changes, hoping that Visual Studio reads the sorted, merged project or sln file.
Any other ideas and thoughts are welcome.
Gil Moses.