I’m developping a winform application using Visual Studio 2008, and everytime I change something in the Form using the integrated designer, the files Form1.Designer.cs and Form1.resx are changing the content order.
As a result it makes complicated the version control of these file because the diff tool see a lot of differences along the commit althought there is sometimes just minor edit…
Do someone has ever solved this problem?
Unfortunately, no. The Winforms designer is notorious for introducing large textual changes that result in little (to no) semantic change; in other words, it will quite often rearrange or regenerate the code in the designer in such a way where the text is quite different from the original, even though it does largely the same thing. This behavior is sometimes amplified by third-party tools (I’ve noticed that Infragistics’ WinForms tools are utterly INSANE in this manner).
There’s really not a good way to handle it in source control, I’m afraid, other than making sure to check in often. This is one of the things that’s so nice about WPF, since it’s all XAML and it’s much easier to keep track of what changes.