Unable to Activate Windows Metro Style Application
Probably the most interesting error I had to troubleshoot since I started developing my first Windows Metro application happened to me after doing some restructuring and cleaning up of the existing code base. Almost immediately after starting the application the debugger stopped its execution somewhere in App.g.i.cs
(an auto generated file in obj
folder, not part of the code I've written):
Trying to continue execution from this point on resulted only in another even more vague error message:
Fortunately the fix turned out to be really simple once it dawned on me how to get more information: the second argument of UnhandledException
event handler inside which the execution stopped was UnhandledExceptionEventArgs
. Peeking inside revealed the mystery:
There was an error in App.xaml
which for same strange reason didn't cause the build to fail nor did it prevent the app from starting. It was listed in the Error List though:
At least now I know what to look for when it happens next time.