From 259b2c3d40c4413cc3913f57ac74e6c1beda268f Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Mon, 7 Jul 2025 22:45:24 -0500 Subject: [PATCH 01/11] Update DockerRegistryManager.cs --- .../DockerRegistryManager.cs | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs b/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs index 53954b10427b..e90f3f713a22 100644 --- a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs +++ b/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs @@ -20,11 +20,31 @@ public class DockerRegistryManager public const string FullyQualifiedBaseImageAspNet = $"{BaseImageSource}/{AspNetBaseImage}:{Net8PreviewImageTag}"; private static string? s_registryContainerId; - public static void StartAndPopulateDockerRegistry(ITestOutputHelper testOutput) + private static string SDK_AzureContainerRegistryImage => "dotnetdhmirror-f8bzbjakh8cga6ab.azurecr.io/registry:2"; + private static string Docker_HubRegistryImage => "docker.io/library/registry:2"; + + // TODO: some logic to pivot between this and Docker Hub + private static string RegistryImageToUse => SDK_AzureContainerRegistryImage; + + internal class SameArchManifestPicker : IManifestPicker + { + public PlatformSpecificManifest? PickBestManifestForRid(IReadOnlyDictionary manifestList, string runtimeIdentifier) + { + return manifestList.Values.SingleOrDefault(m => m.platform.os == "linux" && m.platform.architecture == "amd64"); + } + + public PlatformSpecificOciManifest? PickBestManifestForRid(IReadOnlyDictionary manifestList, string runtimeIdentifier) + { + return manifestList.Values.SingleOrDefault(m => m.platform.os == "linux" && m.platform.architecture == "amd64"); + } + } + + public static async Task StartAndPopulateDockerRegistry(ITestOutputHelper testOutput) { using TestLoggerFactory loggerFactory = new(testOutput); - if (!new DockerCli(loggerFactory).IsAvailable()) { + if (!new DockerCli(loggerFactory).IsAvailable()) + { throw new InvalidOperationException("Docker is not available, tests cannot run"); } @@ -40,7 +60,7 @@ public static void StartAndPopulateDockerRegistry(ITestOutputHelper testOutput) { logger.LogInformation("Spawning local registry at '{registry}', attempt #{attempt}.", LocalRegistry, spawnRegistryAttempt); - CommandResult processResult = ContainerCli.RunCommand(testOutput, "--rm", "--publish", "5010:5000", "--detach", "docker.io/library/registry:2").Execute(); + CommandResult processResult = ContainerCli.RunCommand(testOutput, "--rm", "--publish", "5010:5000", "--detach", RegistryImageToUse).Execute(); processResult.Should().Pass().And.HaveStdOut(); @@ -59,7 +79,7 @@ public static void StartAndPopulateDockerRegistry(ITestOutputHelper testOutput) .Execute() .Should().Pass(); - logger.LogInformation("Tagging image '{sourceRepo}/{sourceImage}:{sourceTag}' as '{targetRepo}/{targetImage}:{targetTag}'.",BaseImageSource, RuntimeBaseImage, tag, LocalRegistry, RuntimeBaseImage, tag); + logger.LogInformation("Tagging image '{sourceRepo}/{sourceImage}:{sourceTag}' as '{targetRepo}/{targetImage}:{targetTag}'.", BaseImageSource, RuntimeBaseImage, tag, LocalRegistry, RuntimeBaseImage, tag); ContainerCli.TagCommand(testOutput, $"{BaseImageSource}/{RuntimeBaseImage}:{tag}", $"{LocalRegistry}/{RuntimeBaseImage}:{tag}") .Execute() .Should().Pass(); @@ -84,7 +104,7 @@ public static void StartAndPopulateDockerRegistry(ITestOutputHelper testOutput) { ContainerCli.StopCommand(testOutput, s_registryContainerId).Execute(); } - catch(Exception ex2) + catch (Exception ex2) { logger.LogError(ex2, "Failed to stop the registry {id}.", s_registryContainerId); } From acb7df6756d6ea1d304cc0e9ec78c45593c9598d Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Tue, 8 Jul 2025 10:54:54 -0700 Subject: [PATCH 02/11] Fix Containers Issue in 8.0.1xx Co-authored-by: Chet Husk --- .../DockerRegistryManager.cs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs b/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs index e90f3f713a22..bceb7393c5bd 100644 --- a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs +++ b/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs @@ -26,18 +26,6 @@ public class DockerRegistryManager // TODO: some logic to pivot between this and Docker Hub private static string RegistryImageToUse => SDK_AzureContainerRegistryImage; - internal class SameArchManifestPicker : IManifestPicker - { - public PlatformSpecificManifest? PickBestManifestForRid(IReadOnlyDictionary manifestList, string runtimeIdentifier) - { - return manifestList.Values.SingleOrDefault(m => m.platform.os == "linux" && m.platform.architecture == "amd64"); - } - - public PlatformSpecificOciManifest? PickBestManifestForRid(IReadOnlyDictionary manifestList, string runtimeIdentifier) - { - return manifestList.Values.SingleOrDefault(m => m.platform.os == "linux" && m.platform.architecture == "amd64"); - } - } public static async Task StartAndPopulateDockerRegistry(ITestOutputHelper testOutput) { From f51809514b3a7abf1946a2e79f4c3914d219ca18 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Mon, 13 Oct 2025 16:35:05 -0700 Subject: [PATCH 03/11] Change StartAndPopulateDockerRegistry to synchronous --- .../DockerRegistryManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs b/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs index bceb7393c5bd..01126a292aa8 100644 --- a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs +++ b/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs @@ -27,7 +27,7 @@ public class DockerRegistryManager private static string RegistryImageToUse => SDK_AzureContainerRegistryImage; - public static async Task StartAndPopulateDockerRegistry(ITestOutputHelper testOutput) + public static void StartAndPopulateDockerRegistry(ITestOutputHelper testOutput) { using TestLoggerFactory loggerFactory = new(testOutput); From c61ffa9b0f08d18f4d409488620fd84595d1dd30 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 21 Oct 2025 03:27:23 +0000 Subject: [PATCH 04/11] Update dependencies from https://github.com/dotnet/templating build 20251020.1 On relative base path root Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Mocks From Version 8.0.122-servicing.25515.8 -> To Version 8.0.122-servicing.25520.1 Microsoft.TemplateEngine.Abstractions From Version 8.0.122 -> To Version 8.0.122 --- NuGet.config | 10 +--------- eng/Version.Details.xml | 10 +++++----- eng/Versions.props | 2 +- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/NuGet.config b/NuGet.config index 74cee579a3e6..483025130ecf 100644 --- a/NuGet.config +++ b/NuGet.config @@ -3,7 +3,6 @@ - @@ -13,21 +12,17 @@ - - - - + - @@ -52,7 +47,6 @@ - @@ -60,10 +54,8 @@ - - diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0c12144b4dcf..7f040280b0a5 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,15 +3,15 @@ https://github.com/dotnet/templating - 56b6fd07951fa6733694ed06accb8da0722f4c19 + cea273163ea07402a1702ace8e5ab1fac3ec805a - + https://github.com/dotnet/templating - 56b6fd07951fa6733694ed06accb8da0722f4c19 + cea273163ea07402a1702ace8e5ab1fac3ec805a - + https://github.com/dotnet/templating - 56b6fd07951fa6733694ed06accb8da0722f4c19 + cea273163ea07402a1702ace8e5ab1fac3ec805a diff --git a/eng/Versions.props b/eng/Versions.props index 2454dcbef004..cf3cc2003734 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -148,7 +148,7 @@ $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - 8.0.122-servicing.25515.8 + 8.0.122-servicing.25520.1 $(MicrosoftTemplateEngineMocksPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineMocksPackageVersion) From 0d2482d4faed7b5ae02698d87085f1e83f6bc1e8 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 23 Oct 2025 02:03:20 +0000 Subject: [PATCH 05/11] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20251022.3 On relative base path root Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 8.0.0-alpha.1.25520.5 -> To Version 8.0.0-alpha.1.25522.3 --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e2348201c525..abc47c4bf2b7 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -354,9 +354,9 @@ 16bcad1c13be082bd52ce178896d1119a73081a9 - + https://github.com/dotnet/source-build-reference-packages - 4f39ba9e117ece1679a2bd4f2e8c188f914078e1 + 449148366d9105de8a6470ebc4ba198926e9a30a From 85f11839d85214ab4563f036c52dc95db37fab16 Mon Sep 17 00:00:00 2001 From: Sean Reeser Date: Tue, 4 Nov 2025 10:25:03 -0800 Subject: [PATCH 06/11] Update branding to 8.0.123 --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index cf3cc2003734..f18086f2a685 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -11,7 +11,7 @@ - 8.0.122 + 8.0.123 true release From 6b2462df1d8dbb1db687eda569265ffbaaac2684 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 7 Nov 2025 02:03:34 +0000 Subject: [PATCH 07/11] Update dependencies from https://github.com/dotnet/arcade build 20251105.2 On relative base path root Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XUnitExtensions From Version 8.0.0-beta.25515.1 -> To Version 8.0.0-beta.25555.2 --- eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 4 ++-- .../job/publish-build-assets.yml | 5 +++++ .../templates-official/post-build/post-build.yml | 5 +++++ .../templates/job/publish-build-assets.yml | 5 +++++ eng/common/templates/post-build/post-build.yml | 5 +++++ global.json | 4 ++-- 7 files changed, 32 insertions(+), 12 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index abc47c4bf2b7..5218f2203bd1 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -491,22 +491,22 @@ - + https://github.com/dotnet/arcade - 6544413e02741855b701468aa8afc6cf8ca62c72 + 048a8c0ba5b72234301a3605c424ee9f9ff99772 - + https://github.com/dotnet/arcade - 6544413e02741855b701468aa8afc6cf8ca62c72 + 048a8c0ba5b72234301a3605c424ee9f9ff99772 - + https://github.com/dotnet/arcade - 6544413e02741855b701468aa8afc6cf8ca62c72 + 048a8c0ba5b72234301a3605c424ee9f9ff99772 - + https://github.com/dotnet/arcade - 6544413e02741855b701468aa8afc6cf8ca62c72 + 048a8c0ba5b72234301a3605c424ee9f9ff99772 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index f18086f2a685..ace9cd128f57 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -34,7 +34,7 @@ 7.0.0 4.0.0 7.0.0 - 8.0.0-beta.25515.1 + 8.0.0-beta.25555.2 7.0.0-preview.22423.2 8.0.0 4.3.0 @@ -214,7 +214,7 @@ 6.12.0 6.1.0 - 8.0.0-beta.25515.1 + 8.0.0-beta.25555.2 4.18.4 1.3.2 8.0.0-beta.23607.1 diff --git a/eng/common/templates-official/job/publish-build-assets.yml b/eng/common/templates-official/job/publish-build-assets.yml index a99d79df863c..53109246d948 100644 --- a/eng/common/templates-official/job/publish-build-assets.yml +++ b/eng/common/templates-official/job/publish-build-assets.yml @@ -152,6 +152,11 @@ jobs: BARBuildId: ${{ parameters.BARBuildId }} PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + # Darc is targeting 8.0, so make sure it's installed + - task: UseDotNet@2 + inputs: + version: 8.0.x + - task: AzureCLI@2 displayName: Publish Using Darc inputs: diff --git a/eng/common/templates-official/post-build/post-build.yml b/eng/common/templates-official/post-build/post-build.yml index 817e2d80dea1..07837055ee30 100644 --- a/eng/common/templates-official/post-build/post-build.yml +++ b/eng/common/templates-official/post-build/post-build.yml @@ -271,6 +271,11 @@ stages: - task: NuGetAuthenticate@1 + # Darc is targeting 8.0, so make sure it's installed + - task: UseDotNet@2 + inputs: + version: 8.0.x + - task: AzureCLI@2 displayName: Publish Using Darc inputs: diff --git a/eng/common/templates/job/publish-build-assets.yml b/eng/common/templates/job/publish-build-assets.yml index 1fcdcc9adc34..b4ece772c326 100644 --- a/eng/common/templates/job/publish-build-assets.yml +++ b/eng/common/templates/job/publish-build-assets.yml @@ -148,6 +148,11 @@ jobs: BARBuildId: ${{ parameters.BARBuildId }} PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + # Darc is targeting 8.0, so make sure it's installed + - task: UseDotNet@2 + inputs: + version: 8.0.x + - task: AzureCLI@2 displayName: Publish Using Darc inputs: diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index ea1785a8aa26..96ca06882384 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -267,6 +267,11 @@ stages: - task: NuGetAuthenticate@1 + # Darc is targeting 8.0, so make sure it's installed + - task: UseDotNet@2 + inputs: + version: 8.0.x + - task: AzureCLI@2 displayName: Publish Using Darc inputs: diff --git a/global.json b/global.json index f0acd9807f7f..01df768ddc8c 100644 --- a/global.json +++ b/global.json @@ -14,7 +14,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.25515.1", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.25515.1" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.25555.2", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.25555.2" } } From 03e67e561803f9b902c655ed3824c74599b9cbdb Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 7 Nov 2025 11:22:09 +0000 Subject: [PATCH 08/11] Update dependencies from https://github.com/dotnet/templating build 20251107.4 On relative base path root Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Mocks From Version 8.0.122-servicing.25520.1 -> To Version 8.0.123-servicing.25557.4 Microsoft.TemplateEngine.Abstractions From Version 8.0.122 -> To Version 8.0.123 --- NuGet.config | 2 +- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/NuGet.config b/NuGet.config index 483025130ecf..7fe14e207f02 100644 --- a/NuGet.config +++ b/NuGet.config @@ -20,7 +20,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index abc47c4bf2b7..6c9a2aaf32ac 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,17 +1,17 @@ - + https://github.com/dotnet/templating - cea273163ea07402a1702ace8e5ab1fac3ec805a + 2a3d0e60b37359c350cc045fecdadb0c7b652591 - + https://github.com/dotnet/templating - cea273163ea07402a1702ace8e5ab1fac3ec805a + 2a3d0e60b37359c350cc045fecdadb0c7b652591 - + https://github.com/dotnet/templating - cea273163ea07402a1702ace8e5ab1fac3ec805a + 2a3d0e60b37359c350cc045fecdadb0c7b652591 diff --git a/eng/Versions.props b/eng/Versions.props index f18086f2a685..ccc2415813e1 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -142,13 +142,13 @@ - 8.0.122 + 8.0.123 $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - 8.0.122-servicing.25520.1 + 8.0.123-servicing.25557.4 $(MicrosoftTemplateEngineMocksPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineMocksPackageVersion) From 6681bfdb92abeb2725b1ac1fa0ab016a12f2a48f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 7 Nov 2025 23:05:31 +0000 Subject: [PATCH 09/11] Initial plan From a4a2cac72066889dfd488872e29da24312db8971 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 7 Nov 2025 23:14:32 +0000 Subject: [PATCH 10/11] Backport PR #51558: Fix VS2022 rejecting preview SDKs Co-authored-by: nagilson <23152278+nagilson@users.noreply.github.com> --- build/RunTestsOnHelix.cmd | 3 ++ eng/common/tools.ps1 | 14 ++++++--- eng/enable-preview-sdks.ps1 | 59 +++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 eng/enable-preview-sdks.ps1 diff --git a/build/RunTestsOnHelix.cmd b/build/RunTestsOnHelix.cmd index c414a43205f3..d1b051e42001 100644 --- a/build/RunTestsOnHelix.cmd +++ b/build/RunTestsOnHelix.cmd @@ -10,6 +10,9 @@ set PATH=%DOTNET_ROOT%;%PATH% set DOTNET_MULTILEVEL_LOOKUP=0 set TestFullMSBuild=%1 +REM Ensure Visual Studio instances allow preview SDKs +PowerShell -ExecutionPolicy ByPass -NoProfile -File "%HELIX_CORRELATION_PAYLOAD%\t\eng\enable-preview-sdks.ps1" + set TestExecutionDirectory=%CD%\testExecutionDirectory mkdir %TestExecutionDirectory% diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index bb048ad125a8..0213bf2c40f9 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -296,7 +296,7 @@ function InstallDotNet([string] $dotnetRoot, if ($runtime -eq "aspnetcore") { $runtimePath = $runtimePath + "\Microsoft.AspNetCore.App" } if ($runtime -eq "windowsdesktop") { $runtimePath = $runtimePath + "\Microsoft.WindowsDesktop.App" } $runtimePath = $runtimePath + "\" + $version - + $dotnetVersionLabel = "runtime toolset '$runtime/$architecture v$version'" if (Test-Path $runtimePath) { @@ -545,19 +545,25 @@ function LocateVisualStudio([object]$vsRequirements = $null){ }) } - if (!$vsRequirements) { $vsRequirements = $GlobalJson.tools.vs } + if (!$vsRequirements) { + if (Get-Member -InputObject $GlobalJson.tools -Name 'vs' -ErrorAction SilentlyContinue) { + $vsRequirements = $GlobalJson.tools.vs + } else { + $vsRequirements = $null + } + } $args = @('-latest', '-format', 'json', '-requires', 'Microsoft.Component.MSBuild', '-products', '*') if (!$excludePrereleaseVS) { $args += '-prerelease' } - if (Get-Member -InputObject $vsRequirements -Name 'version') { + if ($vsRequirements -and (Get-Member -InputObject $vsRequirements -Name 'version' -ErrorAction SilentlyContinue)) { $args += '-version' $args += $vsRequirements.version } - if (Get-Member -InputObject $vsRequirements -Name 'components') { + if ($vsRequirements -and (Get-Member -InputObject $vsRequirements -Name 'components' -ErrorAction SilentlyContinue)) { foreach ($component in $vsRequirements.components) { $args += '-requires' $args += $component diff --git a/eng/enable-preview-sdks.ps1 b/eng/enable-preview-sdks.ps1 new file mode 100644 index 000000000000..d21466f856da --- /dev/null +++ b/eng/enable-preview-sdks.ps1 @@ -0,0 +1,59 @@ +param() + +. $PSScriptRoot\common\tools.ps1 + +try { + $vsInfo = LocateVisualStudio +} +catch { + Write-Host "LocateVisualStudio failed: $_" + return +} + +if ($null -eq $vsInfo) { + Write-Host "No Visual Studio instance detected; preview SDKs remain enabled by default." + return +} + +$vsId = $vsInfo.instanceId +$vsMajorVersion = $vsInfo.installationVersion.Split('.')[0] +$instanceDir = Join-Path $env:USERPROFILE "AppData\Local\Microsoft\VisualStudio\$vsMajorVersion.0_$vsId" + +Create-Directory $instanceDir + +$sdkFile = Join-Path $instanceDir 'sdk.txt' + +$desiredLine = 'UsePreviews=True' +$existingLines = @() + +if (Test-Path $sdkFile) { + $existingLines = @(Get-Content -Path $sdkFile -Encoding ASCII) +} + +# Determine how to place the UsePreviews flag based on existing content. +$replacementIndex = -1 +for ($i = 0; $i -lt $existingLines.Count; $i++) { + if ($existingLines[$i] -match '^UsePreviews=.*$') { + $replacementIndex = $i + break + } +} + +# Replace the existing line to enforce it as True +if ($replacementIndex -ge 0) { + $updatedLines = $existingLines + $updatedLines[$replacementIndex] = $desiredLine +} +elseif ($existingLines.Count -gt 0) { + # Write to the top of the file but keep the remaining portion (assumption: order does not matter to VS) + $updatedLines = @($desiredLine) + $existingLines +} +else { + # Write a whole new file + $updatedLines = @($desiredLine) +} + +Set-Content -Path $sdkFile -Value $updatedLines -Encoding ASCII + +Write-Host "Updated $sdkFile" +Get-Content -Path $sdkFile | ForEach-Object { Write-Host " $_" } From efd08c1ef40541c40c877d1cb1ace65b36dbe403 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 10 Nov 2025 11:46:52 +0000 Subject: [PATCH 11/11] Update dependencies from https://github.com/dotnet/msbuild build 20251110.7 On relative base path root Microsoft.SourceBuild.Intermediate.msbuild , Microsoft.Build.Localization From Version 17.8.43-servicing-25517-04 -> To Version 17.8.45-servicing-25560-07 Microsoft.Build From Version 17.8.43 -> To Version 17.8.45 --- NuGet.config | 1 + eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/NuGet.config b/NuGet.config index 7fe14e207f02..f6cecc32fe19 100644 --- a/NuGet.config +++ b/NuGet.config @@ -14,6 +14,7 @@ + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9117020ced94..79e497f2802f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -55,17 +55,17 @@ https://github.com/dotnet/emsdk 42532a7524749ad5d48d1820eaa7d4ab7e77faa6 - + https://github.com/dotnet/msbuild - 6be7d7558719130df3de51b2ab8ce13e21e99a3b + 2a7a854c1b8dd412669c2c114ff18c9fa412ace7 - + https://github.com/dotnet/msbuild - 6be7d7558719130df3de51b2ab8ce13e21e99a3b + 2a7a854c1b8dd412669c2c114ff18c9fa412ace7 - + https://github.com/dotnet/msbuild - 6be7d7558719130df3de51b2ab8ce13e21e99a3b + 2a7a854c1b8dd412669c2c114ff18c9fa412ace7 diff --git a/eng/Versions.props b/eng/Versions.props index 7b78ffc659ee..977aa3b25d3e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -123,7 +123,7 @@ - 17.8.43 + 17.8.45 $(MicrosoftBuildPackageVersion) $(MicrosoftBuildPackageVersion) $(MicrosoftBuildPackageVersion) - 17.8.43-servicing-25517-04 + 17.8.45-servicing-25560-07 $(MicrosoftBuildPackageVersion) $(MicrosoftBuildPackageVersion) $(MicrosoftBuildTasksCorePackageVersion)