-
Notifications
You must be signed in to change notification settings - Fork 701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WinUI Packaged projects throws Markup.XamlParseException: 'XAML parsing failed.' #6452
Comments
@RealTommyKlein and @evelynwu-msft FYI |
A workaround for this issue is to add this to the library: <PropertyGroup>
<DisableEmbeddedXbf>false</DisableEmbeddedXbf>
</PropertyGroup> Though I'm not sure why this is disabled in debug in the first place. Maybe it breaks some hot reload scenarios. Digging deeper, it seems that this issue is related to the way XBFs are embedded in the PRI file. In debug, this property is set to false: <PropertyGroup Condition="'$(_OverriddenDisableXbf)' == 'false'">
<DisableEmbeddedXbf>true</DisableEmbeddedXbf>
<DisableEmbeddedXbf Condition="'$(Configuration)'!='Debug'">false</DisableEmbeddedXbf>
</PropertyGroup> causing XBF files to be generated on the side. In this mode, and using |
What is the status on this ticket please? Suggested workaround does not work - are there any others? Thank you. |
I don’t think this could work. You need to use either a project reference or pack your output as a nuget package and reference that to get the resources as well. The DLL alone doesn’t carry enough in itself. This was also a requirement in the UWP days |
@dotMorten In my case my control works fine when referenced as a project however when I create a nuget package and reference that instead I get "XAML parsing failed". Why would it not work? Seems like the standard use case for nuget packages. |
@sam-wheat see the issue linked a few messages up. It takes a bit of hacking to get it to make a usable package |
Same problem here... |
Hello. Same problem here. Anyone have a solution? |
I've created a discussion thread giving the workaround about how to solve the 'XAML parsing failed.' issue in this case. The link is #10268. In short, when generating the nuget package, we could either:
The workaround is same to what @jeromelaban had mentioned, and in a similar issue #7830 I've tried it worked |
Describe the bug
Single-project MSIX throws Markup.XamlParseException: 'XAML parsing failed.' when using templated control from ClassLibrary referenced by dll.
Steps to reproduce the bug
Steps to reproduce:
WinUIRes.zip
Expected behavior
You can also create a new solution with a separate packaging project and repeat step 3,4,5,6 - it works fine
Screenshots
No response
NuGet package version
No response
Windows app type
Device form factor
Desktop
Windows version
May 2021 Update (19043)
Additional context
No response
The text was updated successfully, but these errors were encountered: