diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/TestEngine.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/TestEngine.cs index 3eff1ebb99..920f78fd83 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/TestEngine.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/TestEngine.cs @@ -664,7 +664,7 @@ private static void WarnAboutNotFoundRuntimeProvidersOrThrowWhenNoneAreFound(Lis throw new ArgumentException(null, nameof(testRuntimeProviders)); // Throw when we did not find any runtime provider for any of the provided sources. - var shouldThrow = testRuntimeProviders.All(runtimeProvider => runtimeProvider == null); + var shouldThrow = testRuntimeProviders.All(runtimeProvider => runtimeProvider.Type == null); var missingRuntimeProviders = testRuntimeProviders.Where(p => p.Type == null); if (missingRuntimeProviders.Any())