Describe the bug
After adding and using a Custom Control, I get a XAML error:
WMC0610, The XAML Binary Format (XBF) generator reported syntax error '0x03e9'
Steps to reproduce the bug
- Get and install the WinUI 3 preview 3 templates
- Open Visual Studio 2019 Community Preview (Version 16.9.0 Preview 1.0)
- Create an empty WinUI (C#) project for Desktop
- Add a custom control.
- Use the custom control in MainWindow.xaml
- Try to run the app (F5)
Expected behavior
The project should compile and run.
Screenshots


Version Info
NuGet package version:
[Microsoft.WinUI 3.0.0-preview3.201113.0]
Windows app type:
| Windows 10 version |
Saw the problem? |
| May 2020 Update (19041) |
Yes |
|
| Device form factor |
Saw the problem? |
| Desktop |
Yes |
Additional context
I can compile and run when moving the XAML namespace declaration of the custom control style to the ResourceDictionary, but then I get this runtime error:

In the output window I see the following errors:
D:\a\1\s\dev\MRTCore\mrt\Core\src\MRM.cpp(276)\MRM.dll!7C1ADEA1: (caller: 7C1AF6A8) ReturnHr(1) tid(65e4) 80073B17 NamedResource Not Found.
D:\a\1\s\dev\MRTCore\mrt\Core\src\MRM.cpp(403)\MRM.dll!7C1AF6C5: (caller: 571BBF9E) ReturnHr(2) tid(65e4) 80073B17 NamedResource Not Found.
D:\a\1\s\dev\MRTCore\mrt\Core\src\MRM.cpp(755)\MRM.dll!7C1AF8E0: (caller: 571BBF9E) ReturnHr(3) tid(65e4) 80073B17 NamedResource Not Found.
Exception thrown at 0x76AE9AB2 (KernelBase.dll) in App1.exe: WinRT originate error - 0x80073B17 : 'NamedResource Not Found.'.
onecore\com\combase\winrt\error\restrictederror.cpp(1016)\combase.dll!768623ED: (caller: 767C5126) ReturnHr(1) tid(65e4) 8007007E The specified module could not be found.
Exception thrown at 0x76AE9AB2 in App1.exe: Microsoft C++ exception: winrt::hresult_error at memory location 0x02DDE268.
Describe the bug
After adding and using a Custom Control, I get a XAML error:
WMC0610, The XAML Binary Format (XBF) generator reported syntax error '0x03e9'
Steps to reproduce the bug
Expected behavior
The project should compile and run.
Screenshots

Version Info
NuGet package version:
[Microsoft.WinUI 3.0.0-preview3.201113.0]
Windows app type:
|
Additional context

I can compile and run when moving the XAML namespace declaration of the custom control style to the ResourceDictionary, but then I get this runtime error:
In the output window I see the following errors:
D:\a\1\s\dev\MRTCore\mrt\Core\src\MRM.cpp(276)\MRM.dll!7C1ADEA1: (caller: 7C1AF6A8) ReturnHr(1) tid(65e4) 80073B17 NamedResource Not Found.
D:\a\1\s\dev\MRTCore\mrt\Core\src\MRM.cpp(403)\MRM.dll!7C1AF6C5: (caller: 571BBF9E) ReturnHr(2) tid(65e4) 80073B17 NamedResource Not Found.
D:\a\1\s\dev\MRTCore\mrt\Core\src\MRM.cpp(755)\MRM.dll!7C1AF8E0: (caller: 571BBF9E) ReturnHr(3) tid(65e4) 80073B17 NamedResource Not Found.
Exception thrown at 0x76AE9AB2 (KernelBase.dll) in App1.exe: WinRT originate error - 0x80073B17 : 'NamedResource Not Found.'.
onecore\com\combase\winrt\error\restrictederror.cpp(1016)\combase.dll!768623ED: (caller: 767C5126) ReturnHr(1) tid(65e4) 8007007E The specified module could not be found.
Exception thrown at 0x76AE9AB2 in App1.exe: Microsoft C++ exception: winrt::hresult_error at memory location 0x02DDE268.