Skip to content

Commit

Permalink
Merge pull request #854 from nunit/issue-725
Browse files Browse the repository at this point in the history
Remove netstandard1.6 and netcoreapp1.1 builds
  • Loading branch information
CharliePoole committed Jan 16, 2021
2 parents edcbd83 + 770ed1e commit f929716
Show file tree
Hide file tree
Showing 85 changed files with 61 additions and 422 deletions.
38 changes: 0 additions & 38 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ jobs:

steps:

- task: UseDotNet@2
displayName: 'Install .NET Core 1.1.2'
inputs:
packageType: runtime
version: 1.1.2
installationPath: C:/Program Files/dotnet

- powershell: .\build.ps1 -Target Test -Configuration Release
displayName: Build and test

Expand All @@ -30,14 +23,6 @@ jobs:
mergeTestResults: true
testRunTitle: net35/Windows
condition: succeededOrFailed()
- task: PublishTestResults@2
displayName: Publish netcoreapp1.1 test results
inputs:
testResultsFormat: NUnit
testResultsFiles: test-results\netcoreapp1.1\*.xml
mergeTestResults: true
testRunTitle: netcoreapp1.1/Windows
condition: succeededOrFailed()
- task: PublishTestResults@2
displayName: Publish netcoreapp2.1 test results
inputs:
Expand Down Expand Up @@ -66,7 +51,6 @@ jobs:
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sharedframework-microsoft.netcore.app-1.1.2
sudo apt-get install dotnet-sdk-2.2
sudo apt-get install dotnet-runtime-5.0
./build.sh --target=Test --configuration=Release
Expand All @@ -81,14 +65,6 @@ jobs:
mergeTestResults: true
testRunTitle: net35/Linux
condition: succeededOrFailed()
- task: PublishTestResults@2
displayName: Publish netcoreapp1.1 test results
inputs:
testResultsFormat: NUnit
testResultsFiles: test-results/netcoreapp1.1/*.xml
mergeTestResults: true
testRunTitle: netcoreapp1.1/Linux
condition: succeededOrFailed()
- task: PublishTestResults@2
displayName: Publish netcoreapp2.1 test results
inputs:
Expand Down Expand Up @@ -120,12 +96,6 @@ jobs:
packageType: runtime
version: 2.1.x

- task: UseDotNet@2
displayName: 'Install .NET Core runtime 1.1'
inputs:
packageType: runtime
version: 1.1.x

- bash: |
dotnet tool install --global Cake.Tool
dotnet cake --target=Test --configuration=Release
Expand All @@ -140,14 +110,6 @@ jobs:
mergeTestResults: true
testRunTitle: net35/macOS
condition: succeededOrFailed()
- task: PublishTestResults@2
displayName: Publish netcoreapp1.1 test results
inputs:
testResultsFormat: NUnit
testResultsFiles: test-results/netcoreapp1.1/*.xml
mergeTestResults: true
testRunTitle: netcoreapp1.1/macOS
condition: succeededOrFailed()
- task: PublishTestResults@2
displayName: Publish netcoreapp2.1 test results
inputs:
Expand Down
45 changes: 18 additions & 27 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ var PROJECT_DIR = Context.Environment.WorkingDirectory.FullPath + "/";
var PACKAGE_DIR = Argument("artifact-dir", PROJECT_DIR + "package") + "/";
var BIN_DIR = PROJECT_DIR + "bin/" + configuration + "/";
var NET35_BIN_DIR = BIN_DIR + "net35/";
var NETCOREAPP11_BIN_DIR = BIN_DIR + "netcoreapp1.1/";
var NETCOREAPP21_BIN_DIR = BIN_DIR + "netcoreapp2.1/";
var NETCOREAPP31_BIN_DIR = BIN_DIR + "netcoreapp3.1/";
var CHOCO_DIR = PROJECT_DIR + "choco/";
Expand Down Expand Up @@ -142,6 +141,17 @@ Task("Clean")
CleanDirectory(PACKAGE_DIR);
});

// Not currently used in CI but useful for cleaning your local obj
// directories, particularly after changing the target of a project.
Task("CleanAll")
.Description("Cleans obj directories in additon to standard clean")
.IsDependentOn("Clean")
.Does(() =>
{
foreach (var dir in GetDirectories(PROJECT_DIR + "src/**/obj/"))
DeleteDirectory(dir, new DeleteDirectorySettings() { Recursive = true });
});

//////////////////////////////////////////////////////////////////////
// INITIALIZE FOR BUILD
//////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -192,25 +202,25 @@ MSBuildSettings CreateMSBuildSettings(string target)
}

Task("Build")
.Description("Builds the engine and console")
.Description("Builds the engine and console")
.IsDependentOn("UpdateAssemblyInfo")
.Does(() =>
{
MSBuild(SOLUTION_FILE, CreateMSBuildSettings("Build").WithRestore());
Information("Publishing .NET Core & Standard projects so that dependencies are present...");
foreach(var framework in new [] { "netstandard1.6", "netstandard2.0", "netcoreapp3.1" })
MSBuild(ENGINE_CSPROJ, CreateMSBuildSettings("Publish")
.WithProperty("TargetFramework", framework)
.WithProperty("PublishDir", BIN_DIR + framework));
foreach(var framework in new [] { "netstandard2.0", "netcoreapp3.1" })
MSBuild(ENGINE_CSPROJ, CreateMSBuildSettings("Publish")
.WithProperty("TargetFramework", framework)
.WithProperty("PublishDir", BIN_DIR + framework));
foreach(var framework in new [] { "netstandard1.6", "netstandard2.0" })
foreach (var framework in new [] { "netstandard2.0" })
MSBuild(ENGINE_API_CSPROJ, CreateMSBuildSettings("Publish")
.WithProperty("TargetFramework", framework)
.WithProperty("PublishDir", BIN_DIR + framework));
foreach(var framework in new [] { "netcoreapp1.1", "netcoreapp2.1", "netcoreapp3.1" })
foreach(var framework in new [] { "netcoreapp2.1", "netcoreapp3.1" })
MSBuild(ENGINE_TESTS_CSPROJ, CreateMSBuildSettings("Publish")
.WithProperty("TargetFramework", framework)
.WithProperty("PublishDir", BIN_DIR + framework));
Expand Down Expand Up @@ -300,24 +310,6 @@ Task("TestNetCore31Console")
}
});

//////////////////////////////////////////////////////////////////////
// TEST NETSTANDARD 1.6 ENGINE
//////////////////////////////////////////////////////////////////////

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(() =>
{
RunDotnetCoreNUnitLiteTests(
NETCOREAPP11_BIN_DIR + ENGINE_TESTS,
NETCOREAPP11_BIN_DIR,
"netcoreapp1.1",
ref ErrorDetail);
});

//////////////////////////////////////////////////////////////////////
// TEST NETSTANDARD 2.0 ENGINE
//////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -826,7 +818,6 @@ Task("TestConsole")
Task("TestEngine")
.Description("Builds and tests the engine")
.IsDependentOn("TestNet20Engine")
.IsDependentOn("TestNetStandard16Engine")
.IsDependentOn("TestNetStandard20Engine")
.IsDependentOn("TestNetCore31Engine");

Expand Down
6 changes: 0 additions & 6 deletions nuget/engine/nunit.engine.api.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
<copyright>Copyright (c) 2020 Charlie Poole, Rob Prouse</copyright>
<dependencies>
<group targetFramework="net20" />
<group targetFramework="netstandard1.6">
<dependency id="NETStandard.Library" version="1.6.1" />
<dependency id="System.Runtime.Loader" version="4.3.0" exclude="compile" />
<dependency id="System.Xml.XPath.XmlDocument" version="4.3.0" exclude="compile" />
</group>
<group targetFramework="netstandard2.0">
<dependency id="System.Xml.XPath.XmlDocument" version="4.3.0" exclude="compile" />
</group>
Expand All @@ -33,7 +28,6 @@
<files>
<file src="LICENSE.txt" />
<file src="bin/net20/nunit.engine.api.dll" target="lib/net20" />
<file src="bin/netstandard1.6/nunit.engine.api.dll" target="lib/netstandard1.6" />
<file src="bin/netstandard2.0/nunit.engine.api.dll" target="lib/netstandard2.0" />
<file src="..\..\nunit_256.png" target="images" />
</files>
Expand Down
13 changes: 0 additions & 13 deletions nuget/engine/nunit.engine.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@
<copyright>Copyright (c) 2020 Charlie Poole, Rob Prouse</copyright>
<dependencies>
<group targetFramework="net20" />
<group targetFramework="netstandard1.6">
<dependency id="NETStandard.Library" version="1.6.1" />
<dependency id="Microsoft.DotNet.InternalAbstractions" version="1.0.0" exclude="compile" />
<dependency id="System.ComponentModel.TypeConverter" version="4.3.0" exclude="compile" />
<dependency id="System.Reflection" version="4.3.0" exclude="compile" />
<dependency id="System.Diagnostics.Process" version="4.3.0" exclude="compile" />
<dependency id="System.Xml.XPath.XmlDocument" version="4.3.0" exclude="compile" />
</group>
<group targetFramework="netstandard2.0">
<dependency id="NETStandard.Library" version="2.0.0" />
<dependency id="System.ComponentModel.TypeConverter" version="4.3.0" exclude="compile" />
Expand Down Expand Up @@ -72,11 +64,6 @@
<file src="../../nuget/engine/nunit.engine.nuget.addins" target="contentFiles/any/lib/net20"/>
<file src="../../nuget/engine/nunit.agent.addins" target="contentFiles/any/agents/net20"/>
<file src="../../nuget/engine/nunit.agent.addins" target="contentFiles/any/agents/net40"/>
<file src="bin/netstandard1.6/nunit.engine.dll" target="lib/netstandard1.6" />
<file src="bin/netstandard1.6/nunit.engine.core.dll" target="lib/netstandard1.6" />
<file src="bin/netstandard1.6/nunit.engine.api.dll" target="lib/netstandard1.6" />
<file src="bin/netstandard1.6/testcentric.engine.metadata.dll" target="lib/netstandard1.6" />
<file src="../../nuget/engine/nunit.engine.nuget.addins" target="contentFiles/any/lib/netstandard1.6"/>
<file src="bin/netstandard2.0/nunit.engine.dll" target="lib/netstandard2.0" />
<file src="bin/netstandard2.0/nunit.engine.core.dll" target="lib/netstandard2.0" />
<file src="bin/netstandard2.0/nunit.engine.api.dll" target="lib/netstandard2.0" />
Expand Down
7 changes: 1 addition & 6 deletions package-checks.cake
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,15 @@ public void CheckAllPackages()
CheckNuGetPackage("NUnit.Engine",
HasFiles("LICENSE.txt", "NOTICES.txt", "CHANGES.txt"),
HasDirectory("lib/net20").WithFiles(ENGINE_FILES),
HasDirectory("lib/netstandard1.6").WithFiles(ENGINE_FILES),
HasDirectory("lib/netstandard2.0").WithFiles(ENGINE_FILES),
HasDirectory("contentFiles/any/lib/net20").WithFile("nunit.engine.nuget.addins"),
HasDirectory("contentFiles/any/lib/netstandard1.6").WithFile("nunit.engine.nuget.addins"),
HasDirectory("contentFiles/any/lib/netstandard2.0").WithFile("nunit.engine.nuget.addins"),
HasDirectory("contentFiles/any/agents/net20").WithFiles(AGENT_FILES).AndFile("nunit.agent.addins"),
HasDirectory("contentFiles/any/agents/net40").WithFiles(AGENT_FILES).AndFile("nunit.agent.addins")) &
CheckNuGetPackage(
"NUnit.Engine.Api",
HasFile("LICENSE.txt"),
HasDirectory("lib/net20").WithFile("nunit.engine.api.dll"),
HasDirectory("lib/netstandard1.6").WithFile("nunit.engine.api.dll"),
HasDirectory("lib/netstandard2.0").WithFile("nunit.engine.api.dll")) &
CheckNuGetPackage(
"NUnit.Runners",
Expand All @@ -56,10 +53,8 @@ public void CheckAllPackages()
HasFiles("LICENSE.txt", "license.rtf", "NOTICES.txt", "CHANGES.txt"),
HasDirectory("bin/net20").WithFiles("nunit3-console.exe", "nunit3-console.exe.config").AndFiles(ENGINE_FILES),
HasDirectory("bin/net35").WithFiles("nunit3-console.exe", "nunit3-console.exe.config").AndFiles(ENGINE_FILES),
HasDirectory("bin/netstandard1.6").WithFiles(ENGINE_FILES),
HasDirectory("bin/netstandard2.0").WithFiles(ENGINE_FILES),
HasDirectory("bin/netcoreapp1.1").WithFiles(ENGINE_FILES),
HasDirectory("bin/netcoreapp1.1").WithFiles(ENGINE_FILES),
HasDirectory("bin/netcoreapp2.1").WithFiles(ENGINE_FILES),
HasDirectory("bin/agents/net20").WithFiles(AGENT_FILES),
HasDirectory("bin/agents/net40").WithFiles(AGENT_FILES)) &
CheckMsiPackage("NUnit.Console",
Expand Down
4 changes: 0 additions & 4 deletions src/CommonAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
[assembly: AssemblyConfiguration(".NET 3.5 Debug")]
#elif NET20
[assembly: AssemblyConfiguration(".NET 2.0 Debug")]
#elif NETSTANDARD1_6 || NETCOREAPP1_1
[assembly: AssemblyConfiguration(".NET Standard 1.6 Debug")]
#elif NETSTANDARD2_0 || NETCOREAPP2_1
[assembly: AssemblyConfiguration(".NET Standard 2.0 Debug")]
#else
Expand All @@ -47,8 +45,6 @@
[assembly: AssemblyConfiguration(".NET 3.5")]
#elif NET20
[assembly: AssemblyConfiguration(".NET 2.0")]
#elif NETSTANDARD1_6 || NETCOREAPP1_1
[assembly: AssemblyConfiguration(".NET Standard 1.6")]
#elif NETSTANDARD2_0 || NETCOREAPP2_1
[assembly: AssemblyConfiguration(".NET Standard 2.0")]
#else
Expand Down
2 changes: 1 addition & 1 deletion src/NUnitEngine/EngineApiVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@

[assembly: AssemblyProduct("NUnit Engine API")]
[assembly: AssemblyVersion("3.0.0.0")]
[assembly: AssemblyInformationalVersion("3.12.0")]
[assembly: AssemblyInformationalVersion("3.12.0-beta1")]
[assembly: AssemblyFileVersion("3.12.0")]
2 changes: 0 additions & 2 deletions src/NUnitEngine/mock-assembly/MockAssembly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ public class MockAssembly

public const int Inconclusive = MockTestFixture.Inconclusive;

#if !NETCOREAPP1_1
public static readonly string AssemblyPath = AssemblyHelper.GetAssemblyPath(typeof(MockAssembly).Assembly);
#endif
}

[TestFixture(Description="Fake Test Fixture")]
Expand Down
7 changes: 2 additions & 5 deletions src/NUnitEngine/mock-assembly/mock-assembly.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<RootNamespace>NUnit.Tests</RootNamespace>
<TargetFrameworks>net35;netcoreapp1.1;netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net35;netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\nunit.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp1.1'">
<PackageReference Include="NUnit" Version="3.12.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'!='netcoreapp1.1'">
<ItemGroup>
<PackageReference Include="NUnit" Version="3.13.0-dev-06899" />
</ItemGroup>
<ItemGroup>
Expand Down
7 changes: 2 additions & 5 deletions src/NUnitEngine/notest-assembly/notest-assembly.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<RootNamespace>notest_assembly</RootNamespace>
<TargetFrameworks>net35;netcoreapp1.1;netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net35;netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp1.1'">
<PackageReference Include="NUnit" Version="3.12.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'!='netcoreapp1.1'">
<ItemGroup>
<PackageReference Include="NUnit" Version="3.13.0-dev-06899" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
// ***********************************************************************

using System;
#if !NETSTANDARD1_6
using System.Runtime.Serialization;
#endif

namespace NUnit.Engine
{
Expand All @@ -33,9 +31,7 @@ namespace NUnit.Engine
/// called with improper values or when a particular facility
/// is not available.
/// </summary>
#if !NETSTANDARD1_6
[Serializable]
#endif
public class NUnitEngineException : Exception
{
/// <summary>
Expand All @@ -52,11 +48,9 @@ public NUnitEngineException(string message, Exception innerException) : base(mes
{
}

#if !NETSTANDARD1_6
/// <summary>
/// Serialization constructor
/// </summary>
public NUnitEngineException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ namespace NUnit.Engine
/// <summary>
/// The exception that is thrown if a valid test engine is not found
/// </summary>
#if !NETSTANDARD1_6
[Serializable]
#endif
public class NUnitEngineNotFoundException : Exception
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@

using System;
using System.Collections.Generic;
#if !NETSTANDARD1_6
using System.Runtime.Serialization;
#endif

namespace NUnit.Engine
{
Expand All @@ -35,9 +33,7 @@ namespace NUnit.Engine
/// but one or more errors were encountered when attempting to unload
/// and shut down the test run cleanly.
/// </summary>
#if !NETSTANDARD1_6
[Serializable]
#endif
public class NUnitEngineUnloadException : NUnitEngineException //Inherits from NUnitEngineException for backwards compatibility of calling runners
{
private const string AggregatedExceptionsMsg =
Expand Down Expand Up @@ -66,12 +62,10 @@ public NUnitEngineUnloadException(ICollection<Exception> aggregatedExceptions) :
AggregatedExceptions = aggregatedExceptions;
}

#if !NETSTANDARD1_6
/// <summary>
/// Serialization constructor.
/// </summary>
public NUnitEngineUnloadException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif

/// <summary>
/// Gets the collection of exceptions .
Expand Down

0 comments on commit f929716

Please sign in to comment.