You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When referencing a WinUI 3 class library containing XAML files in a WinUI 3 app, the resulting binary XAML files (xbf) are being packaged in the MSIX package, even though the files are already embedded in the pri file of the class library:
This causes unnecessary files in the MSIX, slowing down installation. Also, the entire folder structure and file paths of XAML files are easily visible for the basic user, which is undesirable. (It's clear that the app can be decompiled easily anyways).
Calling makepri.exe dump /if ClassLibrary1.pri also confirms the xbf files are really embedded:
Add blank WinUI 3 class library project to the solution
Reference the library in the main app
Add XAML files to the library project
Build and compile the app
In Visual Studio, select "Release" configuration
In Visual Studio, use Package and Publish -> Create App Packages... to create a MSIX package for sideloading
Sideload the MSIX file OR simply open it in a ZIP file viewer
The MSIX will contain a subfolder "ClassLibrary1" with a .xbf file for each XAML file in code. The MSIX will also contain a ClassLibrary1.pri file, which already contains the *.xbf file contents embedded.
Expected behavior
There are no *.xbf files in the MSIX output, as they are embedded in the .pri file already.
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.6.3: 1.6.241114003
Windows version
Windows 11 (24H2): Build 26100
Additional context
Specifying <DisableEmbeddedXbf>false</DisableEmbeddedXbf> did not make any difference.
The text was updated successfully, but these errors were encountered:
Describe the bug
When referencing a WinUI 3 class library containing XAML files in a WinUI 3 app, the resulting binary XAML files (xbf) are being packaged in the MSIX package, even though the files are already embedded in the pri file of the class library:
This causes unnecessary files in the MSIX, slowing down installation. Also, the entire folder structure and file paths of XAML files are easily visible for the basic user, which is undesirable. (It's clear that the app can be decompiled easily anyways).
Calling
makepri.exe dump /if ClassLibrary1.pri
also confirms the xbf files are really embedded:Steps to reproduce the bug
Simple repro: https://github.com/whiskhub/WinUI3_Xbf_Repro
The MSIX will contain a subfolder "ClassLibrary1" with a .xbf file for each XAML file in code. The MSIX will also contain a ClassLibrary1.pri file, which already contains the *.xbf file contents embedded.
Expected behavior
There are no *.xbf files in the MSIX output, as they are embedded in the .pri file already.
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.6.3: 1.6.241114003
Windows version
Windows 11 (24H2): Build 26100
Additional context
Specifying
<DisableEmbeddedXbf>false</DisableEmbeddedXbf>
did not make any difference.The text was updated successfully, but these errors were encountered: