From 84f337b0464829c66ebd1976e93628cfb242c85a Mon Sep 17 00:00:00 2001 From: Andrii Kurdiumov Date: Wed, 26 Jan 2022 00:24:27 +0600 Subject: [PATCH] Update to .NET 6 (#315) * Update to .NET 6 I update not only samples, but also codegen tools, because .NET 5 is not LTS and in 4 month would be out Closes #306 * Add .NET 6.0 support to actual templates * Dont forget about FSharp and VB.NET * Revert choice option in parameters --- Source/Samples/Samples.csproj | 2 +- .../.template.config/template.json | 5 +++-- .../content/GtkSharp.Application.CSharp/GtkNamespace.csproj | 2 +- .../.template.config/template.json | 5 +++-- .../content/GtkSharp.Application.FSharp/GtkNamespace.fsproj | 2 +- .../.template.config/template.json | 5 +++-- .../content/GtkSharp.Application.VBNet/GtkNamespace.vbproj | 2 +- Source/Tools/GapiCodegen/GapiCodegen.csproj | 2 +- Source/Tools/GapiFixup/GapiFixup.csproj | 2 +- azure-pipelines.yml | 6 ++++++ 10 files changed, 21 insertions(+), 12 deletions(-) diff --git a/Source/Samples/Samples.csproj b/Source/Samples/Samples.csproj index 2e2a7cfe0..4b59aafb0 100644 --- a/Source/Samples/Samples.csproj +++ b/Source/Samples/Samples.csproj @@ -1,7 +1,7 @@ WinExe - net5.0 + net6.0 false ..\..\BuildOutput\Samples diff --git a/Source/Templates/GtkSharp.Template.CSharp/content/GtkSharp.Application.CSharp/.template.config/template.json b/Source/Templates/GtkSharp.Template.CSharp/content/GtkSharp.Application.CSharp/.template.config/template.json index 214691dda..951ffffba 100644 --- a/Source/Templates/GtkSharp.Template.CSharp/content/GtkSharp.Application.CSharp/.template.config/template.json +++ b/Source/Templates/GtkSharp.Template.CSharp/content/GtkSharp.Application.CSharp/.template.config/template.json @@ -18,8 +18,9 @@ "symbols": { "targetframework": { "type": "parameter", - "defaultValue": "net5.0", - "replaces": "net5.0" + "description": "The target framework for the project.", + "defaultValue": "net6.0", + "replaces": "$(FrameworkParameter)" } }, "primaryOutputs": [ diff --git a/Source/Templates/GtkSharp.Template.CSharp/content/GtkSharp.Application.CSharp/GtkNamespace.csproj b/Source/Templates/GtkSharp.Template.CSharp/content/GtkSharp.Application.CSharp/GtkNamespace.csproj index d4b9b8b63..491e8f7af 100644 --- a/Source/Templates/GtkSharp.Template.CSharp/content/GtkSharp.Application.CSharp/GtkNamespace.csproj +++ b/Source/Templates/GtkSharp.Template.CSharp/content/GtkSharp.Application.CSharp/GtkNamespace.csproj @@ -2,7 +2,7 @@ WinExe - net5.0 + $(FrameworkParameter) diff --git a/Source/Templates/GtkSharp.Template.FSharp/content/GtkSharp.Application.FSharp/.template.config/template.json b/Source/Templates/GtkSharp.Template.FSharp/content/GtkSharp.Application.FSharp/.template.config/template.json index 019d38558..2ec39b35a 100644 --- a/Source/Templates/GtkSharp.Template.FSharp/content/GtkSharp.Application.FSharp/.template.config/template.json +++ b/Source/Templates/GtkSharp.Template.FSharp/content/GtkSharp.Application.FSharp/.template.config/template.json @@ -18,8 +18,9 @@ "symbols": { "targetframework": { "type": "parameter", - "defaultValue": "net5.0", - "replaces": "net5.0" + "description": "The target framework for the project.", + "defaultValue": "net6.0", + "replaces": "$(FrameworkParameter)" } }, "primaryOutputs": [ diff --git a/Source/Templates/GtkSharp.Template.FSharp/content/GtkSharp.Application.FSharp/GtkNamespace.fsproj b/Source/Templates/GtkSharp.Template.FSharp/content/GtkSharp.Application.FSharp/GtkNamespace.fsproj index d8991da16..e24d76353 100644 --- a/Source/Templates/GtkSharp.Template.FSharp/content/GtkSharp.Application.FSharp/GtkNamespace.fsproj +++ b/Source/Templates/GtkSharp.Template.FSharp/content/GtkSharp.Application.FSharp/GtkNamespace.fsproj @@ -2,7 +2,7 @@ Exe - net5.0 + $(FrameworkParameter) diff --git a/Source/Templates/GtkSharp.Template.VBNet/content/GtkSharp.Application.VBNet/.template.config/template.json b/Source/Templates/GtkSharp.Template.VBNet/content/GtkSharp.Application.VBNet/.template.config/template.json index 51f775308..8b279f474 100644 --- a/Source/Templates/GtkSharp.Template.VBNet/content/GtkSharp.Application.VBNet/.template.config/template.json +++ b/Source/Templates/GtkSharp.Template.VBNet/content/GtkSharp.Application.VBNet/.template.config/template.json @@ -18,8 +18,9 @@ "symbols": { "targetframework": { "type": "parameter", - "defaultValue": "net5.0", - "replaces": "net5.0" + "description": "The target framework for the project.", + "defaultValue": "net6.0", + "replaces": "$(FrameworkParameter)" } }, "primaryOutputs": [ diff --git a/Source/Templates/GtkSharp.Template.VBNet/content/GtkSharp.Application.VBNet/GtkNamespace.vbproj b/Source/Templates/GtkSharp.Template.VBNet/content/GtkSharp.Application.VBNet/GtkNamespace.vbproj index d4b9b8b63..491e8f7af 100644 --- a/Source/Templates/GtkSharp.Template.VBNet/content/GtkSharp.Application.VBNet/GtkNamespace.vbproj +++ b/Source/Templates/GtkSharp.Template.VBNet/content/GtkSharp.Application.VBNet/GtkNamespace.vbproj @@ -2,7 +2,7 @@ WinExe - net5.0 + $(FrameworkParameter) diff --git a/Source/Tools/GapiCodegen/GapiCodegen.csproj b/Source/Tools/GapiCodegen/GapiCodegen.csproj index 653fe5d27..1da4c5cfb 100644 --- a/Source/Tools/GapiCodegen/GapiCodegen.csproj +++ b/Source/Tools/GapiCodegen/GapiCodegen.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 ..\..\..\BuildOutput\Tools false diff --git a/Source/Tools/GapiFixup/GapiFixup.csproj b/Source/Tools/GapiFixup/GapiFixup.csproj index 713576357..9cd76e4a3 100644 --- a/Source/Tools/GapiFixup/GapiFixup.csproj +++ b/Source/Tools/GapiFixup/GapiFixup.csproj @@ -1,7 +1,7 @@ Exe - net5.0 + net6.0 ..\..\..\BuildOutput\Tools false diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 54555b8bd..d9aa8281a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -13,6 +13,12 @@ pool: vmImage: 'ubuntu-latest' steps: + - task: UseDotNet@2 + displayName: 'Use .NET Core SDK' + inputs: + version: 6.0.101 + includePreviewVersions: false + - script: echo "##vso[build.updatebuildnumber]$(version)" displayName: 'Set Build Number'