Specific line-break placement in the xaml Resources causes XamlCompiler error WMC0610: The XAML Binary Format (XBF) generator reported syntax error '0xc00cee23'

Author: hoshiizumiyaCreated Aug 21, 2026Updated Sep 18, 2026
Labelsbugarea-XamlCompilerarea-Parserteam-Core

Describe the bug

XamlCompiler reports WMC0610 when a resource declared after ResourceDictionary.MergedDictionaries uses a very specific line-break arrangement.

The following XAML reproduces the issue:

xml
<Page.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="ms-appx:///Themes/Generic.xaml" />
        </ResourceDictionary.MergedDictionaries><ContentDialog
            x:Name="DiskUsageDialog">
        </ContentDialog>
    </ResourceDictionary>
</Page.Resources>

I got the extremely cryptic error message WMC0610 from the xaml compiler reports:

XamlCompiler error WMC0610: The XAML Binary Format (XBF) generator reported syntax error '0xc00cee23'

Why is this important?

The issue depends on both of the following formatting conditions:

xml
</ResourceDictionary.MergedDictionaries><ContentDialog
    x:Name="DiskUsageDialog">
  1. There must be no line break between:
xml
</ResourceDictionary.MergedDictionaries><ContentDialog
  1. There must be a line break between <ContentDialog and x:Name:
xml
<ContentDialog
    x:Name="DiskUsageDialog">

Changing either line break causes the XAML to compile successfully.

For example, adding a line break before <ContentDialog> compiles successfully:

xml
<Page.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="ms-appx:///Themes/Generic.xaml" />
        </ResourceDictionary.MergedDictionaries>
        <ContentDialog
            x:Name="DiskUsageDialog">
        </ContentDialog>
    </ResourceDictionary>
</Page.Resources>

Likewise, keeping the elements adjacent but moving x:Name onto the same line also compiles successfully:

xml
<Page.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="ms-appx:///Themes/Generic.xaml" />
        </ResourceDictionary.MergedDictionaries><ContentDialog x:Name="DiskUsageDialog">
        </ContentDialog>
    </ResourceDictionary>
</Page.Resources>

Therefore, these semantically equivalent XAML documents produce different XBF compiler results solely because of whitespace placement.

Steps to reproduce the bug

Steps to reproduce the bug

  1. Create a WinUI 3 project.
  2. Add an empty resource dictionary at Themes/Generic.xaml.
  3. Add the following XAML to a Page:
xml
<Page.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="ms-appx:///Themes/Generic.xaml" />
        </ResourceDictionary.MergedDictionaries><ContentDialog
            x:Name="DiskUsageDialog">
        </ContentDialog>
    </ResourceDictionary>
</Page.Resources>

<Grid />
  1. Build the project.

The build fails with:

XamlCompiler error WMC0610: The XAML Binary Format (XBF) generator reported syntax error '0xc00cee23'
  1. Change either of the two relevant line breaks:

    • insert a line break between </ResourceDictionary.MergedDictionaries> and <ContentDialog>, or
    • remove the line break between <ContentDialog and x:Name.
  2. Build again.

The XAML now compiles successfully.

Actual behavior

Only this particular combination:

xml
</ResourceDictionary.MergedDictionaries><ContentDialog
    x:Name="DiskUsageDialog">

causes:

WMC0610: The XAML Binary Format (XBF) generator reported syntax error '0xc00cee23'

Changing either line break makes the error disappear.

This appears to be a whitespace-sensitive parsing or XBF generation issue rather than an invalid XAML construct.

Expected behavior

Whitespace and line-break placement between XML elements and attributes should not affect the semantics of the XAML.

All of the following forms should produce the same result:

xml
</ResourceDictionary.MergedDictionaries><ContentDialog
    x:Name="DiskUsageDialog">
xml
</ResourceDictionary.MergedDictionaries>
<ContentDialog
    x:Name="DiskUsageDialog">
xml
</ResourceDictionary.MergedDictionaries><ContentDialog x:Name="DiskUsageDialog">

At minimum, the XBF generator should not enter a syntax-error state based only on this formatting difference.

Screenshots

ImageImage

NuGet package version

2.4.0

Windows version

No response

Additional context

No response

Source: microsoft/microsoft-ui-xaml