-
Notifications
You must be signed in to change notification settings - Fork 831
Description
Current behavior 🐛
When attempting to access Windows.Storage.ApplicationData APIs (e.g., ApplicationData.Current.LocalFolder) within a WinAppSDK project running in Unpackaged mode, the application crashes immediately.
The following exception is thrown: System.InvalidOperationException: Operation is not valid due to the current state of the object.
Expected behavior 🎯
The application should handle the missing Package Identity gracefully. Ideally, Uno Platform should abstract this difference and fallback to a standard local file path, or throw a more descriptive exception indicating that ApplicationData is not supported in Unpackaged mode without a Sparse Package.
How to reproduce it (as minimally and precisely as possible) 🔬
Adding any ApplicationData API code to any WinAppSDK project and running it as unpackaged results in the error: Operation is not valid due to the current state of the object.
Workaround 🛠️
N/A
Renderer 🎨
- Skia
- Native
Affected platforms 📱💻🖥️
Windows App SDK
Uno.Sdk version (and other relevant versions) 📦
6.4.42
IDE version 🧑💻
Rider 2025.3.0.3
Anything else we need to know? 💬
N/A