From d38e4b0063d07e0f276008a3e84957f0385bbaa2 Mon Sep 17 00:00:00 2001 From: Roman Marusyk Date: Mon, 17 Oct 2022 23:31:03 +0300 Subject: [PATCH 1/3] (GH-3972) Remove .NET Core 3.1 TFM. * fixes #3972 --- .github/workflows/build.yml | 5 ----- appveyor.yml | 1 - build.cake | 3 +-- .../Cake.Frosting.Template.csproj | 2 +- .../templates/cakefrosting/build/Build.csproj | 2 +- src/Cake.NuGet/Cake.NuGet.csproj | 1 - src/Cake/Cake.csproj | 1 - .../Scripting/ReferenceAssemblyResolver.cs | 4 +--- src/Shared.msbuild | 4 ++-- .../GitHubActions/ValidateGitHubActionsProvider.cake | 4 +--- .../Cake.Common/Tools/DotNet/DotNetAliases.cake | 10 +++++----- .../Cake.Core/Scripting/AddinDirective.cake | 1 - tests/integration/Cake.Frosting/build/Build.csproj | 2 +- .../Tools/DotNet/hwapp.tests/hwapp.tests.csproj | 2 +- .../Cake.Common/Tools/DotNet/hwapp/hwapp.csproj | 2 +- 15 files changed, 15 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6dc34357cd..135e343ee9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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: diff --git a/appveyor.yml b/appveyor.yml index 0275dc7372..655e82463a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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" diff --git a/build.cake b/build.cake index 5159d5f416..82da37a9ad 100644 --- a/build.cake +++ b/build.cake @@ -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")); @@ -390,7 +390,6 @@ Task("Run-Integration-Tests") .DeferOnError() .DoesForEach( 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() diff --git a/src/Cake.Frosting.Template/Cake.Frosting.Template.csproj b/src/Cake.Frosting.Template/Cake.Frosting.Template.csproj index 15a11e11f3..b2d7b86f2e 100644 --- a/src/Cake.Frosting.Template/Cake.Frosting.Template.csproj +++ b/src/Cake.Frosting.Template/Cake.Frosting.Template.csproj @@ -5,7 +5,7 @@ Cake.Frosting.Template Cake.Frosting templates for the .NET SDK. Cake.Frosting templates for the .NET SDK. - netcoreapp3.1 + net7.0 true false content diff --git a/src/Cake.Frosting.Template/templates/cakefrosting/build/Build.csproj b/src/Cake.Frosting.Template/templates/cakefrosting/build/Build.csproj index cc0d1f730b..0030f6820a 100644 --- a/src/Cake.Frosting.Template/templates/cakefrosting/build/Build.csproj +++ b/src/Cake.Frosting.Template/templates/cakefrosting/build/Build.csproj @@ -1,7 +1,7 @@ Exe - netcoreapp3.1 + net7.0 $(MSBuildProjectDirectory) diff --git a/src/Cake.NuGet/Cake.NuGet.csproj b/src/Cake.NuGet/Cake.NuGet.csproj index 9bfd900963..a49292d170 100644 --- a/src/Cake.NuGet/Cake.NuGet.csproj +++ b/src/Cake.NuGet/Cake.NuGet.csproj @@ -25,7 +25,6 @@ - diff --git a/src/Cake/Cake.csproj b/src/Cake/Cake.csproj index ab43e32f64..719521e3bf 100644 --- a/src/Cake/Cake.csproj +++ b/src/Cake/Cake.csproj @@ -33,6 +33,5 @@ - \ No newline at end of file diff --git a/src/Cake/Infrastructure/Scripting/ReferenceAssemblyResolver.cs b/src/Cake/Infrastructure/Scripting/ReferenceAssemblyResolver.cs index 80d032f250..1e239e1b46 100644 --- a/src/Cake/Infrastructure/Scripting/ReferenceAssemblyResolver.cs +++ b/src/Cake/Infrastructure/Scripting/ReferenceAssemblyResolver.cs @@ -22,9 +22,7 @@ public Assembly[] GetReferenceAssemblies() IEnumerable 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) diff --git a/src/Shared.msbuild b/src/Shared.msbuild index 69c2b60e18..46840f2493 100644 --- a/src/Shared.msbuild +++ b/src/Shared.msbuild @@ -1,7 +1,7 @@ - netcoreapp3.1;net5.0;net6.0;net7.0 + net5.0;net6.0;net7.0 $(AssemblyName) Copyright (c) .NET Foundation and contributors 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 @@ -17,7 +17,7 @@ - + 2.0.0 $(DefineConstants);NETCORE portable diff --git a/tests/integration/Cake.Common/Build/GitHubActions/ValidateGitHubActionsProvider.cake b/tests/integration/Cake.Common/Build/GitHubActions/ValidateGitHubActionsProvider.cake index 25c014671b..7de31449e8 100644 --- a/tests/integration/Cake.Common/Build/GitHubActions/ValidateGitHubActionsProvider.cake +++ b/tests/integration/Cake.Common/Build/GitHubActions/ValidateGitHubActionsProvider.cake @@ -14,7 +14,6 @@ Setup( Task("ValidateEnvironment") .DoesForEach( 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" @@ -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) ); diff --git a/tests/integration/Cake.Common/Tools/DotNet/DotNetAliases.cake b/tests/integration/Cake.Common/Tools/DotNet/DotNetAliases.cake index bba4a7b6a0..68b058a6d6 100644 --- a/tests/integration/Cake.Common/Tools/DotNet/DotNetAliases.cake +++ b/tests/integration/Cake.Common/Tools/DotNet/DotNetAliases.cake @@ -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); @@ -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); @@ -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); @@ -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 @@ -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); diff --git a/tests/integration/Cake.Core/Scripting/AddinDirective.cake b/tests/integration/Cake.Core/Scripting/AddinDirective.cake index a6d7f5847c..5abeecc796 100644 --- a/tests/integration/Cake.Core/Scripting/AddinDirective.cake +++ b/tests/integration/Cake.Core/Scripting/AddinDirective.cake @@ -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" diff --git a/tests/integration/Cake.Frosting/build/Build.csproj b/tests/integration/Cake.Frosting/build/Build.csproj index 071df4a56e..17b86681dd 100644 --- a/tests/integration/Cake.Frosting/build/Build.csproj +++ b/tests/integration/Cake.Frosting/build/Build.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1;net5.0;net6.0;net7.0 + net5.0;net6.0;net7.0 true diff --git a/tests/integration/resources/Cake.Common/Tools/DotNet/hwapp.tests/hwapp.tests.csproj b/tests/integration/resources/Cake.Common/Tools/DotNet/hwapp.tests/hwapp.tests.csproj index ace9d98420..809b83300c 100644 --- a/tests/integration/resources/Cake.Common/Tools/DotNet/hwapp.tests/hwapp.tests.csproj +++ b/tests/integration/resources/Cake.Common/Tools/DotNet/hwapp.tests/hwapp.tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net7.0 false diff --git a/tests/integration/resources/Cake.Common/Tools/DotNet/hwapp/hwapp.csproj b/tests/integration/resources/Cake.Common/Tools/DotNet/hwapp/hwapp.csproj index ec73b81db9..c54cbbeb30 100644 --- a/tests/integration/resources/Cake.Common/Tools/DotNet/hwapp/hwapp.csproj +++ b/tests/integration/resources/Cake.Common/Tools/DotNet/hwapp/hwapp.csproj @@ -1,7 +1,7 @@  Exe - netcoreapp3.1 + net7.0 From 1a75a02e3ccd3a6688a3f8659fbd890066908201 Mon Sep 17 00:00:00 2001 From: Roman Marusyk Date: Tue, 18 Oct 2022 00:04:23 +0300 Subject: [PATCH 2/3] (GH-3949) Remove .NET 5 TFM. * fixes #3949 --- .github/workflows/build.yml | 5 ----- appveyor.yml | 2 +- build.cake | 5 ++--- src/Cake/Cake.csproj | 1 - .../Scripting/ReferenceAssemblyResolver.cs | 4 +--- src/Shared.msbuild | 4 ++-- .../GitHubActions/ValidateGitHubActionsProvider.cake | 4 +--- .../Tools/TextTransform/TextTransformAliases.cake | 12 +++++++++--- .../Cake.Core/Scripting/AddinDirective.cake | 1 - .../Cake.Core/Scripting/DefineDirective.cake | 4 ++-- tests/integration/Cake.Frosting/build/Build.csproj | 2 +- 11 files changed, 19 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 135e343ee9..93bbf9e47f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,11 +21,6 @@ jobs: - name: Fetch all history for all tags and branches run: git fetch --prune --unshallow - - name: Install .NET Core SDK 5.0.x - uses: actions/setup-dotnet@v1 - with: - dotnet-version: '5.0.x' - - name: Install .NET SDK 6.0.x uses: actions/setup-dotnet@v1 with: diff --git a/appveyor.yml b/appveyor.yml index 655e82463a..b927521fe8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,7 +7,7 @@ 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 5.0 -InstallDir .\.dotnet + - ps: .\dotnet-install.ps1 -Channel 6.0 -InstallDir .\.dotnet - ps: .\build.ps1 --target="AppVeyor" # Tests diff --git a/build.cake b/build.cake index 82da37a9ad..d1a6e286db 100644 --- a/build.cake +++ b/build.cake @@ -123,10 +123,10 @@ Task("Run-Unit-Tests") () => GetFiles("./src/**/*.Tests.csproj"), (parameters, project, context) => { - foreach(var framework in new[] { "net5.0", "net6.0", "net7.0" }) + foreach(var framework in new[] { "net6.0", "net7.0" }) { FilePath testResultsPath = MakeAbsolute(parameters.Paths.Directories.TestResults - .CombineWithFilePath($"{project.GetFilenameWithoutExtension()}_{framework}_TestResults.xml")); + .CombineWithFilePath($"{project.GetFilenameWithoutExtension()}_{framework}_TestResults.xml")); DotNetTest(project.FullPath, new DotNetTestSettings { @@ -390,7 +390,6 @@ Task("Run-Integration-Tests") .DeferOnError() .DoesForEach( parameters => new[] { - 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() }, diff --git a/src/Cake/Cake.csproj b/src/Cake/Cake.csproj index 719521e3bf..18ce5c1710 100644 --- a/src/Cake/Cake.csproj +++ b/src/Cake/Cake.csproj @@ -32,6 +32,5 @@ - \ No newline at end of file diff --git a/src/Cake/Infrastructure/Scripting/ReferenceAssemblyResolver.cs b/src/Cake/Infrastructure/Scripting/ReferenceAssemblyResolver.cs index 1e239e1b46..4482830751 100644 --- a/src/Cake/Infrastructure/Scripting/ReferenceAssemblyResolver.cs +++ b/src/Cake/Infrastructure/Scripting/ReferenceAssemblyResolver.cs @@ -22,9 +22,7 @@ public Assembly[] GetReferenceAssemblies() IEnumerable TryGetReferenceAssemblies() { foreach (var reference in -#if NET5_0 - Basic.Reference.Assemblies.Net50.All) -#elif NET6_0 +#if NET6_0 Basic.Reference.Assemblies.Net60.All) #else Basic.Reference.Assemblies.Net70.All) diff --git a/src/Shared.msbuild b/src/Shared.msbuild index 46840f2493..c394ab929a 100644 --- a/src/Shared.msbuild +++ b/src/Shared.msbuild @@ -1,7 +1,7 @@ - net5.0;net6.0;net7.0 + net6.0;net7.0 $(AssemblyName) Copyright (c) .NET Foundation and contributors 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 @@ -17,7 +17,7 @@ - + 2.0.0 $(DefineConstants);NETCORE portable diff --git a/tests/integration/Cake.Common/Build/GitHubActions/ValidateGitHubActionsProvider.cake b/tests/integration/Cake.Common/Build/GitHubActions/ValidateGitHubActionsProvider.cake index 7de31449e8..2a5922cf14 100644 --- a/tests/integration/Cake.Common/Build/GitHubActions/ValidateGitHubActionsProvider.cake +++ b/tests/integration/Cake.Common/Build/GitHubActions/ValidateGitHubActionsProvider.cake @@ -14,7 +14,6 @@ Setup( Task("ValidateEnvironment") .DoesForEach( data => new [] { - $"CAKE_{data.OS}_NETCOREAPP_5_0_VERSION", $"CAKE_{data.OS}_NETCOREAPP_6_0_VERSION", $"CAKE_{data.OS}_NETCOREAPP_7_0_VERSION" }, @@ -25,8 +24,7 @@ Task("ValidatePath") .DoesForEach( new [] { "Cake\\WTool\\Wtools\\Wnet7\\W0", - "Cake\\WTool\\Wtools\\Wnet6\\W0", - "Cake\\WTool\\Wtools\\Wnet5\\W0" + "Cake\\WTool\\Wtools\\Wnet6\\W0" }, (data, path) => Assert.Matches(path, data.Path) ); diff --git a/tests/integration/Cake.Common/Tools/TextTransform/TextTransformAliases.cake b/tests/integration/Cake.Common/Tools/TextTransform/TextTransformAliases.cake index 0b18f5ce50..ce244f98f6 100644 --- a/tests/integration/Cake.Common/Tools/TextTransform/TextTransformAliases.cake +++ b/tests/integration/Cake.Common/Tools/TextTransform/TextTransformAliases.cake @@ -1,13 +1,17 @@ #load "./../../../utilities/xunit.cake" #load "./../../../utilities/paths.cake" +var environmentVariables = new Dictionary { + { "DOTNET_ROLL_FORWARD", "Major" } +}; + Task("Cake.Common.Tools.TextTransform.TextTransformAliases.TransformTemplate.Setup") .Does(() => { var t4Path = Context.Tools.Resolve("t4") ?? Context.Tools.Resolve("t4.exe"); if (t4Path == null) { - DotNetTool(null, "tool", "install --tool-path ./tools dotnet-t4 --version \"2.2.0-preview-0020-g990c44075e\" --add-source \"https://pkgs.dev.azure.com/cake-build/Cake/_packaging/cake/nuget/v3/index.json\""); + DotNetTool(null, "tool", "install --tool-path ./tools dotnet-t4 --version \"2.2.1\""); } }); @@ -28,7 +32,8 @@ Task("Cake.Common.Tools.TextTransform.TextTransformAliases.TransformTemplate.Pro Properties = { ["FirstName"] = "John", ["LastName"] = "Doe" - } + }, + EnvironmentVariables = environmentVariables }; var expect = "Hello John Doe!"; @@ -53,7 +58,8 @@ Task("Cake.Common.Tools.TextTransform.TextTransformAliases.TransformTemplate.Cla var settings = new TextTransformSettings { OutputFile = targetFile, - Class = "HelloWorld" + Class = "HelloWorld", + EnvironmentVariables = environmentVariables }; var expect = @"public partial class HelloWorld : HelloWorldBase {"; diff --git a/tests/integration/Cake.Core/Scripting/AddinDirective.cake b/tests/integration/Cake.Core/Scripting/AddinDirective.cake index 5abeecc796..7ed5a21702 100644 --- a/tests/integration/Cake.Core/Scripting/AddinDirective.cake +++ b/tests/integration/Cake.Core/Scripting/AddinDirective.cake @@ -23,7 +23,6 @@ Task("Cake.Core.Scripting.AddinDirective.LoadTargetedAddin") .SetTargetFramework( cake switch { - 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" } diff --git a/tests/integration/Cake.Core/Scripting/DefineDirective.cake b/tests/integration/Cake.Core/Scripting/DefineDirective.cake index 4f1cd7066f..201d8dc6a2 100644 --- a/tests/integration/Cake.Core/Scripting/DefineDirective.cake +++ b/tests/integration/Cake.Core/Scripting/DefineDirective.cake @@ -68,7 +68,7 @@ Task("Cake.Core.Scripting.DefineDirective.Cake") Assert.True(cake); }); -#if NET5_0 || NET6_0 || NET7_0 +#if NET6_0 || NET7_0 Task("Cake.Core.Scripting.DefineDirective.C#9") .Does(() => { @@ -117,7 +117,7 @@ public record CSharpNine(bool IsNine); ////////////////////////////////////////////////////////////////////////////// Task("Cake.Core.Scripting.DefineDirective") -#if NET5_0 || NET6_0 || NET7_0 +#if NET6_0 || NET7_0 .IsDependentOn("Cake.Core.Scripting.DefineDirective.C#9") #endif #if NET6_0 || NET7_0 diff --git a/tests/integration/Cake.Frosting/build/Build.csproj b/tests/integration/Cake.Frosting/build/Build.csproj index 17b86681dd..967a3cf7fc 100644 --- a/tests/integration/Cake.Frosting/build/Build.csproj +++ b/tests/integration/Cake.Frosting/build/Build.csproj @@ -2,7 +2,7 @@ Exe - net5.0;net6.0;net7.0 + net6.0;net7.0 true From ac2539229fbb3cbca391f02fbdaf70c6564659c7 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Mon, 24 Oct 2022 12:38:19 +0200 Subject: [PATCH 3/3] Add Frosting Template framework parameter --- .../.template.config/template.json | 21 ++++++++++++++++++- .../templates/cakefrosting/build/Build.csproj | 4 ++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/Cake.Frosting.Template/templates/cakefrosting/.template.config/template.json b/src/Cake.Frosting.Template/templates/cakefrosting/.template.config/template.json index 0fe5f6e089..46901ce9f3 100644 --- a/src/Cake.Frosting.Template/templates/cakefrosting/.template.config/template.json +++ b/src/Cake.Frosting.Template/templates/cakefrosting/.template.config/template.json @@ -11,5 +11,24 @@ "type": "project" }, "groupIdentity": "Cake", - "description": "Create a Cake.Frosting build project." + "description": "Create a Cake.Frosting build project.", + "symbols": { + "framework": { + "type": "parameter", + "description": "The target framework for the project.", + "datatype": "choice", + "defaultValue": "net7.0", + "replaces": "TargetFrameworkValue", + "choices": [ + { + "choice": "net6.0", + "description": "Target .NET 6" + }, + { + "choice": "net7.0", + "description": "Target .NET 7" + } + ] + } + } } \ No newline at end of file diff --git a/src/Cake.Frosting.Template/templates/cakefrosting/build/Build.csproj b/src/Cake.Frosting.Template/templates/cakefrosting/build/Build.csproj index 0030f6820a..dde8fef1e5 100644 --- a/src/Cake.Frosting.Template/templates/cakefrosting/build/Build.csproj +++ b/src/Cake.Frosting.Template/templates/cakefrosting/build/Build.csproj @@ -1,10 +1,10 @@ Exe - net7.0 + TargetFrameworkValue $(MSBuildProjectDirectory) - + \ No newline at end of file