diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/InitialisationProcess.cs b/src/Stryker.Core/Stryker.Core/Initialisation/InitialisationProcess.cs index 7a63c6a9f..1e32e0147 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/InitialisationProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/InitialisationProcess.cs @@ -157,9 +157,8 @@ private InitialTestRun InitialTest(IStrykerOptions options, SourceProjectInfo pr return result; } - throw new InputException( - "No test result reported. Make sure your test project contains test and is compatible with VsTest." + - string.Join(Environment.NewLine, projectInfo.Warnings)); + const string Message = "No test result reported. Make sure your test project contains test and is compatible with VsTest."; + throw new InputException(string.Join(Environment.NewLine, projectInfo.Warnings.Prepend(Message))); } private static readonly Dictionary TestFrameworks = new() @@ -207,6 +206,15 @@ private void DiscoverTests(SourceProjectInfo projectInfo, ITestRunner testRunner _logger.LogWarning(message); } + if (!causeFound && testProject.References.Any(r => r.Contains("Microsoft.Testing.Platform"))) + { + causeFound = true; + var message = $"Project '{testProject.ProjectFilePath}' is using Microsoft.Testing.Platform which is not yet supported by Stryker, " + + $"see https://github.com/stryker-mutator/stryker-net/issues/3094"; + projectInfo.LogError(message); + _logger.LogWarning(message); + } + if (causeFound) { continue;