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
This commit is contained in:
Andrii Kurdiumov 2022-01-26 00:24:27 +06:00 committed by GitHub
parent ff3c53f6c5
commit 84f337b046
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 21 additions and 12 deletions

View file

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>..\..\BuildOutput\Samples</OutputPath> <OutputPath>..\..\BuildOutput\Samples</OutputPath>
</PropertyGroup> </PropertyGroup>

View file

@ -18,8 +18,9 @@
"symbols": { "symbols": {
"targetframework": { "targetframework": {
"type": "parameter", "type": "parameter",
"defaultValue": "net5.0", "description": "The target framework for the project.",
"replaces": "net5.0" "defaultValue": "net6.0",
"replaces": "$(FrameworkParameter)"
} }
}, },
"primaryOutputs": [ "primaryOutputs": [

View file

@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>$(FrameworkParameter)</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View file

@ -18,8 +18,9 @@
"symbols": { "symbols": {
"targetframework": { "targetframework": {
"type": "parameter", "type": "parameter",
"defaultValue": "net5.0", "description": "The target framework for the project.",
"replaces": "net5.0" "defaultValue": "net6.0",
"replaces": "$(FrameworkParameter)"
} }
}, },
"primaryOutputs": [ "primaryOutputs": [

View file

@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>$(FrameworkParameter)</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View file

@ -18,8 +18,9 @@
"symbols": { "symbols": {
"targetframework": { "targetframework": {
"type": "parameter", "type": "parameter",
"defaultValue": "net5.0", "description": "The target framework for the project.",
"replaces": "net5.0" "defaultValue": "net6.0",
"replaces": "$(FrameworkParameter)"
} }
}, },
"primaryOutputs": [ "primaryOutputs": [

View file

@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>$(FrameworkParameter)</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View file

@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<OutputPath>..\..\..\BuildOutput\Tools</OutputPath> <OutputPath>..\..\..\BuildOutput\Tools</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup> </PropertyGroup>

View file

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<OutputPath>..\..\..\BuildOutput\Tools</OutputPath> <OutputPath>..\..\..\BuildOutput\Tools</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup> </PropertyGroup>

View file

@ -13,6 +13,12 @@ pool:
vmImage: 'ubuntu-latest' vmImage: 'ubuntu-latest'
steps: steps:
- task: UseDotNet@2
displayName: 'Use .NET Core SDK'
inputs:
version: 6.0.101
includePreviewVersions: false
- script: echo "##vso[build.updatebuildnumber]$(version)" - script: echo "##vso[build.updatebuildnumber]$(version)"
displayName: 'Set Build Number' displayName: 'Set Build Number'