diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b378232fa..675385fc7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,9 +7,16 @@ jobs: - job: Windows pool: - vmImage: windows-latest + vmImage: windows-2019 + steps: + - task: UseDotNet@2 + displayName: 'Install .NET Core 1.1.2' + inputs: + version: 1.1.2 + type: runtime + - powershell: .\build.ps1 -Target Test -Configuration Release displayName: Build and test diff --git a/build.cake b/build.cake index 418502854..2345a0d8b 100644 --- a/build.cake +++ b/build.cake @@ -311,6 +311,7 @@ Task("TestNetCore31Console") Task("TestNetStandard16Engine") .Description("Tests the .NET Standard Engine") .IsDependentOn("Build") + .WithCriteria(!BuildSystem.IsRunningOnAzurePipelines) //Unable to find Azure build supporting both .NET Core 1.1 and .NET Core 3.1 .OnError(exception => { ErrorDetail.Add(exception.Message); }) .Does(() => { @@ -658,10 +659,10 @@ bool CheckIfDotNetCoreInstalled() { try { - Information("Checking if .NET Core SDK is installed"); + Information("Checking if .NET Core SDK is installed..."); StartProcess("dotnet", new ProcessSettings { - Arguments = "--version" + Arguments = "--info" }); } catch(Exception) @@ -692,7 +693,7 @@ FilePath GetResultXmlPath(string testAssembly, string framework) { var assemblyName = System.IO.Path.GetFileNameWithoutExtension(testAssembly); - // Required for Test suites running under NUnitLite + // Required for test suites running under NUnitLite CreateDirectory($@"test-results\{framework}"); return MakeAbsolute(new FilePath($@"test-results\{framework}\{assemblyName}.xml")); diff --git a/src/NUnitEngine/nunit.engine/Runners/MasterTestRunner.cs b/src/NUnitEngine/nunit.engine/Runners/MasterTestRunner.cs index 328214822..79a09f029 100644 --- a/src/NUnitEngine/nunit.engine/Runners/MasterTestRunner.cs +++ b/src/NUnitEngine/nunit.engine/Runners/MasterTestRunner.cs @@ -57,9 +57,9 @@ public class MasterTestRunner : ITestRunner private readonly IServiceLocator _services; #if !NETSTANDARD1_6 private readonly ExtensionService _extensionService; -#if !NETSTANDARD2_0 - private readonly IRuntimeFrameworkService _runtimeService; #endif +#if NETFRAMEWORK + private readonly IRuntimeFrameworkService _runtimeService; #endif private readonly IProjectService _projectService; private ITestRunnerFactory _testRunnerFactory;