You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AssemblyLoadContext issue with satellite assemblies on Browser #39379
The tests System.Runtime.Loader.Tests.SatelliteAssembliesTests.SatelliteLoadsCorrectly and System.Runtime.Loader.Tests.GetAssemblyNameTest_ValidAssembly can't load satellite assemblies for some reason, we should investigate.
For: System.Runtime.Loader.Tests.GetAssemblyNameTest_ValidAssembly we can add System.Runtime.Loader.Tests.dll to the VFS until we have ALC support to load by name from the bundle.
For: System.Runtime.Loader.Tests.SatelliteAssembliesTests.SatelliteLoadsCorrectly still investigating.
So looking a little bit deeper on the SatelliteAssembly case. It seems like the satellite assemblies are not in the bundle, they're in the VFS. For example this is an entry of the mono-config:
We never find the matching name... this is what we have in the bundle:
*** ENTERED mono_assembly_open_from_bundle
*** lowercase_filename=system.runtime.loader.tests.resources.dll
*** PROBING against xunit.runner.utility.netcoreapp10.dll
*** PROBING against xunit.execution.dotnet.dll
*** PROBING against xunit.core.dll
*** PROBING against xunit.assert.dll
*** PROBING against xunit.abstractions.dll
*** PROBING against WasmTestRunner.dll
*** PROBING against TestUtilities.dll
*** PROBING against System.Xml.XPath.XDocument.dll
*** PROBING against System.Xml.XPath.dll
*** PROBING against System.Xml.XmlSerializer.dll
*** PROBING against System.Xml.XDocument.dll
*** PROBING against System.Xml.ReaderWriter.dll
*** PROBING against System.Web.HttpUtility.dll
*** PROBING against System.Transactions.Local.dll
*** PROBING against System.Threading.ThreadPool.dll
*** PROBING against System.Threading.Thread.dll
*** PROBING against System.Threading.Tasks.Parallel.dll
*** PROBING against System.Threading.Tasks.dll
*** PROBING against System.Threading.Overlapped.dll
*** PROBING against System.Threading.Channels.dll
*** PROBING against System.Threading.dll
*** PROBING against System.Text.RegularExpressions.dll
*** PROBING against System.Text.Encoding.Extensions.dll
*** PROBING against System.Text.Encoding.dll
*** PROBING against System.Security.Principal.Windows.dll
*** PROBING against System.Security.Cryptography.X509Certificates.dll
*** PROBING against System.Security.Cryptography.Primitives.dll
*** PROBING against System.Security.Cryptography.Encoding.dll
*** PROBING against System.Security.Cryptography.Csp.dll
*** PROBING against System.Security.Cryptography.Algorithms.dll
*** PROBING against System.Security.Claims.dll
*** PROBING against System.Security.AccessControl.dll
*** PROBING against System.Runtime.Serialization.Xml.dll
*** PROBING against System.Runtime.Serialization.Primitives.dll
*** PROBING against System.Runtime.Serialization.Json.dll
*** PROBING against System.Runtime.Serialization.Formatters.dll
*** PROBING against System.Runtime.Numerics.dll
*** PROBING against System.Runtime.Loader.Tests.dll
*** PROBING against System.Runtime.Loader.Test.ContextualReflectionDependency.dll
*** PROBING against System.Runtime.Loader.dll
*** PROBING against System.Runtime.InteropServices.RuntimeInformation.dll
*** PROBING against System.Runtime.InteropServices.JavaScript.dll
*** PROBING against System.Runtime.InteropServices.dll
*** PROBING against System.Runtime.Extensions.dll
*** PROBING against System.Runtime.CompilerServices.VisualC.dll
*** PROBING against System.Runtime.CompilerServices.Unsafe.dll
*** PROBING against System.Runtime.dll
*** PROBING against System.Resources.Writer.dll
*** PROBING against System.Resources.ResourceManager.dll
*** PROBING against System.Reflection.TypeExtensions.dll
*** PROBING against System.Reflection.Primitives.dll
*** PROBING against System.Reflection.Metadata.dll
*** PROBING against System.Reflection.Extensions.dll
*** PROBING against System.Reflection.Emit.Lightweight.dll
*** PROBING against System.Reflection.Emit.ILGeneration.dll
*** PROBING against System.Reflection.Emit.dll
*** PROBING against System.Reflection.DispatchProxy.dll
*** PROBING against System.Reflection.dll
*** PROBING against System.Private.Xml.Linq.dll
*** PROBING against System.Private.Xml.dll
*** PROBING against System.Private.Uri.dll
*** PROBING against System.Private.DataContractSerialization.dll
*** PROBING against System.Private.CoreLib.dll
*** PROBING against System.ObjectModel.dll
*** PROBING against System.Numerics.Vectors.dll
*** PROBING against System.Net.WebSockets.Client.dll
*** PROBING against System.Net.WebSockets.dll
*** PROBING against System.Net.WebProxy.dll
*** PROBING against System.Net.WebHeaderCollection.dll
*** PROBING against System.Net.WebClient.dll
*** PROBING against System.Net.Sockets.dll
*** PROBING against System.Net.ServicePoint.dll
*** PROBING against System.Net.Security.dll
*** PROBING against System.Net.Requests.dll
*** PROBING against System.Net.Primitives.dll
*** PROBING against System.Net.Ping.dll
*** PROBING against System.Net.NetworkInformation.dll
*** PROBING against System.Net.NameResolution.dll
*** PROBING against System.Net.Mail.dll
*** PROBING against System.Net.HttpListener.dll
*** PROBING against System.Net.Http.dll
*** PROBING against System.Memory.dll
*** PROBING against System.Linq.Queryable.dll
*** PROBING against System.Linq.Parallel.dll
*** PROBING against System.Linq.Expressions.dll
*** PROBING against System.Linq.dll
*** PROBING against System.IO.Pipes.dll
*** PROBING against System.IO.MemoryMappedFiles.dll
*** PROBING against System.IO.IsolatedStorage.dll
*** PROBING against System.IO.FileSystem.Watcher.dll
*** PROBING against System.IO.FileSystem.DriveInfo.dll
*** PROBING against System.IO.FileSystem.AccessControl.dll
*** PROBING against System.IO.FileSystem.dll
*** PROBING against System.IO.Compression.ZipFile.dll
*** PROBING against System.IO.Compression.Brotli.dll
*** PROBING against System.IO.Compression.dll
*** PROBING against System.IO.dll
*** PROBING against System.Globalization.dll
*** PROBING against System.Formats.Asn1.dll
*** PROBING against System.Drawing.Primitives.dll
*** PROBING against System.Drawing.dll
*** PROBING against System.Diagnostics.Tracing.dll
*** PROBING against System.Diagnostics.TraceSource.dll
*** PROBING against System.Diagnostics.TextWriterTraceListener.dll
*** PROBING against System.Diagnostics.StackTrace.dll
*** PROBING against System.Diagnostics.Process.dll
*** PROBING against System.Diagnostics.FileVersionInfo.dll
*** PROBING against System.Diagnostics.DiagnosticSource.dll
*** PROBING against System.Diagnostics.Debug.dll
*** PROBING against System.Diagnostics.Contracts.dll
*** PROBING against System.Data.Common.dll
*** PROBING against System.Console.dll
*** PROBING against System.ComponentModel.TypeConverter.dll
*** PROBING against System.ComponentModel.Primitives.dll
*** PROBING against System.ComponentModel.EventBasedAsync.dll
*** PROBING against System.ComponentModel.dll
*** PROBING against System.Collections.Specialized.dll
*** PROBING against System.Collections.NonGeneric.dll
*** PROBING against System.Collections.Immutable.dll
*** PROBING against System.Collections.Concurrent.dll
*** PROBING against System.Collections.dll
*** PROBING against System.Buffers.dll
*** PROBING against ReferencedClassLibNeutralIsSatellite.dll
*** PROBING against ReferencedClassLib.dll
*** PROBING against NuGet.Frameworks.dll
*** PROBING against netstandard.dll
*** PROBING against mscorlib.dll
*** PROBING against Mono.Options.dll
*** PROBING against Microsoft.Win32.Registry.dll
*** PROBING against Microsoft.Win32.Primitives.dll
*** PROBING against Microsoft.VisualStudio.TestPlatform.ObjectModel.dll
*** PROBING against Microsoft.TestPlatform.PlatformAbstractions.dll
*** PROBING against Microsoft.TestPlatform.CoreUtilities.dll
*** PROBING against Microsoft.DotNet.XUnitExtensions.dll
*** PROBING against Microsoft.DotNet.XHarness.TestRunners.Xunit.dll
*** PROBING against Microsoft.DotNet.XHarness.TestRunners.Common.dll
*** PROBING against Microsoft.DotNet.RemoteExecutor.dll
*** PROBING against Microsoft.Diagnostics.Runtime.dll
So I wonder, if this is a test setup issue where the satellite assemblies are not passed as extra assemblies so that they're added into the bundle, or if customers will hit this issue with their satellite assemblies?
Also, I don't see the assembly culture being taking into consideration at all, since we have two satellite assemblies with the same name in this scenario one for en and one for es-MX
Another thing I notice for the satellite assemblies is that we lowercase the file name but we're comparing against the bundle list of names which are not lowercase.
Would PublishTrimmed include the satellite assemblies in the output?
Yes. Satellite assemblies coming from a NuGet package don't get passed to the ILLinker at all. They are always copied to the publish directory by the Publish target.
Activity
steveisok commentedon Jul 23, 2020
@akoeplinger was this before or after enabling ICU?
akoeplinger commentedon Jul 24, 2020
Since I opened this 9 days ago and ICU was merged 8 days ago probably before :)
I tried reenabling the tests but they still failed.
safern commentedon Jul 24, 2020
I'm looking at this.
For:
System.Runtime.Loader.Tests.GetAssemblyNameTest_ValidAssemblywe can addSystem.Runtime.Loader.Tests.dllto theVFSuntil we have ALC support to load by name from the bundle.For:
System.Runtime.Loader.Tests.SatelliteAssembliesTests.SatelliteLoadsCorrectlystill investigating.safern commentedon Jul 25, 2020
So looking a little bit deeper on the
SatelliteAssemblycase. It seems like the satellite assemblies are not in the bundle, they're in the VFS. For example this is an entry of the mono-config:However, when we try to find the assembly in the bundle here:
runtime/src/mono/mono/metadata/assembly.c
Line 2502 in 8465be7
We never find the matching name... this is what we have in the bundle:
So I wonder, if this is a test setup issue where the satellite assemblies are not passed as extra assemblies so that they're added into the bundle, or if customers will hit this issue with their satellite assemblies?
Also, I don't see the assembly culture being taking into consideration at all, since we have two satellite assemblies with the same name in this scenario one for
enand one fores-MXWhat are your guys recommendations here?
safern commentedon Jul 25, 2020
Another thing I notice for the satellite assemblies is that we lowercase the file name but we're comparing against the bundle list of names which are not lowercase.
steveisok commentedon Jul 27, 2020
Interesting. Would
PublishTrimmedinclude the satellite assemblies in the output?safern commentedon Jul 27, 2020
@eerhardt @marek-safar for that question.
eerhardt commentedon Jul 27, 2020
Yes. Satellite assemblies coming from a NuGet package don't get passed to the ILLinker at all. They are always copied to the publish directory by the Publish target.
cc @sbomer
safern commentedon Jul 28, 2020
cc: @lewing
SamMonoRT commentedon Aug 10, 2020
cc: @CoffeeFlux will reach out to @safern
[WASM] Add satellite assemblies bundle and hook to register them (#20308