Skip to content

Commit

Permalink
Drop .NET Core 2.0 targeting in test project (#13)
Browse files Browse the repository at this point in the history
Microsoft's long-term support for .NET Core 1.x and 2.0 [are over][LTS]. Customers targeting these versions are in a really bad place due to no security patches being offered and thus there are likely few to none out there.

[LTS]: https://github.com/dotnet/core/blob/e2f22a7106860c0e5dc98bb36dc648a779944ad5/microsoft-support.md#net-core-releases
  • Loading branch information
AArnott authored Jul 7, 2019
1 parent e1d68f2 commit 835ffb6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
8 changes: 0 additions & 8 deletions azure-pipelines/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@ steps:
workingDirectory: src
condition: eq(variables['Agent.OS'], 'Windows_NT')

- task: DotNetCoreCLI@2
displayName: dotnet test -f netcoreapp2.0
inputs:
command: test
arguments: --no-build -c $(BuildConfiguration) -f netcoreapp2.0 --filter "TestCategory!=FailsInCloudTest" -v n /p:CollectCoverage=true
testRunTitle: netcoreapp2.0-$(Agent.JobName)
workingDirectory: src

- task: DotNetCoreCLI@2
displayName: dotnet test -f netcoreapp2.1
inputs:
Expand Down
4 changes: 2 additions & 2 deletions src/Library.Tests/CalculatorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public CalculatorTests(ITestOutputHelper logger)
[Fact]
public void AddOrSubtract()
{
// This tests aggregation of code coverage.
#if NETCOREAPP2_0
// This tests aggregation of code coverage across test runs.
#if NETCOREAPP2_1
Assert.Equal(3, Calculator.Add(1, 2));
#else
Assert.Equal(-1, Calculator.Subtract(1, 2));
Expand Down
2 changes: 1 addition & 1 deletion src/Library.Tests/Library.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472;netcoreapp2.0;netcoreapp2.1;netcoreapp2.2</TargetFrameworks>
<TargetFrameworks>net472;netcoreapp2.1;netcoreapp2.2</TargetFrameworks>
<IsPackable>false</IsPackable>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
Expand Down

0 comments on commit 835ffb6

Please sign in to comment.