From 3924b9852efe6950ed6007297f77463c267c5bb9 Mon Sep 17 00:00:00 2001 From: Terje Sandstrom Date: Mon, 16 Jan 2023 09:34:55 +0100 Subject: [PATCH] Added check in calling method --- .../nunit.engine.core/Internal/TestAssemblyResolver.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/NUnitEngine/nunit.engine.core/Internal/TestAssemblyResolver.cs b/src/NUnitEngine/nunit.engine.core/Internal/TestAssemblyResolver.cs index 52dc78e0d..28de790e0 100644 --- a/src/NUnitEngine/nunit.engine.core/Internal/TestAssemblyResolver.cs +++ b/src/NUnitEngine/nunit.engine.core/Internal/TestAssemblyResolver.cs @@ -77,7 +77,8 @@ private Assembly OnResolving(AssemblyLoadContext context, AssemblyName name) return _loadContext.LoadFromAssemblyPath(assemblyPath); } } - + if (name.Version == null) + return null; foreach(string frameworkDirectory in AdditionalFrameworkDirectories) { var versionDir = FindBestVersionDir(frameworkDirectory, name.Version);