Windows forms designer NullReferenceException- where to go from here?

后端 未结 2 351
[愿得一人]
[愿得一人] 2021-01-28 01:42

When I try to open one of my forms in the designer, it says, \"Object reference not set to an instance of an object.\" It does not provide a way to continue, and it does not giv

相关标签:
2条回答
  • 2021-01-28 02:08

    This will sound silly. The form is apparently a duplicate for a work in progress and the build action was set to None. Setting it to Compile caused the designer to act as normal.

    It would be nice if the designer would at least point you in the right direction. Problem solved.

    0 讨论(0)
  • 2021-01-28 02:24

    This is because there is' an exception in the event "Load" of the form. Place the code inside a "try .. catch" block to see the exception

    0 讨论(0)
提交回复
热议问题