Fix if condition in AssemblyLoadContext
authorSantiago Fernandez Madero <safern@microsoft.com>
Tue, 16 Apr 2019 20:24:55 +0000 (13:24 -0700)
committerSantiago Fernandez Madero <safern@microsoft.com>
Tue, 16 Apr 2019 20:24:55 +0000 (13:24 -0700)
src/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.CoreCLR.cs

index c9bb722..45a2c7f 100644 (file)
@@ -142,7 +142,7 @@ namespace System.Runtime.Loader
             {
                 throw new ArgumentException(SR.ArgumentNull_AssemblyNameName);
             }
-            if (string.IsNullOrEmpty(loadedSimpleName) || requestedSimpleName.Equals(loadedSimpleName, StringComparison.InvariantCultureIgnoreCase))
+            if (string.IsNullOrEmpty(loadedSimpleName) || !requestedSimpleName.Equals(loadedSimpleName, StringComparison.InvariantCultureIgnoreCase))
             {
                 throw new InvalidOperationException(SR.Argument_CustomAssemblyLoadContextRequestedNameMismatch);
             }