Search code examples
winformsvisual-studiodesignerwindows-forms-designer

Visual Studio designer changes my win Form


I'm working at huge project, which was converted from VS 2008 to VS 2012. Everything worked fine before, but now I have a problem in VS 2012. Opening a form in VS Designer causes changes are made in that form. If I save that auto made changes, I can't open it anymore, cuz there are errors in it. Can I somehow force the designer not to make the auto changes?


Solution

  • I believe you can set the [filename].Designer.[extension] file as Read-Only, and while the designer will still make changes (shown by the asterisk that appears in the tab), they won't be automatically saved. And you'll have to answer "No" when asked to save changes. It's not the perfect way to preserve the layout code while developing the class behaviour, but it's doable.