-
Notifications
You must be signed in to change notification settings - Fork 693
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
Where is the generic.xbf file associated with the WindowsAppSDK NuGet? #8741
Comments
The generic.xaml file is in the nuget package.
This is incomplete since the file is around 1.7MiB, but do you notice the Microsoft.UI.Xaml subtree? These are the WinUI 3 resources that were merged with the application's resources. It is possible to verify this by grabbing the resources.pri out of the Windows App SDK package (the .msix file is just a renamed .zip file) and use makepri to dump the contents in the same way. This file starts off with the following:
The biggest difference is the root path of the URI is set up to target the Windows App SDK package directory. If there is any problem in particular that you are facing then it would be better to describe that problem as precisely as you can. --Edit-- |
Thank you so much for your response. |
There is a long and convoluted answer here, but I think your best bet is to look into how WinUI 3 merges its resources during build time. This does mean looking into the MSBuild files in the Windows App SDK nuget package and maybe looking into understanding MSBuild in general, but if you are able to do this automatically with any nuget packages then it should be worth the effort. |
The required .pri file can be loaded into application scope using the ResourceManagerRequested event available in the latest Windows App SDK preview version, Windows App SDK 1.4 Preview1. |
Describe the bug
When we create a custom WinUI3 NuGet with xaml resources (e.g., Resource Dictionaries with custom styles), we need to provide the corresponding XBF/XAML files along with other NuGet files(e.g.: .dll, .winmd etc) in order to copy them to the client application's output location. However, the self-contained WinUI3 application's output directory does not contain any XBF/XAML files associated with WindowsAppSDK NuGet, such as generic.xaml or generic.xbf.
How does the client application getting XAML resources from WindowsAppSDK NuGet ?
Does the WindowsAppSDK have a specific location where it stores its XBF/XAML files?
If so, may we incorporate this method into our custom NuGet?
Steps to reproduce the bug
Custom NuGet is created by referring https://learn.microsoft.com/en-us/nuget/guides/create-uwp-packages
Expected behavior
No response
Screenshots
No response
NuGet package version
Windows App SDK 1.3.2: 1.3.230602002
Packaging type
Unpackaged
Windows version
Windows 10 version 21H2 (19044, November 2021 Update)
IDE
Visual Studio 2022
Additional context
No response
The text was updated successfully, but these errors were encountered: