After updating to the latest version I've noticed that FileSystem.Current.AppDataDirectory returns a directory located in %LocalAppData% instead of %AppData% for my unpackaged app.
In 8.0.61 the path is:
C:\Users\Andrew\AppData\Roaming\[publisher]\[package]\Data
In 8.0.100 the path is:
C:\Users\Andrew\AppData\Local\[publisher]\[package]\Data
I've been able to track the change down to PR #23265 and I assume that the change is unintentional as the commit messages and the linked issue only talk about creating the directory if it doesn't exist.
This change doesn't just impact user code. For example the Preferences.Default implementation uses the path returned by FileSystem.Current.AppDataDirectory to create the preferences file. I've noticed this because all my app preferences got reset after updating to version 8.0.100
in 8.0.61 the preferences file for Preferences.Default was stored in:
C:\Users\Andrew\AppData\Roaming\[publisher]\[package]\Settings\preferences.dat
and in 8.0.100 it is loaded from:
C:\Users\Andrew\AppData\Local\[publisher]\[package]\Settings\preferences.dat
Description
After updating to the latest version I've noticed that
FileSystem.Current.AppDataDirectory
returns a directory located in %LocalAppData% instead of %AppData% for my unpackaged app.In 8.0.61 the path is: C:\Users\Andrew\AppData\Roaming\[publisher]\[package]\Data
In 8.0.100 the path is: C:\Users\Andrew\AppData\Local\[publisher]\[package]\Data
I've been able to track the change down to PR #23265 and I assume that the change is unintentional as the commit messages and the linked issue only talk about creating the directory if it doesn't exist.
This change doesn't just impact user code. For example the
Preferences.Default
implementation uses the path returned byFileSystem.Current.AppDataDirectory
to create the preferences file. I've noticed this because all my app preferences got reset after updating to version 8.0.100in 8.0.61 the preferences file for
Preferences.Default
was stored in: C:\Users\Andrew\AppData\Roaming\[publisher]\[package]\Settings\preferences.datand in 8.0.100 it is loaded from: C:\Users\Andrew\AppData\Local\[publisher]\[package]\Settings\preferences.dat
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
8.0.100 SR10
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.61 SR6.1
Affected platforms
Windows
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output