Skip to content

Commit

Permalink
Remove .NET Core 3.1 TFM. Fixes cake-build#3972
Browse files Browse the repository at this point in the history
  • Loading branch information
Marusyk committed Oct 17, 2022
1 parent bffc607 commit 60510fb
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 34 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ jobs:
- name: Fetch all history for all tags and branches
run: git fetch --prune --unshallow

- name: Install .NET Core SDK 3.1.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'

- name: Install .NET Core SDK 5.0.x
uses: actions/setup-dotnet@v1
with:
Expand Down
1 change: 0 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ init:
build_script:
- ps: Invoke-RestMethod -Uri 'https://dot.net/v1/dotnet-install.ps1' -OutFile '.\dotnet-install.ps1'
- ps: New-Item -Path .\.dotnet -ItemType Directory -Force | Out-Null
- ps: .\dotnet-install.ps1 -Channel 3.1 -InstallDir .\.dotnet
- ps: .\dotnet-install.ps1 -Channel 5.0 -InstallDir .\.dotnet
- ps: .\build.ps1 --target="AppVeyor"

Expand Down
3 changes: 1 addition & 2 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Task("Run-Unit-Tests")
() => GetFiles("./src/**/*.Tests.csproj"),
(parameters, project, context) =>
{
foreach(var framework in new[] { "netcoreapp3.1", "net5.0", "net6.0", "net7.0" })
foreach(var framework in new[] { "net5.0", "net6.0", "net7.0" })
{
FilePath testResultsPath = MakeAbsolute(parameters.Paths.Directories.TestResults
.CombineWithFilePath($"{project.GetFilenameWithoutExtension()}_{framework}_TestResults.xml"));
Expand Down Expand Up @@ -390,7 +390,6 @@ Task("Run-Integration-Tests")
.DeferOnError()
.DoesForEach<BuildParameters, FilePath>(
parameters => new[] {
GetFiles($"{parameters.Paths.Directories.IntegrationTestsBinTool.FullPath}/**/netcoreapp3.1/**/Cake.dll").Single(),
GetFiles($"{parameters.Paths.Directories.IntegrationTestsBinTool.FullPath}/**/net5.0/**/Cake.dll").Single(),
GetFiles($"{parameters.Paths.Directories.IntegrationTestsBinTool.FullPath}/**/net6.0/**/Cake.dll").Single(),
GetFiles($"{parameters.Paths.Directories.IntegrationTestsBinTool.FullPath}/**/net7.0/**/Cake.dll").Single()
Expand Down
2 changes: 1 addition & 1 deletion src/Cake.Frosting.Template/Cake.Frosting.Template.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<AssemblyName>Cake.Frosting.Template</AssemblyName>
<Title>Cake.Frosting templates for the .NET SDK.</Title>
<Description>Cake.Frosting templates for the .NET SDK.</Description>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<IncludeContentInPack>true</IncludeContentInPack>
<IncludeBuildOutput>false</IncludeBuildOutput>
<ContentTargetFolders>content</ContentTargetFolders>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
</PropertyGroup>
<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion src/Cake.NuGet/Cake.NuGet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
<PackageReference Include="NuGet.Resolver" Version="6.3.1" />
<PackageReference Include="NuGet.Common" Version="6.3.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Condition="'$(TargetFramework)' == 'netcoreapp3.1'" Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion src/Cake/Cake.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,5 @@
<PackageReference Include="Basic.Reference.Assemblies.Net70" Version="1.3.0" Condition="'$(TargetFramework)' == 'net7.0'" />
<PackageReference Include="Basic.Reference.Assemblies.Net60" Version="1.3.0" Condition="'$(TargetFramework)' == 'net6.0'" />
<PackageReference Include="Basic.Reference.Assemblies.Net50" Version="1.3.0" Condition="'$(TargetFramework)' == 'net5.0'" />
<PackageReference Include="Basic.Reference.Assemblies.NetCoreApp31" Version="1.3.0" Condition="'$(TargetFramework)' == 'netcoreapp3.1'" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ public Assembly[] GetReferenceAssemblies()
IEnumerable<Assembly> TryGetReferenceAssemblies()
{
foreach (var reference in
#if NETCOREAPP3_1
Basic.Reference.Assemblies.NetCoreApp31.All)
#elif NET5_0
#if NET5_0
Basic.Reference.Assemblies.Net50.All)
#elif NET6_0
Basic.Reference.Assemblies.Net60.All)
Expand Down
4 changes: 2 additions & 2 deletions src/Shared.msbuild
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<!-- General package metadata -->
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net5.0;net6.0;net7.0</TargetFrameworks>
<PackageId>$(AssemblyName)</PackageId>
<Copyright>Copyright (c) .NET Foundation and contributors</Copyright>
<Authors>Patrik Svensson, Mattias Karlsson, Gary Ewan Park, Alistair Chapman, Martin Björkström, Dave Glick, Pascal Berger, Jérémie Desautels, Enrico Campidoglio, C. Augusto Proiete, Nils Andresen, and contributors</Authors>
Expand All @@ -17,7 +17,7 @@
</PropertyGroup>

<!-- Define .NET Core constants -->
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' OR '$(TargetFramework)' == 'net5.0' OR '$(TargetFramework)' == 'net6.0' OR '$(TargetFramework)' == 'net7.0' ">
<PropertyGroup Condition="'$(TargetFramework)' == 'net5.0' OR '$(TargetFramework)' == 'net6.0' OR '$(TargetFramework)' == 'net7.0' ">
<NetStandardImplicitPackageVersion>2.0.0</NetStandardImplicitPackageVersion>
<DefineConstants>$(DefineConstants);NETCORE</DefineConstants>
<DebugType>portable</DebugType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Setup(
Task("ValidateEnvironment")
.DoesForEach<BuildData, string>(
data => new [] {
$"CAKE_{data.OS}_NETCOREAPP_3_1_VERSION",
$"CAKE_{data.OS}_NETCOREAPP_5_0_VERSION",
$"CAKE_{data.OS}_NETCOREAPP_6_0_VERSION",
$"CAKE_{data.OS}_NETCOREAPP_7_0_VERSION"
Expand All @@ -27,8 +26,7 @@ Task("ValidatePath")
new [] {
"Cake\\WTool\\Wtools\\Wnet7\\W0",
"Cake\\WTool\\Wtools\\Wnet6\\W0",
"Cake\\WTool\\Wtools\\Wnet5\\W0",
"Cake\\WTool\\Wtools\\Wnetcoreapp3\\W1"
"Cake\\WTool\\Wtools\\Wnet5\\W0"
},
(data, path) => Assert.Matches(path, data.Path)
);
Expand Down
10 changes: 5 additions & 5 deletions tests/integration/Cake.Common/Tools/DotNet/DotNetAliases.cake
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Task("Cake.Common.Tools.DotNet.DotNetAliases.DotNetBuild")
// Given
var path = Paths.Temp.Combine("./Cake.Common/Tools/DotNet");
var project = path.CombineWithFilePath("hwapp/hwapp.csproj");
var assembly = path.CombineWithFilePath("hwapp/bin/Debug/netcoreapp3.1/hwapp.dll");
var assembly = path.CombineWithFilePath("hwapp/bin/Debug/net7.0/hwapp.dll");

// When
DotNetBuild(project.FullPath);
Expand All @@ -61,7 +61,7 @@ Task("Cake.Common.Tools.DotNet.DotNetAliases.DotNetVSTest")
{
// Given
var path = Paths.Temp.Combine("./Cake.Common/Tools/DotNet");
var assembly = path.CombineWithFilePath("hwapp.tests/bin/Debug/netcoreapp3.1/hwapp.tests.dll");
var assembly = path.CombineWithFilePath("hwapp.tests/bin/Debug/net7.0/hwapp.tests.dll");

// When
DotNetVSTest(assembly.FullPath);
Expand Down Expand Up @@ -184,7 +184,7 @@ Task("Cake.Common.Tools.DotNet.DotNetAliases.DotNetExecute")
{
// Given
var path = Paths.Temp.Combine("./Cake.Common/Tools/DotNet");
var assembly = path.CombineWithFilePath("hwapp/bin/Debug/netcoreapp3.1/hwapp.dll");
var assembly = path.CombineWithFilePath("hwapp/bin/Debug/net7.0/hwapp.dll");

// When
DotNetExecute(assembly);
Expand All @@ -197,7 +197,7 @@ Task("Cake.Common.Tools.DotNet.DotNetAliases.DotNetClean")
// Given
var path = Paths.Temp.Combine("./Cake.Common/Tools/DotNet");
var project = path.CombineWithFilePath("hwapp/hwapp.csproj");
var assembly = path.CombineWithFilePath("hwapp/bin/Debug/netcoreapp3.1/hwapp.dll");
var assembly = path.CombineWithFilePath("hwapp/bin/Debug/net7.0/hwapp.dll");
Assert.True(System.IO.File.Exists(assembly.FullPath));

// When
Expand All @@ -214,7 +214,7 @@ Task("Cake.Common.Tools.DotNet.DotNetAliases.DotNetMSBuild")
// Given
var path = Paths.Temp.Combine("./Cake.Common/Tools/DotNet");
var project = path.CombineWithFilePath("hwapp/hwapp.csproj");
var assembly = path.CombineWithFilePath("hwapp/bin/Debug/netcoreapp3.1/hwapp.dll");
var assembly = path.CombineWithFilePath("hwapp/bin/Debug/net7.0/hwapp.dll");

// When
DotNetMSBuild(project.FullPath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Task("Cake.Common.Tools.DotNetCore.DotNetCoreAliases.DotNetCoreBuild")
// Given
var path = Paths.Temp.Combine("./Cake.Common/Tools/DotNet");
var project = path.CombineWithFilePath("hwapp/hwapp.csproj");
var assembly = path.CombineWithFilePath("hwapp/bin/Debug/netcoreapp3.1/hwapp.dll");
var assembly = path.CombineWithFilePath("hwapp/bin/Debug/net7.0/hwapp.dll");

// When
DotNetCoreBuild(project.FullPath);
Expand All @@ -61,7 +61,7 @@ Task("Cake.Common.Tools.DotNetCore.DotNetCoreAliases.DotNetCoreVSTest")
{
// Given
var path = Paths.Temp.Combine("./Cake.Common/Tools/DotNet");
var assembly = path.CombineWithFilePath("hwapp.tests/bin/Debug/netcoreapp3.1/hwapp.tests.dll");
var assembly = path.CombineWithFilePath("hwapp.tests/bin/Debug/net7.0/hwapp.tests.dll");

// When
DotNetCoreVSTest(assembly.FullPath);
Expand Down Expand Up @@ -184,7 +184,7 @@ Task("Cake.Common.Tools.DotNetCore.DotNetCoreAliases.DotNetCoreExecute")
{
// Given
var path = Paths.Temp.Combine("./Cake.Common/Tools/DotNet");
var assembly = path.CombineWithFilePath("hwapp/bin/Debug/netcoreapp3.1/hwapp.dll");
var assembly = path.CombineWithFilePath("hwapp/bin/Debug/net7.0/hwapp.dll");

// When
DotNetCoreExecute(assembly);
Expand All @@ -197,7 +197,7 @@ Task("Cake.Common.Tools.DotNetCore.DotNetCoreAliases.DotNetCoreClean")
// Given
var path = Paths.Temp.Combine("./Cake.Common/Tools/DotNet");
var project = path.CombineWithFilePath("hwapp/hwapp.csproj");
var assembly = path.CombineWithFilePath("hwapp/bin/Debug/netcoreapp3.1/hwapp.dll");
var assembly = path.CombineWithFilePath("hwapp/bin/Debug/nnet7.0/hwapp.dll");
Assert.True(System.IO.File.Exists(assembly.FullPath));

// When
Expand All @@ -214,7 +214,7 @@ Task("Cake.Common.Tools.DotNetCore.DotNetCoreAliases.DotNetCoreMSBuild")
// Given
var path = Paths.Temp.Combine("./Cake.Common/Tools/DotNet");
var project = path.CombineWithFilePath("hwapp/hwapp.csproj");
var assembly = path.CombineWithFilePath("hwapp/bin/Debug/netcoreapp3.1/hwapp.dll");
var assembly = path.CombineWithFilePath("hwapp/bin/Debug/net7.0/hwapp.dll");

// When
DotNetCoreMSBuild(project.FullPath);
Expand Down
1 change: 0 additions & 1 deletion tests/integration/Cake.Core/Scripting/AddinDirective.cake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Task("Cake.Core.Scripting.AddinDirective.LoadTargetedAddin")
.SetTargetFramework(
cake switch
{
FilePath netCoreApp3_1Path when netCoreApp3_1Path.FullPath.Contains("netcoreapp3.1") => "netcoreapp3.1",
FilePath net5_0Path when net5_0Path.FullPath.Contains("net5.0") => "net5.0",
FilePath net6_0Path when net6_0Path.FullPath.Contains("net6.0") => "net6.0",
_ => "net7.0"
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Cake.Frosting/build/Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net5.0;net6.0;net7.0</TargetFrameworks>
<PackAsTool>true</PackAsTool>

<!-- Make sure start same folder .NET Core CLI and Visual Studio -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\hwapp.common\hwapp.common.csproj" />
Expand Down

0 comments on commit 60510fb

Please sign in to comment.