-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Describe the bug
When updating from v1.7 to v1.8 my app (DLSS Swapper) no longer launches. Constructing Windows.ApplicationModel.Resources.ResourceLoader causes the app to crash. There is a repro linked below.
The error appears to come from WinRT.Runtime.dll and is
System.IO.FileNotFoundException: Unable to find the specified file.
The full stacktrace is,
at WinRT.ExceptionHelpers.g__Throw|38_0(Int32 hr)
at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr)
at ABI.WinRT.Interop.IActivationFactoryMethods.ActivateInstanceUnsafe(IObjectReference objectReference, Guid iid)
at Windows.ApplicationModel.Resources.ResourceLoader..ctor()
at ResourceLoaderTest.MainWindow.Grid_Loaded(Object sender, RoutedEventArgs e) in D:\git\beeradmoore\WindowsAppSDK_ResourceLoaderIssue\ResourceLoaderTest\ResourceLoaderTest\MainWindow.xaml.cs:line 37
I was not able to reproduce the issue in a packaged app.
Comparing the files in bin between the two I notice that v1.7 produces resources.pri whereas v1.8 produces ResourceLoaderTest.pri. If I put the app config in its broken state and confirm it does not work as intended, but then copy/paste ResourceLoaderTest.pri to resources.pri it will now work as expected.
Steps to reproduce the bug
See the project in this repo: https://github.com/beeradmoore/WindowsAppSDK_ResourceLoaderIssue
- Run the project in debug mode (runs as unpackaged by default).
- Observe that the first
Debugger.Break();is hit indicatingResourceLoaderconstructed - Update nuget package from 1.7.250606001 to 1.8.250907003
- Run the project again and now observe you hit the
Debugger.Break();in the catch statement.
Expected behavior
The first Debugger.Break(); is hit in both cases.
Screenshots
No response
NuGet package version
Windows App SDK 1.8.0: 1.8.250907003
Packaging type
Unpackaged
Windows version
Windows 11 version 24H2 (26100, June 2025 Update)
IDE
Visual Studio 2022
Additional context
No response