Closed ericstj closed 3 years ago
Tagging subscribers to this area: @agocke See info in area-owners.md if you want to be subscribed.
Mitigated by https://github.com/dotnet/runtime/pull/42435
Mitigated by #42435
I am not seeing any difference in behavior. The above repro still throws NotSupportedException with today's (two hours old) master branch and 5.0 latest preview.
Including passing the flag IncludeAllContentForSelfExtract
?
Yup, I tried publishing with a fresh local build of master:
dotnet publish -r osx-x64 -p:IncludeAllContentForSelfExtract=True -p:PublishSingleFile=True -c Release
throws:
System.NotSupportedException: CodeBase is not supported on assemblies loaded from a single-file bundle.
at System.Reflection.RuntimeAssembly.get_CodeBase()
at System.IO.IsolatedStorage.Helper.GetDefaultIdentityAndHash(Object& identity, String& hash, Char separator)
at System.IO.IsolatedStorage.IsolatedStorage.InitStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType)
at System.IO.IsolatedStorage.IsolatedStorageFile..ctor(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication()
at isolated.Program.Main(String[] args)
revision:
$ strings /Users/am11/projects/runtime_base/.dotnet2/dotnet 2>&1 | grep Commit
@(#)Version 42.42.42.42424 @Commit: 30e643e2f2433055d6ed433af38a925ee657d4ad
Looks like the 6.0 installer builds have been blocked for quite a while now. Testing locally, looks like CodeBase works appropriately in 5.0 RTM.
Confirmed. With 5.0.100-rtm.20506.2
(runtime: 30e643e2f2433055d6ed433af38a925ee657d4a), it does not throw NotSupportedException
. If there is no further action required, shall we close this issue and #42306?
Confirmed. With
5.0.100-rtm.20506.2
(runtime: 30e643e), it does not throwNotSupportedException
. If there is no further action required, shall we close this issue and #42306?
@ericstj do we still want to merge the PR #42306 to main? Would we be interested in backporting it to 5.0 at some point? I ask because @agocke mentioned that #42435 was a mitigation, but not the actual fix.
Yes merging to master is fine. We can service to 5.0 if anyone is blocked and can’t use the workaround.
Hi. This occurs for me on 5.0.203. It's a WPF app, published via ClickOnce, single file, self-contained.
System.NotSupportedException: CodeBase is not supported on assemblies loaded from a single-file bundle. at System.Reflection.RuntimeAssembly.get_CodeBase() at System.IO.IsolatedStorage.Helper.GetDefaultIdentityAndHash(Object& identity, String& hash, Char separator) at System.IO.IsolatedStorage.IsolatedStorage.InitStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType) at System.IO.IsolatedStorage.IsolatedStorageFile..ctor(IsolatedStorageScope scope) at System.IO.IsolatedStorage.IsolatedStorageFile.GetMachineStoreForApplication() at MyApp.App.Application_Startup(Object sender, StartupEventArgs e)
Should be resolved in 6.0
Description
Create an app using IsolatedStorage. Publish as single file.
Configuration
.NET 5.0 Single file publish Tested on win-x64 but should be present everywhere.
Regression?
Yes. Worked in 3.1
Regressed by https://github.com/dotnet/runtime/pull/40974
Related https://github.com/dotnet/runtime/issues/42161