UWP randomly throwing System.ExecutionEngineException => a Fix!
This article is more than two years old. Some details may have changed, so check the current documentation before applying them.
While debugging my UWP apps, I recently started getting this System.ExecutionEngineExeption randomly (roughly 50% of the time) when navigating to a new page.

Today I finally found a fix for this, thanks to some awesome people on Twitter and in the tech community! The cnoversation started here on Twitter. As you can read, I already pointed out that I tried to disable all Hot Reload related stuff on UWP, but with limited success. Timo Partl pointed to this issue on the GitHub which I apprently missed.
There, MattRames suggests to add the following to your csproj:
<EnableTypeInfoReflection>false</EnableTypeInfoReflection>
Since I’ve added this to my csproj, I haven’t had this exception any more!
Let’s hope Microsoft fixes this issue soon!
Did you enjoy reading this? If my work has saved you time or taught you something new, consider buying me a coffee.
Join the discussion