From c4cb55cb05c1df26b5f130a4d43f34ab5ed8a0a6 Mon Sep 17 00:00:00 2001 From: William Godbe Date: Mon, 9 Jan 2023 10:43:29 -0800 Subject: [PATCH] Update to net8.0 SDK (#45879) * Update to net8.0 SDK * Update global.json * Update Directory.Build.targets.in * Update RedisHubLifetimeManager.cs * Update dependencies from https://github.com/dotnet/arcade build 20230105.3 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Helix.Sdk From Version 8.0.0-beta.22630.1 -> To Version 8.0.0-beta.23055.3 * NoWarn * Update WasmLinkerTest.csproj * Update LinkabilityChecker.csproj Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 4 ++-- eng/common/templates/job/source-index-stage1.yml | 6 +++--- eng/common/tools.ps1 | 4 +++- eng/common/tools.sh | 4 +++- .../GenerateFiles/Directory.Build.targets.in | 14 ++++++++++++++ eng/tools/RepoTasks/RepoTasks.csproj | 4 ++-- eng/tools/RepoTasks/RepoTasks.tasks | 2 +- global.json | 8 ++++---- .../WasmLinkerTest/WasmLinkerTest.csproj | 1 + .../IIS/IIS/test/IIS.Tests/IIS.Tests.csproj | 1 + .../src/RedisHubLifetimeManager.cs | 2 +- .../LinkabilityChecker/LinkabilityChecker.csproj | 1 + 13 files changed, 44 insertions(+), 23 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 20b69074a59a..faa52b8592cd 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -302,22 +302,22 @@ https://github.com/dotnet/runtime 5da4a9e919dcee35f831ab69b6e475baaf798875 - + https://github.com/dotnet/arcade - e82404fca08383513e0b0b3c5308d4a9b18b7c7a + 7502a87ca569989008d3acef120b614604b6805f - + https://github.com/dotnet/arcade - e82404fca08383513e0b0b3c5308d4a9b18b7c7a + 7502a87ca569989008d3acef120b614604b6805f - + https://github.com/dotnet/arcade - e82404fca08383513e0b0b3c5308d4a9b18b7c7a + 7502a87ca569989008d3acef120b614604b6805f - + https://github.com/dotnet/arcade - e82404fca08383513e0b0b3c5308d4a9b18b7c7a + 7502a87ca569989008d3acef120b614604b6805f diff --git a/eng/Versions.props b/eng/Versions.props index 10a4e636b710..d3ea9a7e0c20 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -135,8 +135,8 @@ 8.0.0-alpha.1.23059.4 8.0.0-alpha.1.23059.4 - 8.0.0-beta.22630.1 - 8.0.0-beta.22630.1 + 8.0.0-beta.23055.3 + 8.0.0-beta.23055.3 8.0.0-alpha.1.23055.2 diff --git a/eng/common/templates/job/source-index-stage1.yml b/eng/common/templates/job/source-index-stage1.yml index 09c506d11855..71b66aeb8a5c 100644 --- a/eng/common/templates/job/source-index-stage1.yml +++ b/eng/common/templates/job/source-index-stage1.yml @@ -1,6 +1,6 @@ parameters: runAsPublic: false - sourceIndexPackageVersion: 1.0.1-20220804.1 + sourceIndexPackageVersion: 1.0.1-20221220.2 sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci" preSteps: [] @@ -40,10 +40,10 @@ jobs: - ${{ preStep }} - task: UseDotNet@2 - displayName: Use .NET Core sdk 3.1 + displayName: Use .NET Core SDK 6 inputs: packageType: sdk - version: 3.1.x + version: 6.0.x installationPath: $(Agent.TempDirectory)/dotnet workingDirectory: $(Agent.TempDirectory) diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 1a8c16c56e56..7caacc6de2e1 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -581,7 +581,7 @@ function InitializeBuildTool() { ExitWithExitCode 1 } $dotnetPath = Join-Path $dotnetRoot (GetExecutableFileName 'dotnet') - $buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'net7.0' } + $buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'net8.0' } } elseif ($msbuildEngine -eq "vs") { try { $msbuildPath = InitializeVisualStudioMSBuild -install:$restore @@ -743,6 +743,8 @@ function MSBuild() { (Join-Path $basePath (Join-Path netcoreapp2.1 'Microsoft.DotNet.Arcade.Sdk.dll')) (Join-Path $basePath (Join-Path netcoreapp3.1 'Microsoft.DotNet.ArcadeLogging.dll')), (Join-Path $basePath (Join-Path netcoreapp3.1 'Microsoft.DotNet.Arcade.Sdk.dll')) + (Join-Path $basePath (Join-Path net7.0 'Microsoft.DotNet.ArcadeLogging.dll')), + (Join-Path $basePath (Join-Path net7.0 'Microsoft.DotNet.Arcade.Sdk.dll')) ) $selectedPath = $null foreach ($path in $possiblePaths) { diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 2f27d7453cd4..cf9fb1ea2d32 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -312,7 +312,7 @@ function InitializeBuildTool { # return values _InitializeBuildTool="$_InitializeDotNetCli/dotnet" _InitializeBuildToolCommand="msbuild" - _InitializeBuildToolFramework="net7.0" + _InitializeBuildToolFramework="net8.0" } # Set RestoreNoCache as a workaround for https://github.com/NuGet/Home/issues/3116 @@ -428,6 +428,8 @@ function MSBuild { possiblePaths+=( "$toolset_dir/netcoreapp2.1/Microsoft.DotNet.Arcade.Sdk.dll" ) possiblePaths+=( "$toolset_dir/netcoreapp3.1/Microsoft.DotNet.ArcadeLogging.dll" ) possiblePaths+=( "$toolset_dir/netcoreapp3.1/Microsoft.DotNet.Arcade.Sdk.dll" ) + possiblePaths+=( "$toolset_dir/net7.0/Microsoft.DotNet.ArcadeLogging.dll" ) + possiblePaths+=( "$toolset_dir/net7.0/Microsoft.DotNet.Arcade.Sdk.dll" ) for path in "${possiblePaths[@]}"; do if [[ -f $path ]]; then selectedPath=$path diff --git a/eng/tools/GenerateFiles/Directory.Build.targets.in b/eng/tools/GenerateFiles/Directory.Build.targets.in index c32b42949f8c..2764eb1a609e 100644 --- a/eng/tools/GenerateFiles/Directory.Build.targets.in +++ b/eng/tools/GenerateFiles/Directory.Build.targets.in @@ -121,4 +121,18 @@ + + + + + + + diff --git a/eng/tools/RepoTasks/RepoTasks.csproj b/eng/tools/RepoTasks/RepoTasks.csproj index 312fdfba39ed..5f9e4f60ae98 100644 --- a/eng/tools/RepoTasks/RepoTasks.csproj +++ b/eng/tools/RepoTasks/RepoTasks.csproj @@ -1,6 +1,6 @@ - net7.0 + $(DefaultNetCoreTargetFramework) $(TargetFrameworks);net472 $(DefineConstants);BUILD_MSI_TASKS false @@ -19,7 +19,7 @@ - + diff --git a/eng/tools/RepoTasks/RepoTasks.tasks b/eng/tools/RepoTasks/RepoTasks.tasks index 984927a7f76d..788558c3fa4c 100644 --- a/eng/tools/RepoTasks/RepoTasks.tasks +++ b/eng/tools/RepoTasks/RepoTasks.tasks @@ -1,6 +1,6 @@ - <_RepoTaskAssemblyFolder Condition="'$(MSBuildRuntimeType)' == 'core'">net7.0 + <_RepoTaskAssemblyFolder Condition="'$(MSBuildRuntimeType)' == 'core'">$(DefaultNetCoreTargetFramework) <_RepoTaskAssemblyFolder Condition="'$(MSBuildRuntimeType)' != 'core'">net472 <_RepoTaskAssembly>$(ArtifactsBinDir)RepoTasks\Release\$(_RepoTaskAssemblyFolder)\RepoTasks.dll diff --git a/global.json b/global.json index dd810f15653d..17a119bfa118 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "8.0.100-alpha.1.22531.1" + "version": "8.0.100-alpha.1.23055.1" }, "tools": { - "dotnet": "8.0.100-alpha.1.22531.1", + "dotnet": "8.0.100-alpha.1.23055.1", "runtimes": { "dotnet/x86": [ "$(MicrosoftNETCoreBrowserDebugHostTransportVersion)" @@ -27,7 +27,7 @@ }, "msbuild-sdks": { "Yarn.MSBuild": "1.22.10", - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.22630.1", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.22630.1" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23055.3", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23055.3" } } diff --git a/src/Components/WebAssembly/testassets/WasmLinkerTest/WasmLinkerTest.csproj b/src/Components/WebAssembly/testassets/WasmLinkerTest/WasmLinkerTest.csproj index 252481a43034..99e41f9663fa 100644 --- a/src/Components/WebAssembly/testassets/WasmLinkerTest/WasmLinkerTest.csproj +++ b/src/Components/WebAssembly/testassets/WasmLinkerTest/WasmLinkerTest.csproj @@ -5,6 +5,7 @@ true true true + true diff --git a/src/Servers/IIS/IIS/test/IIS.Tests/IIS.Tests.csproj b/src/Servers/IIS/IIS/test/IIS.Tests/IIS.Tests.csproj index 605656b95560..cf1467da3aa2 100644 --- a/src/Servers/IIS/IIS/test/IIS.Tests/IIS.Tests.csproj +++ b/src/Servers/IIS/IIS/test/IIS.Tests/IIS.Tests.csproj @@ -6,6 +6,7 @@ $(DefaultNetCoreTargetFramework) true true + $(NoWarn);CA2200 diff --git a/src/SignalR/server/StackExchangeRedis/src/RedisHubLifetimeManager.cs b/src/SignalR/server/StackExchangeRedis/src/RedisHubLifetimeManager.cs index 84c9e5d41af0..111e2520a7cd 100644 --- a/src/SignalR/server/StackExchangeRedis/src/RedisHubLifetimeManager.cs +++ b/src/SignalR/server/StackExchangeRedis/src/RedisHubLifetimeManager.cs @@ -593,7 +593,7 @@ private async Task SubscribeToConnection(HubConnectionContext connection) } catch (Exception ex) { - RedisLog.ErrorForwardingResult(_logger, completionMessage.InvocationId, ex); + RedisLog.ErrorForwardingResult(_logger, completionMessage.InvocationId!, ex); } })); diff --git a/src/Tools/LinkabilityChecker/LinkabilityChecker.csproj b/src/Tools/LinkabilityChecker/LinkabilityChecker.csproj index f17c1eb60bb2..39a32a75a240 100644 --- a/src/Tools/LinkabilityChecker/LinkabilityChecker.csproj +++ b/src/Tools/LinkabilityChecker/LinkabilityChecker.csproj @@ -3,6 +3,7 @@ $(DefaultNetCoreTargetFramework) false Exe + true