Why is Visual Studio constantly modifying .designer files?

Usually you do not see these files because they are hidden in the project tree, and you only edit the graphical interface of the Windows Forms.NET application through the visual designer. But when using some kind of SCM (version control) it is a huge PITA, when these files change significantly all the time. Even when I don’t touch a single thing in the designer and simply rebuild the solution or even open it in VS, many lines of code are moved to another position in the file. This always makes a set of hugh changes that no one can explain or even analyze.

Is there a way to stop Visual Studio from doing this? I saw this in every version until 2010. I think that WPF XAML files should not be affected by this, but WPF is not an option here.

+4
source share
1 answer

The constructor creates an internal form / control object model. When this object model changes, the code is restored.

0
source

Source: https://habr.com/ru/post/1386301/


All Articles