microsoft-ui-xaml: Microsoft.UI.Xaml.Markup.XamlParseException: 'XAML parsing failed.'

occuring at InitializeComponent(), which isn’t telling much, however the Xaml file is pretty simple.

image

In the generated file the respective line is :

global::Microsoft.UI.Xaml.Application.LoadComponent(this, resourceLocator, global::Microsoft.UI.Xaml.Controls.Primitives.ComponentResourceLocation.Application);

<Page
    x:Class="Weather.History.WinUI.Pages.SingleChartPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:ig="using:Infragistics.Controls.Charts"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
    mc:Ignorable="d">

    <Grid>
        <ig:XamDataChart/>
    </Grid>
</Page>

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (5 by maintainers)

Most upvoted comments

   at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr)
   at ABI.Microsoft.UI.Xaml.IApplicationStatics.global::Microsoft.UI.Xaml.IApplicationStatics.LoadComponent(Object component, Uri resourceLocator, ComponentResourceLocation componentResourceLocation)
   at Microsoft.UI.Xaml.Application.LoadComponent(Object component, Uri resourceLocator, ComponentResourceLocation componentResourceLocation)
   at Weather.History.WinUI.Pages.SingleChartPage.InitializeComponent() in C:\Users\Tommy\source\repos\Weather History\net5\Weather.History.WinUI\Weather.History.WinUI\obj\x86\Debug\net5.0-windows10.0.18362.0\Pages\SingleChartPage.g.i.cs:line 45
   at Weather.History.WinUI.Pages.SingleChartPage..ctor() in C:\Users\Tommy\source\repos\Weather History\net5\Weather.History.WinUI\Weather.History.WinUI\Pages\SingleChartPage.xaml.cs:line 38
   at Weather.History.WinUI.Weather_History_WinUI_XamlTypeInfo.XamlTypeInfoProvider.Activate_33_SingleChartPage() in C:\Users\Tommy\source\repos\Weather History\net5\Weather.History.WinUI\Weather.History.WinUI\obj\x86\Debug\net5.0-windows10.0.18362.0\XamlTypeInfo.g.cs:line 573
   at Weather.History.WinUI.Weather_History_WinUI_XamlTypeInfo.XamlUserType.ActivateInstance() in C:\Users\Tommy\source\repos\Weather History\net5\Weather.History.WinUI\Weather.History.WinUI\obj\x86\Debug\net5.0-windows10.0.18362.0\XamlTypeInfo.g.cs:line 8926
   at ABI.Microsoft.UI.Xaml.Markup.IXamlType.Do_Abi_ActivateInstance_13(IntPtr thisPtr, IntPtr* result)

I modified a little bit the chart control properties and now GetForCurrentView() isn’t playing a role here. The LoadComponent() failed.

Can I find more info than “Xaml parser failed” ?