WPF, 'Object reference not set to an instance of an object' in Designer

后端 未结 8 2252
一个人的身影
一个人的身影 2020-12-01 08:58

I\'m getting an \"Object reference not set to an instance of an object\" error when I try to reload the Designer for my XAML UserControl. Visual Studio highlig

8条回答
  •  借酒劲吻你
    2020-12-01 09:49

    What Alex says is the way to go. But I think its a little confusing to understand what he is saying.

    Assuming you have your project open in Visual Studio, open another Visual Studio instance and select Debug->Attach To Process. In the dialog which opens select

    • XDesProc.exe (which is the XAML UI Designer) for VS2012 and newer or
    • devenv.exe for older VS versions.

    Then do "Reload Designer" for the user control and see the output in the second VS instance to check what exactly is the error.

提交回复
热议问题