question

SebastianBengtsson-8058 avatar image
0 Votes"
SebastianBengtsson-8058 asked AnnaXiu-MSFT commented

"Unsaved changes" when opening file, GUI becomes jumbled

I'm currently working in a major project (WinForm/C# in Visual Studio) where a few files, when opened, will immediately get the unsaved changes asterisk on them. If I save these changes the .cs- and .resx-files gets edited with changes mainly to the numeric values associated with the graphical elements in ways that everything in the GUI gets jumbled and unusable (panels become smaller than their contents, need to manually resize window to reach buttons etc).
If I open the files and and "undo" all the changes and save the file the exact same changes are made to the .resx-file (but the .cs-file is unchanged).

I've tried using Visual Studio 2019 and 2015 but there was no difference. I've been trying to get to the bottom of this issue for hours and have made no progress. What is causing this? Where are these unwanted changes comming from? They seem to be stemming from auto-generated code by the designer but I don't know how to stop this.

vs-general
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @SebastianBengtsson-8058, does it persist when you create a new project? Are you using a version control system for your project?

0 Votes 0 ·

0 Answers