-
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
Fix SingleFile regression in IsolatedStorageFile #42306
Conversation
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.Win32Unix.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.Win32Unix.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.Win32Unix.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.Win32Unix.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.Win32Unix.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.Win32Unix.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.Win32Unix.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. @carlossanlop?
BTW, it still throws NotSupportedException with latest preview bits when |
I'm working on testing for single-file, but it likely won't be finished soon since I have to integrate with other changes to the unit testing. However, we've agreed that this fix doesn't meet the bar for 5.0, so we won't be backporting it. |
Thanks @agocke. |
In .NET 5, (true) single file application returns:
Assembly.GetEntryAssembly().Location
<Unknown>
string fromAssembly.GetEntryAssembly().ManifestModule.Name
System.NotSupportedException: CodeBase is not supported on assemblies loaded from a single-file bundle.
fromAssembly.GetEntryAssembly().assembly.CodeBase
.This change uses
Process.GetCurrentProcess().MainModule.FileName
for single file to fix this 3.1 -> 5.0 regression.Fixes #42265.