From 0cc7e9a963ee12e5fd0aa554d48c97cd610bc129 Mon Sep 17 00:00:00 2001 From: Jeff Kluge Date: Wed, 1 Nov 2023 15:52:55 -0700 Subject: [PATCH] Stop testing for .NET Core 3 (#502) --- Directory.Packages.props | 4 ++-- .../Microsoft.Build.Artifacts.UnitTests.csproj | 2 +- ...icrosoft.Build.CentralPackageVersions.UnitTests.csproj | 2 +- .../Microsoft.Build.CopyOnWrite.UnitTests.csproj | 4 +--- .../Microsoft.Build.NoTargets.UnitTests.csproj | 2 +- src/NoTargets.UnitTests/NoTargetsTests.cs | 8 +++++++- .../Microsoft.Build.Traversal.UnitTests.csproj | 2 +- 7 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 61f175c4..f44abab6 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,10 +6,10 @@ - + - + diff --git a/src/Artifacts.UnitTests/Microsoft.Build.Artifacts.UnitTests.csproj b/src/Artifacts.UnitTests/Microsoft.Build.Artifacts.UnitTests.csproj index 07d03810..b3ec38dd 100644 --- a/src/Artifacts.UnitTests/Microsoft.Build.Artifacts.UnitTests.csproj +++ b/src/Artifacts.UnitTests/Microsoft.Build.Artifacts.UnitTests.csproj @@ -1,6 +1,6 @@  - net472;netcoreapp3.1;net6.0;net7.0;net8.0 + net472;net6.0;net7.0;net8.0 diff --git a/src/CentralPackageVersions.UnitTests/Microsoft.Build.CentralPackageVersions.UnitTests.csproj b/src/CentralPackageVersions.UnitTests/Microsoft.Build.CentralPackageVersions.UnitTests.csproj index 9bb039e1..e9a84c3e 100644 --- a/src/CentralPackageVersions.UnitTests/Microsoft.Build.CentralPackageVersions.UnitTests.csproj +++ b/src/CentralPackageVersions.UnitTests/Microsoft.Build.CentralPackageVersions.UnitTests.csproj @@ -1,6 +1,6 @@  - net472;netcoreapp3.1;net6.0;net7.0;net8.0 + net472;net6.0;net7.0;net8.0 diff --git a/src/CopyOnWrite.UnitTests/Microsoft.Build.CopyOnWrite.UnitTests.csproj b/src/CopyOnWrite.UnitTests/Microsoft.Build.CopyOnWrite.UnitTests.csproj index 8cbb930e..d6c1c4a2 100644 --- a/src/CopyOnWrite.UnitTests/Microsoft.Build.CopyOnWrite.UnitTests.csproj +++ b/src/CopyOnWrite.UnitTests/Microsoft.Build.CopyOnWrite.UnitTests.csproj @@ -1,9 +1,7 @@  - net472;netcoreapp3.1;net6.0;net7.0;net8.0 + net472;net6.0;net7.0;net8.0 Enable - - true diff --git a/src/NoTargets.UnitTests/Microsoft.Build.NoTargets.UnitTests.csproj b/src/NoTargets.UnitTests/Microsoft.Build.NoTargets.UnitTests.csproj index 6b636a6c..6d719f6c 100644 --- a/src/NoTargets.UnitTests/Microsoft.Build.NoTargets.UnitTests.csproj +++ b/src/NoTargets.UnitTests/Microsoft.Build.NoTargets.UnitTests.csproj @@ -1,6 +1,6 @@  - net472;netcoreapp3.1;net6.0;net7.0;net8.0 + net472;net6.0;net7.0;net8.0 diff --git a/src/NoTargets.UnitTests/NoTargetsTests.cs b/src/NoTargets.UnitTests/NoTargetsTests.cs index e5be8ef6..cd69ed96 100644 --- a/src/NoTargets.UnitTests/NoTargetsTests.cs +++ b/src/NoTargets.UnitTests/NoTargetsTests.cs @@ -89,7 +89,13 @@ public void DoNotReferenceOutputAssemblies() { ProjectCreator projectA = ProjectCreator.Templates.SdkCsproj( path: Path.Combine(TestRootPath, "ProjectA", "ProjectA.csproj"), - targetFramework: "netcoreapp2.1") +#if NETFRAMEWORK || NET7_0 + targetFramework: "net7.0") +#elif NET6_0 + targetFramework: "net6.0") +#elif NET8_0 + targetFramework: "net8.0") +#endif .Save(); ProjectCreator noTargetsProject = ProjectCreator.Templates.NoTargetsProject( diff --git a/src/Traversal.UnitTests/Microsoft.Build.Traversal.UnitTests.csproj b/src/Traversal.UnitTests/Microsoft.Build.Traversal.UnitTests.csproj index 335d27d2..b944801e 100644 --- a/src/Traversal.UnitTests/Microsoft.Build.Traversal.UnitTests.csproj +++ b/src/Traversal.UnitTests/Microsoft.Build.Traversal.UnitTests.csproj @@ -1,6 +1,6 @@  - net472;netcoreapp3.1;net6.0;net7.0;net8.0 + net472;net6.0;net7.0;net8.0