From 9602dabe5882f1741a17529cfd4564fe33a2fcb6 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 5 May 2022 12:49:14 +0000 Subject: [PATCH 01/25] Update dependencies from https://github.com/dotnet/arcade build 20220504.2 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk From Version 7.0.0-beta.22225.6 -> To Version 7.0.0-beta.22254.2 --- eng/Version.Details.xml | 8 ++++---- global.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c7256faa3cb7b..8c3053a5e39c9 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -13,18 +13,18 @@ - + https://github.com/dotnet/arcade - 5145e86df0c491e082b589aa31d69eea300adc02 + 9c9de91045b8691364e40426177da2e5c535d3ab https://github.com/dotnet/roslyn c1d8c6f043bc80425c6828455eb57f8a404759c6 - + https://github.com/dotnet/arcade - 5145e86df0c491e082b589aa31d69eea300adc02 + 9c9de91045b8691364e40426177da2e5c535d3ab diff --git a/global.json b/global.json index 90efbb504fff5..bba66daa3f8ae 100644 --- a/global.json +++ b/global.json @@ -12,7 +12,7 @@ "xcopy-msbuild": "16.10.0-preview2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22225.6", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22225.6" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22254.2", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22254.2" } } From 793767c3077a47226254e1e2fc6d6472ea1131ff Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 7 May 2022 12:49:34 +0000 Subject: [PATCH 02/25] Update dependencies from https://github.com/dotnet/arcade build 20220505.2 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk From Version 7.0.0-beta.22225.6 -> To Version 7.0.0-beta.22255.2 --- eng/Version.Details.xml | 8 ++++---- global.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8c3053a5e39c9..3cef8d4a1832a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -13,18 +13,18 @@ - + https://github.com/dotnet/arcade - 9c9de91045b8691364e40426177da2e5c535d3ab + ba1c3aff4be864c493031d989259ef92aaa23fc3 https://github.com/dotnet/roslyn c1d8c6f043bc80425c6828455eb57f8a404759c6 - + https://github.com/dotnet/arcade - 9c9de91045b8691364e40426177da2e5c535d3ab + ba1c3aff4be864c493031d989259ef92aaa23fc3 diff --git a/global.json b/global.json index bba66daa3f8ae..5be767b92cbcc 100644 --- a/global.json +++ b/global.json @@ -12,7 +12,7 @@ "xcopy-msbuild": "16.10.0-preview2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22254.2", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22254.2" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22255.2", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22255.2" } } From afdf3aa7450ee05abb44eeb56efdcf28b4f46f12 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 10 May 2022 12:54:31 +0000 Subject: [PATCH 03/25] Update dependencies from https://github.com/dotnet/arcade build 20220509.5 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk From Version 7.0.0-beta.22225.6 -> To Version 7.0.0-beta.22259.5 --- eng/Version.Details.xml | 8 ++++---- global.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3cef8d4a1832a..648dedc3f4a8d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -13,18 +13,18 @@ - + https://github.com/dotnet/arcade - ba1c3aff4be864c493031d989259ef92aaa23fc3 + 6e533ee7a479018586f2314295ad113f6ba1d5b1 https://github.com/dotnet/roslyn c1d8c6f043bc80425c6828455eb57f8a404759c6 - + https://github.com/dotnet/arcade - ba1c3aff4be864c493031d989259ef92aaa23fc3 + 6e533ee7a479018586f2314295ad113f6ba1d5b1 diff --git a/global.json b/global.json index 5be767b92cbcc..d9587aedac7f9 100644 --- a/global.json +++ b/global.json @@ -12,7 +12,7 @@ "xcopy-msbuild": "16.10.0-preview2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22255.2", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22255.2" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22259.5", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22259.5" } } From 508e4ccc876112060bd0a01f80c9c6b147cb236d Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 11 May 2022 12:51:46 +0000 Subject: [PATCH 04/25] Update dependencies from https://github.com/dotnet/arcade build 20220510.2 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk From Version 7.0.0-beta.22225.6 -> To Version 7.0.0-beta.22260.2 --- eng/Version.Details.xml | 8 ++++---- eng/common/internal/Tools.csproj | 3 +++ global.json | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 648dedc3f4a8d..026e43705b5ba 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -13,18 +13,18 @@ - + https://github.com/dotnet/arcade - 6e533ee7a479018586f2314295ad113f6ba1d5b1 + 6baad99219dda29b3c8efd7d627393cda4b38372 https://github.com/dotnet/roslyn c1d8c6f043bc80425c6828455eb57f8a404759c6 - + https://github.com/dotnet/arcade - 6e533ee7a479018586f2314295ad113f6ba1d5b1 + 6baad99219dda29b3c8efd7d627393cda4b38372 diff --git a/eng/common/internal/Tools.csproj b/eng/common/internal/Tools.csproj index beb9c4648ea19..7f5ce6d608133 100644 --- a/eng/common/internal/Tools.csproj +++ b/eng/common/internal/Tools.csproj @@ -8,6 +8,9 @@ + + + diff --git a/global.json b/global.json index d9587aedac7f9..bf76f5269a7d1 100644 --- a/global.json +++ b/global.json @@ -12,7 +12,7 @@ "xcopy-msbuild": "16.10.0-preview2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22259.5", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22259.5" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22260.2", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22260.2" } } From 83deb7db5e9205cd7d878e4f2dc5d86aea4d378f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 12 May 2022 12:49:32 +0000 Subject: [PATCH 05/25] Update dependencies from https://github.com/dotnet/arcade build 20220511.14 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk From Version 7.0.0-beta.22225.6 -> To Version 7.0.0-beta.22261.14 --- eng/Version.Details.xml | 8 ++++---- eng/common/init-tools-native.ps1 | 11 ++++++----- global.json | 4 ++-- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 026e43705b5ba..67ed265773c5d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -13,18 +13,18 @@ - + https://github.com/dotnet/arcade - 6baad99219dda29b3c8efd7d627393cda4b38372 + 666b83fa183306e9adec817c903ec93da2a4703c https://github.com/dotnet/roslyn c1d8c6f043bc80425c6828455eb57f8a404759c6 - + https://github.com/dotnet/arcade - 6baad99219dda29b3c8efd7d627393cda4b38372 + 666b83fa183306e9adec817c903ec93da2a4703c diff --git a/eng/common/init-tools-native.ps1 b/eng/common/init-tools-native.ps1 index 413adea4365b1..24a5e65de1b3e 100644 --- a/eng/common/init-tools-native.ps1 +++ b/eng/common/init-tools-native.ps1 @@ -93,7 +93,7 @@ try { $ToolVersion = "" } $ArcadeToolsDirectory = "C:\arcade-tools" - if (Test-Path $ArcadeToolsDirectory -eq $False) { + if (-not (Test-Path $ArcadeToolsDirectory)) { Write-Error "Arcade tools directory '$ArcadeToolsDirectory' was not found; artifacts were not properly installed." exit 1 } @@ -103,13 +103,14 @@ try { exit 1 } $BinPathFile = "$($ToolDirectory.FullName)\binpath.txt" - if (Test-Path -Path "$BinPathFile" -eq $False) { + if (-not (Test-Path -Path "$BinPathFile")) { Write-Error "Unable to find binpath.txt in '$($ToolDirectory.FullName)' ($ToolName $ToolVersion); artifact is either installed incorrectly or is not a bootstrappable tool." exit 1 } $BinPath = Get-Content "$BinPathFile" - Write-Host "Adding $ToolName to the path ($(Convert-Path -Path $BinPath))..." - Write-Host "##vso[task.prependpath]$(Convert-Path -Path $BinPath)" + $ToolPath = Convert-Path -Path $BinPath + Write-Host "Adding $ToolName to the path ($ToolPath)..." + Write-Host "##vso[task.prependpath]$ToolPath" } } exit 0 @@ -188,7 +189,7 @@ try { Write-Host "##vso[task.prependpath]$(Convert-Path -Path $InstallBin)" return $InstallBin } - else { + elseif (-not ($PathPromotion)) { Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message 'Native tools install directory does not exist, installation failed' exit 1 } diff --git a/global.json b/global.json index bf76f5269a7d1..6120fa6a2dd2b 100644 --- a/global.json +++ b/global.json @@ -12,7 +12,7 @@ "xcopy-msbuild": "16.10.0-preview2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22260.2", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22260.2" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22261.14", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22261.14" } } From af50123ce47e46ab81115248262ed98573e5aa46 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 12 May 2022 17:18:52 +0000 Subject: [PATCH 06/25] Update dependencies from https://github.com/dotnet/arcade build 20220511.7 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk From Version 6.0.0-beta.22218.4 -> To Version 6.0.0-beta.22261.7 --- eng/Version.Details.xml | 8 ++++---- global.json | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b152e02e490b8..bf1dda3cb51e1 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,17 +3,17 @@ - + https://github.com/dotnet/arcade - 095ae444583627c1f0575967529107fd1e1d6913 + e3cbecc5b0e51374e3d71dbb976004ab9cc90430 https://github.com/dotnet/roslyn 9b40ab852a3b59ce9cef33b3e97c17af13c8e694 - + https://github.com/dotnet/arcade - 095ae444583627c1f0575967529107fd1e1d6913 + e3cbecc5b0e51374e3d71dbb976004ab9cc90430 diff --git a/global.json b/global.json index 26d508216871f..3731a949508aa 100644 --- a/global.json +++ b/global.json @@ -1,18 +1,18 @@ { "sdk": { - "version": "6.0.104", + "version": "6.0.105", "allowPrerelease": true, "rollForward": "major" }, "tools": { - "dotnet": "6.0.104", + "dotnet": "6.0.105", "vs": { "version": "16.10" }, "xcopy-msbuild": "16.10.0-preview2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.22218.4", - "Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.22218.4" + "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.22261.7", + "Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.22261.7" } } From 5cb2da493c97ec6972b3fa8dc422a36d6dafd9a0 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 12 May 2022 23:25:55 +0000 Subject: [PATCH 07/25] Update dependencies from https://github.com/dotnet/arcade build 20220511.16 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk From Version 7.0.0-beta.22225.6 -> To Version 7.0.0-beta.22261.16 --- eng/Version.Details.xml | 8 ++++---- global.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 67ed265773c5d..11c52a76c5dc4 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -13,18 +13,18 @@ - + https://github.com/dotnet/arcade - 666b83fa183306e9adec817c903ec93da2a4703c + e062206a3aa6add16948332920398ef98a215477 https://github.com/dotnet/roslyn c1d8c6f043bc80425c6828455eb57f8a404759c6 - + https://github.com/dotnet/arcade - 666b83fa183306e9adec817c903ec93da2a4703c + e062206a3aa6add16948332920398ef98a215477 diff --git a/global.json b/global.json index 6120fa6a2dd2b..314df696f3132 100644 --- a/global.json +++ b/global.json @@ -12,7 +12,7 @@ "xcopy-msbuild": "16.10.0-preview2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22261.14", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22261.14" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22261.16", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22261.16" } } From 3605f08f867c6e66a9284580e1edd5e265bd3f63 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Thu, 12 May 2022 17:26:14 -0700 Subject: [PATCH 08/25] Generate VS SBOM during official builds. --- azure-pipelines-official.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines-official.yml b/azure-pipelines-official.yml index d8769d839667f..79090d58167af 100644 --- a/azure-pipelines-official.yml +++ b/azure-pipelines-official.yml @@ -190,6 +190,7 @@ stages: /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory) /p:DotnetPublishUsingPipelines=true /p:IgnoreIbcMergeErrors=true + /p:GenerateSbom=true condition: succeeded() - task: PowerShell@2 From 4e1e0d91d631bedc3e2f2178b2e4b62923284d9d Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Thu, 12 May 2022 17:30:59 -0700 Subject: [PATCH 09/25] Validate nuget feed --- azure-pipelines-official.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-official.yml b/azure-pipelines-official.yml index 79090d58167af..36343e2bd573a 100644 --- a/azure-pipelines-official.yml +++ b/azure-pipelines-official.yml @@ -133,7 +133,7 @@ stages: # Authenticate with service connections to be able to publish packages to external nuget feeds. - task: NuGetAuthenticate@0 inputs: - nuGetServiceConnections: azure-public/vs-impl, azure-public/vssdk, devdiv/engineering + nuGetServiceConnections: azure-public/vs-impl, azure-public/vssdk, devdiv/engineering, dotnet-core-internal-tooling # Needed because the build fails the NuGet Tools restore without it - task: UseDotNet@2 From e4281f7a80c723bc133011400cb8d31766c5c027 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 13 May 2022 12:45:56 +0000 Subject: [PATCH 10/25] Update dependencies from https://github.com/dotnet/arcade build 20220512.8 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk From Version 7.0.0-beta.22225.6 -> To Version 7.0.0-beta.22262.8 --- eng/Version.Details.xml | 8 ++++---- global.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 11c52a76c5dc4..e84f7431d5d73 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -13,18 +13,18 @@ - + https://github.com/dotnet/arcade - e062206a3aa6add16948332920398ef98a215477 + b7796f653e48e001123963f17387c052891b48e6 https://github.com/dotnet/roslyn c1d8c6f043bc80425c6828455eb57f8a404759c6 - + https://github.com/dotnet/arcade - e062206a3aa6add16948332920398ef98a215477 + b7796f653e48e001123963f17387c052891b48e6 diff --git a/global.json b/global.json index 314df696f3132..11a2aff40c374 100644 --- a/global.json +++ b/global.json @@ -12,7 +12,7 @@ "xcopy-msbuild": "16.10.0-preview2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22261.16", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22261.16" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22262.8", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22262.8" } } From c6c808a56803347c0945fb5f4aafe9ce77c22cd2 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 17 May 2022 12:55:02 +0000 Subject: [PATCH 11/25] Update dependencies from https://github.com/dotnet/arcade build 20220516.1 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk From Version 7.0.0-beta.22225.6 -> To Version 7.0.0-beta.22266.1 --- eng/Version.Details.xml | 8 ++++---- global.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e84f7431d5d73..b26f65ed2f180 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -13,18 +13,18 @@ - + https://github.com/dotnet/arcade - b7796f653e48e001123963f17387c052891b48e6 + 70d269dfe645525adb6836d25d8a97d7960eda1a https://github.com/dotnet/roslyn c1d8c6f043bc80425c6828455eb57f8a404759c6 - + https://github.com/dotnet/arcade - b7796f653e48e001123963f17387c052891b48e6 + 70d269dfe645525adb6836d25d8a97d7960eda1a diff --git a/global.json b/global.json index 11a2aff40c374..3757a3f615707 100644 --- a/global.json +++ b/global.json @@ -12,7 +12,7 @@ "xcopy-msbuild": "16.10.0-preview2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22262.8", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22262.8" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22266.1", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22266.1" } } From 36f0601e627bcac9586ebf1c911715d833612221 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 21 May 2022 12:46:30 +0000 Subject: [PATCH 12/25] Update dependencies from https://github.com/dotnet/arcade build 20220519.3 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk From Version 7.0.0-beta.22225.6 -> To Version 7.0.0-beta.22269.3 --- eng/Version.Details.xml | 8 ++++---- global.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b26f65ed2f180..9bbfbd8c7500d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -13,18 +13,18 @@ - + https://github.com/dotnet/arcade - 70d269dfe645525adb6836d25d8a97d7960eda1a + 0403b0d07aff1b103256cfbe082c97a5c8846d20 https://github.com/dotnet/roslyn c1d8c6f043bc80425c6828455eb57f8a404759c6 - + https://github.com/dotnet/arcade - 70d269dfe645525adb6836d25d8a97d7960eda1a + 0403b0d07aff1b103256cfbe082c97a5c8846d20 diff --git a/global.json b/global.json index 3757a3f615707..ef799f2d4e9b6 100644 --- a/global.json +++ b/global.json @@ -12,7 +12,7 @@ "xcopy-msbuild": "16.10.0-preview2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22266.1", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22266.1" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22269.3", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22269.3" } } From 3d37d01ba4ecee84d672afde47600d82f0ec6a5f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 24 May 2022 12:51:20 +0000 Subject: [PATCH 13/25] Update dependencies from https://github.com/dotnet/arcade build 20220523.1 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk From Version 7.0.0-beta.22225.6 -> To Version 7.0.0-beta.22273.1 --- eng/Version.Details.xml | 8 ++++---- eng/common/tools.ps1 | 4 ++++ global.json | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9bbfbd8c7500d..13c44d6347ff2 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -13,18 +13,18 @@ - + https://github.com/dotnet/arcade - 0403b0d07aff1b103256cfbe082c97a5c8846d20 + ad55f9b957b9539613ecff82649d17650e4624d2 https://github.com/dotnet/roslyn c1d8c6f043bc80425c6828455eb57f8a404759c6 - + https://github.com/dotnet/arcade - 0403b0d07aff1b103256cfbe082c97a5c8846d20 + ad55f9b957b9539613ecff82649d17650e4624d2 diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 797f05292a851..423bd962e9661 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -635,6 +635,10 @@ function InitializeNativeTools() { InstallDirectory = "$ToolsDir" } } + if (Test-Path variable:NativeToolsOnMachine) { + Write-Host "Variable NativeToolsOnMachine detected, enabling native tool path promotion..." + $nativeArgs += @{ PathPromotion = $true } + } & "$PSScriptRoot/init-tools-native.ps1" @nativeArgs } } diff --git a/global.json b/global.json index ef799f2d4e9b6..0ea86f0806a09 100644 --- a/global.json +++ b/global.json @@ -12,7 +12,7 @@ "xcopy-msbuild": "16.10.0-preview2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22269.3", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22269.3" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22273.1", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22273.1" } } From ba3c08af99b7d6641a812f4b62e24e34fab8399c Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 25 May 2022 13:12:26 +0000 Subject: [PATCH 14/25] Update dependencies from https://github.com/dotnet/arcade build 20220524.7 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk From Version 7.0.0-beta.22225.6 -> To Version 7.0.0-beta.22274.7 --- eng/Version.Details.xml | 8 ++++---- global.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 13c44d6347ff2..19c1e8fc9fb7e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -13,18 +13,18 @@ - + https://github.com/dotnet/arcade - ad55f9b957b9539613ecff82649d17650e4624d2 + 007adcd66f519c3c96fa0ecc21ed197a6da9e015 https://github.com/dotnet/roslyn c1d8c6f043bc80425c6828455eb57f8a404759c6 - + https://github.com/dotnet/arcade - ad55f9b957b9539613ecff82649d17650e4624d2 + 007adcd66f519c3c96fa0ecc21ed197a6da9e015 diff --git a/global.json b/global.json index 0ea86f0806a09..87bc0f082dca3 100644 --- a/global.json +++ b/global.json @@ -12,7 +12,7 @@ "xcopy-msbuild": "16.10.0-preview2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22273.1", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22273.1" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22274.7", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22274.7" } } From 0718a44cebcb38d2d8dfb12a04fcebe2759044f6 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 26 May 2022 12:54:36 +0000 Subject: [PATCH 15/25] Update dependencies from https://github.com/dotnet/arcade build 20220525.2 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk From Version 7.0.0-beta.22225.6 -> To Version 7.0.0-beta.22275.2 --- eng/Version.Details.xml | 8 ++++---- global.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 19c1e8fc9fb7e..c4b849f1502cf 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -13,18 +13,18 @@ - + https://github.com/dotnet/arcade - 007adcd66f519c3c96fa0ecc21ed197a6da9e015 + a8aae93d709533604b73c619268415c6ccc71292 https://github.com/dotnet/roslyn c1d8c6f043bc80425c6828455eb57f8a404759c6 - + https://github.com/dotnet/arcade - 007adcd66f519c3c96fa0ecc21ed197a6da9e015 + a8aae93d709533604b73c619268415c6ccc71292 diff --git a/global.json b/global.json index 87bc0f082dca3..ecb3cdd18166a 100644 --- a/global.json +++ b/global.json @@ -12,7 +12,7 @@ "xcopy-msbuild": "16.10.0-preview2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22274.7", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22274.7" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22275.2", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22275.2" } } From 940a54f13c09ad0fd37a737afc855a30254126c6 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 27 May 2022 12:50:53 +0000 Subject: [PATCH 16/25] Update dependencies from https://github.com/dotnet/arcade build 20220526.1 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk From Version 7.0.0-beta.22225.6 -> To Version 7.0.0-beta.22276.1 --- eng/Version.Details.xml | 8 ++++---- global.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c4b849f1502cf..d19a005136036 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -13,18 +13,18 @@ - + https://github.com/dotnet/arcade - a8aae93d709533604b73c619268415c6ccc71292 + b8b67b243ba93bf9b89390c85b4dee034d3c5609 https://github.com/dotnet/roslyn c1d8c6f043bc80425c6828455eb57f8a404759c6 - + https://github.com/dotnet/arcade - a8aae93d709533604b73c619268415c6ccc71292 + b8b67b243ba93bf9b89390c85b4dee034d3c5609 diff --git a/global.json b/global.json index ecb3cdd18166a..e4e9abf08f4a7 100644 --- a/global.json +++ b/global.json @@ -12,7 +12,7 @@ "xcopy-msbuild": "16.10.0-preview2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22275.2", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22275.2" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22276.1", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22276.1" } } From 1ad87f3c0450728332678d055398d3ec71ad149b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 31 May 2022 12:53:39 +0000 Subject: [PATCH 17/25] Update dependencies from https://github.com/dotnet/arcade build 20220530.2 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk From Version 7.0.0-beta.22225.6 -> To Version 7.0.0-beta.22280.2 --- eng/Version.Details.xml | 8 ++++---- global.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d19a005136036..31eef6b00ca99 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -13,18 +13,18 @@ - + https://github.com/dotnet/arcade - b8b67b243ba93bf9b89390c85b4dee034d3c5609 + 08693ec7238902569631ccacdb004e3af9f147c4 https://github.com/dotnet/roslyn c1d8c6f043bc80425c6828455eb57f8a404759c6 - + https://github.com/dotnet/arcade - b8b67b243ba93bf9b89390c85b4dee034d3c5609 + 08693ec7238902569631ccacdb004e3af9f147c4 diff --git a/global.json b/global.json index e4e9abf08f4a7..cdde608fbd64f 100644 --- a/global.json +++ b/global.json @@ -12,7 +12,7 @@ "xcopy-msbuild": "16.10.0-preview2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22276.1", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22276.1" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22280.2", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22280.2" } } From 4c969fe0d93a1501495c9d3f5a6116afb4f9c2a5 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 1 Jun 2022 12:51:27 +0000 Subject: [PATCH 18/25] Update dependencies from https://github.com/dotnet/arcade build 20220531.1 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk From Version 7.0.0-beta.22225.6 -> To Version 7.0.0-beta.22281.1 --- eng/Version.Details.xml | 8 ++++---- global.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 31eef6b00ca99..3eae12dd2b559 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -13,18 +13,18 @@ - + https://github.com/dotnet/arcade - 08693ec7238902569631ccacdb004e3af9f147c4 + 8137eb745128ca78602a16c63d6b4090a5409785 https://github.com/dotnet/roslyn c1d8c6f043bc80425c6828455eb57f8a404759c6 - + https://github.com/dotnet/arcade - 08693ec7238902569631ccacdb004e3af9f147c4 + 8137eb745128ca78602a16c63d6b4090a5409785 diff --git a/global.json b/global.json index cdde608fbd64f..d5e21ce2b19cd 100644 --- a/global.json +++ b/global.json @@ -12,7 +12,7 @@ "xcopy-msbuild": "16.10.0-preview2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22280.2", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22280.2" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22281.1", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22281.1" } } From e7c5cab7bf6b0b5190122ab989d869b117d533f5 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 2 Jun 2022 12:46:28 +0000 Subject: [PATCH 19/25] Update dependencies from https://github.com/dotnet/arcade build 20220601.2 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk From Version 7.0.0-beta.22225.6 -> To Version 7.0.0-beta.22301.2 --- eng/Version.Details.xml | 8 ++++---- global.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3eae12dd2b559..e00db6bdb2981 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -13,18 +13,18 @@ - + https://github.com/dotnet/arcade - 8137eb745128ca78602a16c63d6b4090a5409785 + 7ffde50ec98dbe3584bef2375165ec9a6b39cb35 https://github.com/dotnet/roslyn c1d8c6f043bc80425c6828455eb57f8a404759c6 - + https://github.com/dotnet/arcade - 8137eb745128ca78602a16c63d6b4090a5409785 + 7ffde50ec98dbe3584bef2375165ec9a6b39cb35 diff --git a/global.json b/global.json index d5e21ce2b19cd..7fe70d83d94c3 100644 --- a/global.json +++ b/global.json @@ -12,7 +12,7 @@ "xcopy-msbuild": "16.10.0-preview2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22281.1", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22281.1" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22301.2", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22301.2" } } From 8f5d284869f5894ec0fbbf764ed7d4c17ffdc5ee Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Mon, 6 Jun 2022 09:27:23 -0700 Subject: [PATCH 20/25] Do not build VS SBOM until Arcade supports it --- azure-pipelines-official.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/azure-pipelines-official.yml b/azure-pipelines-official.yml index 812b4259694ce..f023e4b097941 100644 --- a/azure-pipelines-official.yml +++ b/azure-pipelines-official.yml @@ -190,7 +190,6 @@ stages: /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory) /p:DotnetPublishUsingPipelines=true /p:IgnoreIbcMergeErrors=true - /p:GenerateSbom=true condition: succeeded() - task: PowerShell@2 From 48b976b1b57841bc3e560193d7837a1f291aa494 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 7 Jun 2022 12:54:36 +0000 Subject: [PATCH 21/25] Update dependencies from https://github.com/dotnet/arcade build 20220606.1 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk From Version 7.0.0-beta.22225.6 -> To Version 7.0.0-beta.22306.1 --- eng/Version.Details.xml | 8 ++++---- global.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e00db6bdb2981..77369dff6a14a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -13,18 +13,18 @@ - + https://github.com/dotnet/arcade - 7ffde50ec98dbe3584bef2375165ec9a6b39cb35 + 7f522f2e42fd8c2064afb45eac34a1773ce6a1cc https://github.com/dotnet/roslyn c1d8c6f043bc80425c6828455eb57f8a404759c6 - + https://github.com/dotnet/arcade - 7ffde50ec98dbe3584bef2375165ec9a6b39cb35 + 7f522f2e42fd8c2064afb45eac34a1773ce6a1cc diff --git a/global.json b/global.json index 7fe70d83d94c3..8ac63ce7cd60d 100644 --- a/global.json +++ b/global.json @@ -12,7 +12,7 @@ "xcopy-msbuild": "16.10.0-preview2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22301.2", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22301.2" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22306.1", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22306.1" } } From bd35b1e34648bdc1901f0943aee5fbf1f39f7c24 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Tue, 14 Jun 2022 12:32:29 -0700 Subject: [PATCH 22/25] Fix MSBuildWorkspace tests --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index 2fb14f5a3a88d..6fbbc95b36ac6 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -208,7 +208,7 @@ is expected by the NET SDK used in the Workspace.MSBuild UnitTests. In order to test against the same verion of NuGet as our configured SDK, we must set the version to be the same. --> - 6.0.0 + 6.2.0-preview.2.80 $(NuGetCommonVersion) $(NuGetCommonVersion) $(NuGetCommonVersion) From 3dcbf244038690dbabb27907a79902856919f51d Mon Sep 17 00:00:00 2001 From: Manish Vasani Date: Wed, 15 Jun 2022 16:50:16 +0530 Subject: [PATCH 23/25] Add FixAll support of UseRecursivePattern refactoring This was identified as a high value refactoring for FixAll support as it promotes a new language feature (C# recursive patterns) --- ...RecursivePatternsRefactoringFixAllTests.cs | 692 ++++++++++++++++++ ...ecursivePatternsCodeRefactoringProvider.cs | 58 +- 2 files changed, 748 insertions(+), 2 deletions(-) create mode 100644 src/EditorFeatures/CSharpTest/CodeRefactorings/UseRecursivePatterns/UseRecursivePatternsRefactoringFixAllTests.cs diff --git a/src/EditorFeatures/CSharpTest/CodeRefactorings/UseRecursivePatterns/UseRecursivePatternsRefactoringFixAllTests.cs b/src/EditorFeatures/CSharpTest/CodeRefactorings/UseRecursivePatterns/UseRecursivePatternsRefactoringFixAllTests.cs new file mode 100644 index 0000000000000..d40bb1fa123fc --- /dev/null +++ b/src/EditorFeatures/CSharpTest/CodeRefactorings/UseRecursivePatterns/UseRecursivePatternsRefactoringFixAllTests.cs @@ -0,0 +1,692 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Threading.Tasks; +using Microsoft.CodeAnalysis.CodeRefactorings; +using Microsoft.CodeAnalysis.CSharp.CodeRefactorings.UseRecursivePatterns; +using Microsoft.CodeAnalysis.Test.Utilities; +using Xunit; + +namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.CodeRefactorings.UseRecursivePatterns +{ + [Trait(Traits.Feature, Traits.Features.CodeActionsUseRecursivePatterns)] + [Trait(Traits.Feature, Traits.Features.CodeActionsFixAllOccurrences)] + public class UseRecursivePatternsRefactoringFixAllTests : AbstractCSharpCodeActionTest + { + protected override CodeRefactoringProvider CreateCodeRefactoringProvider(Workspace workspace, TestParameters parameters) + => new UseRecursivePatternsCodeRefactoringProvider(); + + [Fact] + public async Task UseRecursivePatterns_FixAllInDocument() + { + await TestInRegularAndScriptAsync(@" +namespace NS +{ + class C : B + { + void M1() + { + if (n == a.b.c.d {|FixAllInDocument:|}&& a.b.c.a == n) + { + } + + if (this.P1 < 1 && 2 >= this.P2) + { + } + + if (!B1 && B2) + { + } + } + } + + class D : C + { + void M2() + { + _ = this switch + { + { a: var x } when x is { b: n } => 0 + }; + + switch (this) + { + case { a: var x } when x is { b: n }: + break; + } + } + } + + class B + { + public const C n = null; + public C a, b, c, d; + public int P1, P2, P3; + public bool B1, B2; + public C CP1, CP2; + public static C SCP1, SCP2; + public static int SP1, SP2; + public C m() { return null; } + } +}", @" +namespace NS +{ + class C : B + { + void M1() + { + if (a.b.c is { d: n, a: n }) + { + } + + if (this is { P1: < 1, P2: <= 2 }) + { + } + + if (this is { B1: false, B2: true }) + { + } + } + } + + class D : C + { + void M2() + { + _ = this switch + { + { a: { b: n } x } => 0 + }; + + switch (this) + { + case { a: { b: n } x }: + break; + } + } + } + + class B + { + public const C n = null; + public C a, b, c, d; + public int P1, P2, P3; + public bool B1, B2; + public C CP1, CP2; + public static C SCP1, SCP2; + public static int SP1, SP2; + public C m() { return null; } + } +}"); + } + + [Fact] + public async Task UseRecursivePatterns_FixAllInProject() + { + await TestInRegularAndScriptAsync(@" + + + +namespace NS +{ + class C : B + { + void M1() + { + _ = this switch + { + { a: var x } {|FixAllInProject:|}when x is { b: n } => 0 + }; + + switch (this) + { + case { a: var x } when x is { b: n }: + break; + } + } + } +} + + +namespace NS +{ + class D : C + { + void M2() + { + _ = this switch + { + { a: var x } when x is { b: n } => 0 + }; + + switch (this) + { + case { a: var x } when x is { b: n }: + break; + } + } + } +} + + +namespace NS +{ + class B + { + public const C n = null; + public C a, b, c, d; + public int P1, P2, P3; + public bool B1, B2; + public C CP1, CP2; + public static C SCP1, SCP2; + public static int SP1, SP2; + public C m() { return null; } + } +} + + + + +namespace NS +{ + class E : C + { + void M3() + { + _ = this switch + { + { a: var x } when x is { b: n } => 0 + }; + + switch (this) + { + case { a: var x } when x is { b: n }: + break; + } + } + } +} + + + +", @" + + + +namespace NS +{ + class C : B + { + void M1() + { + _ = this switch + { + { a: { b: n } x } => 0 + }; + + switch (this) + { + case { a: { b: n } x }: + break; + } + } + } +} + + +namespace NS +{ + class D : C + { + void M2() + { + _ = this switch + { + { a: { b: n } x } => 0 + }; + + switch (this) + { + case { a: { b: n } x }: + break; + } + } + } +} + + +namespace NS +{ + class B + { + public const C n = null; + public C a, b, c, d; + public int P1, P2, P3; + public bool B1, B2; + public C CP1, CP2; + public static C SCP1, SCP2; + public static int SP1, SP2; + public C m() { return null; } + } +} + + + + +namespace NS +{ + class E : C + { + void M3() + { + _ = this switch + { + { a: var x } when x is { b: n } => 0 + }; + + switch (this) + { + case { a: var x } when x is { b: n }: + break; + } + } + } +} + + +"); + } + + [Fact] + public async Task UseRecursivePatterns_FixAllInSolution() + { + await TestInRegularAndScriptAsync(@" + + + +namespace NS +{ + class C : B + { + void M1() + { + _ = this switch + { + { a: var x } {|FixAllInSolution:|}when x is { b: n } => 0 + }; + + switch (this) + { + case { a: var x } when x is { b: n }: + break; + } + } + } +} + + +namespace NS +{ + class D : C + { + void M2() + { + _ = this switch + { + { a: var x } when x is { b: n } => 0 + }; + + switch (this) + { + case { a: var x } when x is { b: n }: + break; + } + } + } +} + + +namespace NS +{ + class B + { + public const C n = null; + public C a, b, c, d; + public int P1, P2, P3; + public bool B1, B2; + public C CP1, CP2; + public static C SCP1, SCP2; + public static int SP1, SP2; + public C m() { return null; } + } +} + + + + +namespace NS +{ + class E : C + { + void M3() + { + _ = this switch + { + { a: var x } when x is { b: n } => 0 + }; + + switch (this) + { + case { a: var x } when x is { b: n }: + break; + } + } + } +} + + + +", @" + + + +namespace NS +{ + class C : B + { + void M1() + { + _ = this switch + { + { a: { b: n } x } => 0 + }; + + switch (this) + { + case { a: { b: n } x }: + break; + } + } + } +} + + +namespace NS +{ + class D : C + { + void M2() + { + _ = this switch + { + { a: { b: n } x } => 0 + }; + + switch (this) + { + case { a: { b: n } x }: + break; + } + } + } +} + + +namespace NS +{ + class B + { + public const C n = null; + public C a, b, c, d; + public int P1, P2, P3; + public bool B1, B2; + public C CP1, CP2; + public static C SCP1, SCP2; + public static int SP1, SP2; + public C m() { return null; } + } +} + + + + +namespace NS +{ + class E : C + { + void M3() + { + _ = this switch + { + { a: { b: n } x } => 0 + }; + + switch (this) + { + case { a: { b: n } x }: + break; + } + } + } +} + + +"); + } + + [Fact] + public async Task UseRecursivePatterns_FixAllInContainingMember() + { + await TestInRegularAndScriptAsync(@" +namespace NS +{ + class C : B + { + void M1() + { + if (n == a.b.c.d {|FixAllInContainingMember:|}&& a.b.c.a == n) + { + } + + if (this.P1 < 1 && 2 >= this.P2) + { + } + + if (!B1 && B2) + { + } + } + } + + class D : C + { + void M2() + { + _ = this switch + { + { a: var x } when x is { b: n } => 0 + }; + + switch (this) + { + case { a: var x } when x is { b: n }: + break; + } + } + } + + class B + { + public const C n = null; + public C a, b, c, d; + public int P1, P2, P3; + public bool B1, B2; + public C CP1, CP2; + public static C SCP1, SCP2; + public static int SP1, SP2; + public C m() { return null; } + } +}", @" +namespace NS +{ + class C : B + { + void M1() + { + if (a.b.c is { d: n, a: n }) + { + } + + if (this is { P1: < 1, P2: <= 2 }) + { + } + + if (this is { B1: false, B2: true }) + { + } + } + } + + class D : C + { + void M2() + { + _ = this switch + { + { a: var x } when x is { b: n } => 0 + }; + + switch (this) + { + case { a: var x } when x is { b: n }: + break; + } + } + } + + class B + { + public const C n = null; + public C a, b, c, d; + public int P1, P2, P3; + public bool B1, B2; + public C CP1, CP2; + public static C SCP1, SCP2; + public static int SP1, SP2; + public C m() { return null; } + } +}"); + } + + [Fact] + public async Task UseRecursivePatterns_FixAllInContainingType() + { + await TestInRegularAndScriptAsync(@" +namespace NS +{ + class C : B + { + void M1() + { + if (n == a.b.c.d {|FixAllInContainingType:|}&& a.b.c.a == n) + { + } + } + + void M2() + { + if (this.P1 < 1 && 2 >= this.P2) + { + } + + if (!B1 && B2) + { + } + } + } + + class D : C + { + void M3() + { + _ = this switch + { + { a: var x } when x is { b: n } => 0 + }; + + switch (this) + { + case { a: var x } when x is { b: n }: + break; + } + } + } + + class B + { + public const C n = null; + public C a, b, c, d; + public int P1, P2, P3; + public bool B1, B2; + public C CP1, CP2; + public static C SCP1, SCP2; + public static int SP1, SP2; + public C m() { return null; } + } +}", @" +namespace NS +{ + class C : B + { + void M1() + { + if (a.b.c is { d: n, a: n }) + { + } + } + + void M2() + { + if (this is { P1: < 1, P2: <= 2 }) + { + } + + if (this is { B1: false, B2: true }) + { + } + } + } + + class D : C + { + void M3() + { + _ = this switch + { + { a: var x } when x is { b: n } => 0 + }; + + switch (this) + { + case { a: var x } when x is { b: n }: + break; + } + } + } + + class B + { + public const C n = null; + public C a, b, c, d; + public int P1, P2, P3; + public bool B1, B2; + public C CP1, CP2; + public static C SCP1, SCP2; + public static int SP1, SP2; + public C m() { return null; } + } +}"); + } + } +} diff --git a/src/Features/CSharp/Portable/CodeRefactorings/UseRecursivePatterns/UseRecursivePatternsCodeRefactoringProvider.cs b/src/Features/CSharp/Portable/CodeRefactorings/UseRecursivePatterns/UseRecursivePatternsCodeRefactoringProvider.cs index 3f3a371d406e5..fcb2f43263337 100644 --- a/src/Features/CSharp/Portable/CodeRefactorings/UseRecursivePatterns/UseRecursivePatternsCodeRefactoringProvider.cs +++ b/src/Features/CSharp/Portable/CodeRefactorings/UseRecursivePatterns/UseRecursivePatternsCodeRefactoringProvider.cs @@ -11,6 +11,7 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis.CodeActions; +using Microsoft.CodeAnalysis.CodeFixes; using Microsoft.CodeAnalysis.CodeRefactorings; using Microsoft.CodeAnalysis.CSharp.CodeGeneration; using Microsoft.CodeAnalysis.CSharp.Extensions; @@ -21,6 +22,7 @@ using Microsoft.CodeAnalysis.PooledObjects; using Microsoft.CodeAnalysis.Shared.Extensions; using Microsoft.CodeAnalysis.Simplification; +using Microsoft.CodeAnalysis.Text; using Roslyn.Utilities; namespace Microsoft.CodeAnalysis.CSharp.CodeRefactorings.UseRecursivePatterns @@ -29,17 +31,19 @@ namespace Microsoft.CodeAnalysis.CSharp.CodeRefactorings.UseRecursivePatterns using static SyntaxKind; [ExportCodeRefactoringProvider(LanguageNames.CSharp, Name = PredefinedCodeRefactoringProviderNames.UseRecursivePatterns), Shared] - internal sealed class UseRecursivePatternsCodeRefactoringProvider : CodeRefactoringProvider + internal sealed class UseRecursivePatternsCodeRefactoringProvider : SyntaxEditorBasedCodeRefactoringProvider { private static readonly PatternSyntax s_trueConstantPattern = ConstantPattern(LiteralExpression(TrueLiteralExpression)); private static readonly PatternSyntax s_falseConstantPattern = ConstantPattern(LiteralExpression(FalseLiteralExpression)); [ImportingConstructor] - [Obsolete(MefConstruction.ImportingConstructorMessage, error: true)] + [SuppressMessage("RoslynDiagnosticsReliability", "RS0033:Importing constructor should be [Obsolete]", Justification = "Used in test code: https://github.com/dotnet/roslyn/issues/42814")] public UseRecursivePatternsCodeRefactoringProvider() { } + protected override ImmutableArray SupportedFixAllScopes => AllFixAllScopes; + public override async Task ComputeRefactoringsAsync(CodeRefactoringContext context) { var (document, textSpan, cancellationToken) = context; @@ -77,6 +81,17 @@ public override async Task ComputeRefactoringsAsync(CodeRefactoringContext conte _ => null }; + private static bool IsFixableNode(SyntaxNode node) + => node switch + { + BinaryExpressionSyntax(LogicalAndExpression) => true, + CasePatternSwitchLabelSyntax { WhenClause: { } whenClause } => true, + SwitchExpressionArmSyntax { WhenClause: { } whenClause } => true, + WhenClauseSyntax { Parent: CasePatternSwitchLabelSyntax } => true, + WhenClauseSyntax { Parent: SwitchExpressionArmSyntax } => true, + _ => false + }; + private static Func? CombineLogicalAndOperands(BinaryExpressionSyntax logicalAnd, SemanticModel model) { if (TryDetermineReceiver(logicalAnd.Left, model) is not var (leftReceiver, leftTarget, leftFlipped) || @@ -503,5 +518,44 @@ when canConvertToSubpattern(name, arg) && !memberAccess.Expression.IsKind(Syntax } } } + + protected override async Task FixAllAsync( + Document document, + ImmutableArray fixAllSpans, + SyntaxEditor editor, + CodeActionOptionsProvider optionsProvider, + string? equivalenceKey, + CancellationToken cancellationToken) + { + // Get all the descendant nodes to refactor. + var nodes = editor.OriginalRoot.DescendantNodes().Where(IsFixableNode); + + // We're going to be continually editing this tree. Track all the nodes we + // care about so we can find them across each edit. + document = document.WithSyntaxRoot(editor.OriginalRoot.TrackNodes(nodes)); + + // Process all nodes to refactor in reverse to ensure nested nodes + // are processed before the outer nodes to refactor. + foreach (var originalNode in nodes.Reverse()) + { + // Only process nodes fully within a fixAllSpan + if (!fixAllSpans.Any(fixAllSpan => fixAllSpan.Contains(originalNode.Span))) + continue; + + // Get current root, current node to refactor and semantic model. + var root = await document.GetRequiredSyntaxRootAsync(cancellationToken).ConfigureAwait(false); + var currentNode = root.GetCurrentNodes(originalNode).SingleOrDefault(); + var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); + + var replacementFunc = GetReplacementFunc(currentNode, semanticModel); + if (replacementFunc == null) + continue; + + document = document.WithSyntaxRoot(replacementFunc(root)); + } + + var updatedRoot = await document.GetRequiredSyntaxRootAsync(cancellationToken).ConfigureAwait(false); + editor.ReplaceNode(editor.OriginalRoot, updatedRoot); + } } } From 76f727825025266429afb32d7a287b2a15bdbc59 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Wed, 15 Jun 2022 09:55:54 -0700 Subject: [PATCH 24/25] Add dev17.4 to publishing config --- eng/config/PublishData.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/eng/config/PublishData.json b/eng/config/PublishData.json index 3ffdb1eea7b49..6cf86c7c3f10c 100644 --- a/eng/config/PublishData.json +++ b/eng/config/PublishData.json @@ -143,6 +143,16 @@ "vsMajorVersion": 17, "insertionCreateDraftPR": true, "insertionTitlePrefix": "[d17.3p3]" + }, + "release/dev17.4-vs-deps": { + "nugetKind": [ + "Shipping", + "NonShipping" + ], + "vsBranch": "main", + "vsMajorVersion": 17, + "insertionCreateDraftPR": true, + "insertionTitlePrefix": "[d17.4p1]" } } } From 04398cbce098f2067acdd18a44ccf6cb3728b138 Mon Sep 17 00:00:00 2001 From: Julien Couvreur Date: Wed, 15 Jun 2022 10:01:58 -0700 Subject: [PATCH 25/25] Let VS fix Compilers.sln (#61886) --- Compilers.sln | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Compilers.sln b/Compilers.sln index 0a19a8b853aee..c27f64deec044 100644 --- a/Compilers.sln +++ b/Compilers.sln @@ -169,8 +169,8 @@ Global src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CSharpCompilerExtensions.projitems*{21b239d0-d144-430f-a394-c066d58ee267}*SharedItemsImports = 5 src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CSharpWorkspaceExtensions.projitems*{21b239d0-d144-430f-a394-c066d58ee267}*SharedItemsImports = 5 src\Compilers\VisualBasic\BasicAnalyzerDriver\BasicAnalyzerDriver.projitems*{2523d0e6-df32-4a3e-8ae0-a19bffae2ef6}*SharedItemsImports = 5 - src\Compilers\VisualBasic\CommandLine\VbcCommandLine.projitems*{48c93f90-8776-4847-96d8-127b896d6c80}*SharedItemsImports = 5 - src\Compilers\CSharp\CommandLine\CscCommandLine.projitems*{4b45ca0c-03a0-400f-b454-3d4bcb16af38}*SharedItemsImports = 5 + src\Compilers\VisualBasic\vbc\VbcCommandLine.projitems*{48c93f90-8776-4847-96d8-127b896d6c80}*SharedItemsImports = 5 + src\Compilers\CSharp\csc\CscCommandLine.projitems*{4b45ca0c-03a0-400f-b454-3d4bcb16af38}*SharedItemsImports = 5 src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpAnalyzerDriver.projitems*{54e08bf5-f819-404f-a18d-0ab9ea81ea04}*SharedItemsImports = 13 src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\VisualBasicCompilerExtensions.projitems*{57ca988d-f010-4bf2-9a2e-07d6dcd2ff2c}*SharedItemsImports = 5 src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\VisualBasicWorkspaceExtensions.projitems*{57ca988d-f010-4bf2-9a2e-07d6dcd2ff2c}*SharedItemsImports = 5 @@ -178,14 +178,14 @@ Global src\Dependencies\PooledObjects\Microsoft.CodeAnalysis.PooledObjects.projitems*{5f8d2414-064a-4b3a-9b42-8e2a04246be5}*SharedItemsImports = 5 src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CompilerExtensions.projitems*{5f8d2414-064a-4b3a-9b42-8e2a04246be5}*SharedItemsImports = 5 src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\WorkspaceExtensions.projitems*{5f8d2414-064a-4b3a-9b42-8e2a04246be5}*SharedItemsImports = 5 - src\Compilers\Server\CommandLine\VBCSCompilerCommandLine.projitems*{869e3b79-4e91-45fd-ba37-56dbd2f34721}*SharedItemsImports = 5 - src\Compilers\Server\CommandLine\VBCSCompilerCommandLine.projitems*{9508f118-f62e-4c16-a6f4-7c3b56e166ad}*SharedItemsImports = 5 + src\Compilers\Server\VBCSCompiler\VBCSCompilerCommandLine.projitems*{869e3b79-4e91-45fd-ba37-56dbd2f34721}*SharedItemsImports = 5 + src\Compilers\Server\VBCSCompiler\VBCSCompilerCommandLine.projitems*{9508f118-f62e-4c16-a6f4-7c3b56e166ad}*SharedItemsImports = 5 src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpAnalyzerDriver.projitems*{b501a547-c911-4a05-ac6e-274a50dff30e}*SharedItemsImports = 5 - src\Compilers\CSharp\CommandLine\CscCommandLine.projitems*{b5a27411-77ff-4c43-b0e3-fe09fba5f887}*SharedItemsImports = 5 + src\Compilers\CSharp\csc\CscCommandLine.projitems*{b5a27411-77ff-4c43-b0e3-fe09fba5f887}*SharedItemsImports = 5 src\Dependencies\PooledObjects\Microsoft.CodeAnalysis.PooledObjects.projitems*{c1930979-c824-496b-a630-70f5369a636f}*SharedItemsImports = 13 src\Compilers\Core\AnalyzerDriver\AnalyzerDriver.projitems*{d0bc9be7-24f6-40ca-8dc6-fcb93bd44b34}*SharedItemsImports = 13 src\Dependencies\CodeAnalysis.Debugging\Microsoft.CodeAnalysis.Debugging.projitems*{d73adf7d-2c1c-42ae-b2ab-edc9497e4b71}*SharedItemsImports = 13 - src\Compilers\VisualBasic\CommandLine\VbcCommandLine.projitems*{e58ee9d7-1239-4961-a0c1-f9ec3952c4c1}*SharedItemsImports = 5 + src\Compilers\VisualBasic\vbc\VbcCommandLine.projitems*{e58ee9d7-1239-4961-a0c1-f9ec3952c4c1}*SharedItemsImports = 5 src\Compilers\VisualBasic\BasicAnalyzerDriver\BasicAnalyzerDriver.projitems*{e8f0baa5-7327-43d1-9a51-644e81ae55f1}*SharedItemsImports = 13 src\Dependencies\Collections\Microsoft.CodeAnalysis.Collections.projitems*{e919dd77-34f8-4f57-8058-4d3ff4c2b241}*SharedItemsImports = 13 EndGlobalSection