XAML Constructor Failed Object reference not set to object instance

I am using the Visual Studio 2015 community.

So, I created an empty UW application (C ++), and I wanted to start looking around because I was using XAML Designer for the first time.

However, without any code changes, the constructor does not load. The constructor returns an unhandled exception (System.NullReferenceException exception) - the object reference is not set to the object instance.

This is really strange, because the application compiles and works fine. The designer gives me a fix ("Excluding the project code that runs in the design view can improve the stability of the XAML designer ...."), but this does not solve the problem.

Does anyone know what the problem is? Thanks!

+1
source share
3 answers

Can you try creating a UWP project C # and F5? After that, try opening your C ++ XAML Designer again, and it should fix the constructor.

+3
source

You are probably using static resources or thematic resources (for brushes or something like that) that are not used in Windows 10 UAP. Try removing static resources from your XAML files and see if your application is running.

+1
source

This worked for me: go to environment variables and find the HPD platform. Remove it.

0
source

All Articles