Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suggestions for maintaining Visual Studio vcproj project files in version control

Microsoft Visual Studio uses XML to save its .vcproj project files. So diffing XML project files should be easily.

Unfortunately, if you change any of the project file's properties, Visual Studio insists on randomly shuffling the XML nodes of the project file! This makes textual diffing and merging of project file changes basically impossible. Changing one compiler setting can make my visual diff tool think I've changed 50% of the lines in the file! I've even tried some XML diff tools, but they just show a more structured view of the same mess.

Does anyone have any suggestions for maintaining .vcproj files in source control? Or a way to convince Visual Studio to not rearrange the XML nodes in the .vcproj file?

(I have also investigated using tools like CMake to generate .vcproj files from a more diff-friendly text file, but CMake has its own problems.)

like image 564
Chris Peterson Avatar asked Mar 04 '09 18:03

Chris Peterson


1 Answers

This seems to come up every now and then.

  • Merging vcproj files - SCM's hell

Perhaps it is a problem ripe for a plug-in or other normalizing tool.

It would be a great side-business, until MS decides to fix it. Then you're out of luck - unless of course they offer to buy your IP.

Anyone want to start an open source project, or commercial product? I'm game.

I might have a go at a stand-alone normalizing tool, then see if I can turn it into a plugin.

like image 132
Tim Avatar answered Nov 16 '22 01:11

Tim