Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
235 views
in Technique[技术] by (71.8m points)

How it is possible to debugging Windows.UI.Xaml.Markup.XamlParseException

During the methode

InitializeComponent()

in the main class of a customized control occurs the error with the follow message:¨

Message "System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Windows.UI.Xaml.Markup.XamlParseException: Der Text zu diesem Fehlercode wurde nicht gefunden. Cannot create instance of type 'Uwp.UI.Control.OneNotePicker.OnenotePicker' [Line: 37 Position: 42] at Windows.UI.Xaml.Application.LoadComponent(Object component, Uri resourceLocator, ComponentResourceLocation componentResourceLocation) at TestEnvironment.Uwp.MainPage.InitializeCom" string

This error is an unhandled exception and is shown with a debug break under App.g.i.cs

UnhandledException += (sender, e) =>
        {
            if (global::System.Diagnostics.Debugger.IsAttached) global::System.Diagnostics.Debugger.Break();
        };

It seems, there is an error during parsing the Xaml file. My question is now, how I can find exactly the row of the Xaml file, where the error occurs.

Thanks for help


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The issue might be caused by a spelling mistake of the resource name that you defined in the Page.Resources or App.Resources.Please check where you are setting the resources and make sure the spelling is correct.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
...