Am expriencing this Error when saving updated designing in winforms.This only happens when i edit the form in the designer even not debugging.How can i get the specific location of the null refernce.
Asked
Active
Viewed 16 times
0
-
Presumably you're binding to something that is null, or setting something (probably indirectly) to null in the InitializeComponent – ProgrammingLlama Sep 29 '22 at 07:15
-
Re your edit: it seems unlikely to be an error of the designer. It seems much more likely to me that your UI depends on something being initialized that isn't. – ProgrammingLlama Sep 29 '22 at 07:21
-
Happens when saving after editing in the designer say after resizing a textbox.am unable to locates the source. – bita pinches Sep 29 '22 at 08:01
-
You can attach the debugger to one instance of Visual Studio (call this A, the debugee) from another instance of Visual Studio (call this B, the debugger). Then in B enable catching all "Common Language Runtime Exceptions" in the Exception Settings. Now in A do the thing that makes it crash and B should show you where the exception is. – Matthew Watson Sep 29 '22 at 08:10