When your Silverlight for Windows Embedded application encounters XAML issues during runtime, you might find that the warning and error messages in the Visual Studio output window do not provide specific information about the problem or where the problem occurred, making it difficult to interpret the message.
In this article:
When your application uses Binary XAML (BAML) resources that are created by the XAML Resource Packager (XRPack), warnings and error messages are less informative than if BAML was not used. For example, with BAML on, the error message may be:
407416 PID:10b03f2 TID:1600066 PC=402938ce(xamlruntimecore.dll+0x000d38ce) RA=402de947(xamlruntimecore.dll+0x0011e947) SP=0002f80c, BVA=000db004
With BAML off, the error message is:
63262774 PID:1750532 TID:1760412 [XR] XRApplication::CheckParserError - PARSE ERROR: Code: 0x80470066 Line: 2 Character:4614 Message: Unknown element: Menu.
When you troubleshoot XAML issues in your application, we recommend that you do the following:
/BamlOff
/IndentFiltered
/C
By using these recommended XRPack settings, you can troubleshoot problems more easily and generate the most useful warning and error information. To add these XRPack settings, use the procedure below. Note that the location of the file that you modify in Visual Studio depends on whether your application is a subproject of an OS design in Platform Builder or you are developing your application in Visual Studio without using Platform Builder. Choose the procedure that is appropriate for your project.
In Visual Studio, open your OS design solution.
In Solution Explorer, expand Subprojects, then expand your application’s project node, and then expand the Resource files directory.
Under Resource files, double-click <Project Name>.xrpack.
Add the following lines to <Project Name>.xrpack:
/BamlOff /IndentFiltered /C
Rebuild the subproject.
In Visual Studio, open your application’s solution.
In Solution Explorer, expand the application’s project node.
Double-click <Project Name>.xrpack.
Rebuild the project.
Wendy Giberson edited Original. Comment: Bolded some text in the Resolution list.