Description
Reading FileSystem.AppDataDirectory during CreateMauiApp causes the app to crash.
Steps to Reproduce
Run reproduction project code.
In short, add FileSystem.AppDataDirectory into the app's startup code in MauiProgram.cs and it fails.
Link to public reproduction project repository
https://github.com/Eddie-Hartman/MAUIFileLockingIssue
Version with bug
9.0.40 SR4
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
9.0.30 SR3
Affected platforms
Windows
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
Description
Reading FileSystem.AppDataDirectory during CreateMauiApp causes the app to crash.
Steps to Reproduce
Run reproduction project code.
In short, add FileSystem.AppDataDirectory into the app's startup code in MauiProgram.cs and it fails.
Link to public reproduction project repository
https://github.com/Eddie-Hartman/MAUIFileLockingIssue
Version with bug
9.0.40 SR4
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
9.0.30 SR3
Affected platforms
Windows
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output