An application-internal exception has occurred

When coding with Win8 and Visual Studio 2012, I get the following error: “An application-internal exception has occurred”. This is after I created a new win8 appstore project and added a grid view from the toolbox.

Looking at the output or the file (App.g.i.cs) gives me no more clues. There is a flag which seems to point the way: DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION

In debug mode, I highlight the e and then in the “Locals” window at the bottom I can expand the variables to get the value of e, which is: Message “Cannot find a Resource with the Name/Key ApplicationHeaderForegroundThemeBrush [Line: 15 Position: 44]” string. This is in Common\StandardStyles.xaml. This has been auto generated with a new file, so looks as though this is a sync defect as the product goes to RTM.

Head banging continues…