From 15664c331d9ec5294c5268183dd5d3ffd2abfe0d Mon Sep 17 00:00:00 2001 From: marko1olo Date: Fri, 5 Jun 2026 22:13:56 +0400 Subject: [PATCH] Clarify MetadataLoadContext load wording --- .../src/Resources/Strings.resx | 2 +- .../src/System/Reflection/MetadataLoadContext.Apis.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/Resources/Strings.resx b/src/libraries/System.Reflection.MetadataLoadContext/src/Resources/Strings.resx index 67ce2367e6842b..3a9fcad7ec133c 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/Resources/Strings.resx +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/Resources/Strings.resx @@ -178,7 +178,7 @@ The assembly '{0}' has already loaded been loaded into this MetadataLoadContext. - Could not find assembly '{0}'. Either explicitly load this assembly using a method such as LoadFromAssemblyPath() or use a MetadataAssemblyResolver that returns a valid assembly. + Could not find assembly '{0}'. Use a MetadataAssemblyResolver that returns a valid assembly for this assembly name. Could not find the module file for '{0}'. diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/MetadataLoadContext.Apis.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/MetadataLoadContext.Apis.cs index 20f09b81e8cbc0..330ab5a1a8a996 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/MetadataLoadContext.Apis.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/MetadataLoadContext.Apis.cs @@ -115,7 +115,7 @@ public MetadataLoadContext(MetadataAssemblyResolver resolver, string? coreAssemb } /// - /// Loads an assembly from a specific path on the disk and binds its assembly name to it in the MetadataLoadContext. If a prior + /// Loads an assembly from a specific path on the disk into the MetadataLoadContext. If a prior /// assembly with the same name was already loaded into the MetadataLoadContext, the prior assembly will be returned. If the /// two assemblies do not have the same Mvid, this method throws a FileLoadException. /// @@ -129,7 +129,7 @@ public Assembly LoadFromAssemblyPath(string assemblyPath) } /// - /// Loads an assembly from a byte array and binds its assembly name to it in the MetadataLoadContext. If a prior + /// Loads an assembly from a byte array into the MetadataLoadContext. If a prior /// assembly with the same name was already loaded into the MetadataLoadContext, the prior assembly will be returned. If the /// two assemblies do not have the same Mvid, this method throws a FileLoadException. /// @@ -143,7 +143,7 @@ public Assembly LoadFromByteArray(byte[] assembly) } /// - /// Loads an assembly from a stream and binds its assembly name to it in the MetadataLoadContext. If a prior + /// Loads an assembly from a stream into the MetadataLoadContext. If a prior /// assembly with the same name was already loaded into the MetadataLoadContext, the prior assembly will be returned. If the /// two assemblies do not have the same Mvid, this method throws a FileLoadException. ///