-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android: IsolatedStorageFile path changes #83231
Comments
Tagging subscribers to this area: @dotnet/area-system-io Issue DetailsDescriptionThe
This creates problems using the file when upgrading the application to .NET 7, as the file cannot be used in an I saw that a similar problem existed for iOS in #74642 and has been fixed, one behaviour on Android remains the same. Reproduction Steps
Code example:
Expected behaviorThe file will be found along the same path Actual behaviorThe file of the previous version will not be found. A new file is created on the new path Regression?Yes, this is a regression. The file system path for IsolatedStorageFile was consistent in .NET Framework applications Known WorkaroundsI don't know a workaround for getting the old file using Code example:
Configuration.NET SDK: Runtime Environment: Host: Other informationNo response
|
Tagging subscribers to 'arch-android': @steveisok, @akoeplinger Issue DetailsDescriptionThe
This creates problems using the file when upgrading the application to .NET 7, as the file cannot be used in an I saw that a similar problem existed for iOS in #74642 and has been fixed, one behaviour on Android remains the same. Reproduction Steps
Code example:
Expected behaviorThe file will be found along the same path Actual behaviorThe file of the previous version will not be found. A new file is created on the new path Regression?Yes, this is a regression. The file system path for IsolatedStorageFile was consistent in .NET Framework applications Known WorkaroundsI don't know a workaround for getting the old file using Code example:
Configuration.NET SDK: Runtime Environment: Host: Other informationNo response
|
@mkhamoyan please take a look and if it makes sense, adapt the ios changes you made for android. |
Description
The
IsolatedStorageFile.GetUserStoreForApplication()
call returns an object that has different paths depending on the build:/data/user/0/{packageName}/files/.config/.isolated-storage
;/data/user/0/{packageName}/files/.isolated-storage/{hash}/{hash}/AppFiles/
.This creates problems using the file when upgrading the application to .NET 7, as the file cannot be used in an
IsolatedStorageFileStream
and all data is lost.I saw that a similar problem existed for iOS in #74642 and has been fixed, one behaviour on Android remains the same.
Reproduction Steps
IsolatedStorageFileStream
;Code example:
Expected behavior
The file will be found along the same path
Actual behavior
The file of the previous version will not be found. A new file is created on the new path
Regression?
Yes, this is a regression. The file system path for IsolatedStorageFile was consistent in .NET Framework applications
Known Workarounds
I don't know a workaround for getting the old file using
IsolatedStorageFileStream
. The only thing, we can replaceIsolatedStorageFileStream
withFileStream
and manually specify the file path.Code example:
Configuration
.NET SDK:
Version: 7.0.200
Commit: 534117727b
Runtime Environment:
OS Name: Mac OS X
OS Version: 13.0
OS Platform: Darwin
RID: osx.13-x64
Base Path: /usr/local/share/dotnet/sdk/7.0.200/
Host:
Version: 7.0.3
Architecture: x64
Commit: 0a2bda1
Other information
No response
The text was updated successfully, but these errors were encountered: