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
{{ message }}
Repository navigation
[Skia] ApplicationData.Current.LocalFolder redirects to %appdata% #8910
difficulty/starter 🚀Categorizes an issue for which the difficulty level is reachable by newcomerskind/bugSomething isn't workingproject/non-ui ⚙️Categorizes an issue or PR as relevant to winrt (non-ui)
ApplicationData.Current.LocalFolder redirects to %appdata%, but should redirect to a more app-specific folder.
Expected behavior
Writing to ApplicationData.Current.LocalFolder should be specific to the running app.
Anything else we need to know?
Note for contributors
The behavior for this is currently undefined, as it is mapped to the UWP behavior. We should be mapping to the behavior that ApplicationData.Current.LocalFolder shows when running a unpackaged WinAppSDK app for the same API.
Because we have the Package.appxmanifest, I think for the default behavior we can read the publisher and app id from there, and also provide a FeatureConfiguration to let the developer to override the path and store the app data/settings somewhere else as needed, does that sound like a good solution @jeromelaban ?
difficulty/starter 🚀Categorizes an issue for which the difficulty level is reachable by newcomerskind/bugSomething isn't workingproject/non-ui ⚙️Categorizes an issue or PR as relevant to winrt (non-ui)
Activity
MartinZikmund commentedon May 30, 2022
This will be a breaking change, but should probably be done soon.
MartinZikmund commentedon Dec 14, 2022
@jeromelaban I think this is one of the breaking changes that are really needed for the next major release
MartinZikmund commentedon Feb 27, 2023
Currently unpackaged WinAppSDK apps just crash when
ApplicationData.Currentis used. See microsoft/WindowsAppSDK#2639, microsoft/WindowsAppSDK#2621 .Because we have the
Package.appxmanifest, I think for the default behavior we can read the publisher and app id from there, and also provide aFeatureConfigurationto let the developer to override the path and store the app data/settings somewhere else as needed, does that sound like a good solution @jeromelaban ?jeromelaban commentedon Feb 27, 2023
altering the path using publisher and appid makes sense yes, as for feature configuration, I wonder if an helper class would be more appropriate?