Skip to content

How to Create a NuGet Package with Templated Controls and XAML Without Causing the Runtime Error 'XAML Parsing Fail' in Referencing Projects? #10268

Answered by haonanttt
haonanttt asked this question in Q&A
Discussion options

You must be logged in to vote

Issue Analysis

This issue happens when trying to pack a 'Debug' NuGet package. NuGet packages created with $(Configuration)==Debug aren't going to work without also explicitly setting DisableEmbeddedXbf to false. Therefore, currently we have workaround to generate 'Debug' NuGet package:

Workaround - Set DisableEmbeddedXbf to false and pack the 'Debug' NuGet package

If you don't want to pack a 'Release' NuGet package and still want a 'Debug' one, you could temporarily set DisableEmbeddedXbf to false and generate the 'Debug' NuGet package

Step1:

Open your templated control project's .csproj file

Step2:

In project's PropertyGroup, add a property <DisableEmbeddedXbf>false</DisableEmbeddedXbf>

S…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@SongOfYouth
Comment options

Answer selected by haonanttt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants