From b0af900150cd77ebb1acabb3560ac2ed912e8008 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 31 May 2025 02:02:23 +0000 Subject: [PATCH 01/18] Update dependencies from https://github.com/dotnet/arcade build 20250529.3 Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.25271.2 -> To Version 10.0.0-beta.25279.3 --- eng/Version.Details.xml | 4 +- eng/common/build.ps1 | 3 ++ eng/common/build.sh | 14 ++++-- .../job/publish-build-assets.yml | 49 ++++++++++++++++--- eng/common/tools.ps1 | 9 ++-- eng/common/tools.sh | 11 ++--- eng/common/vmr-sync.ps1 | 6 +-- eng/common/vmr-sync.sh | 6 ++- global.json | 6 +-- 9 files changed, 76 insertions(+), 32 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 35da69f5a62..a10f5a720e7 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -35,9 +35,9 @@ - + https://github.com/dotnet/arcade - 12d3a9f5d6138e22270694574e73e4c58a815795 + 69b86684b43321e96f35fa3ea34c5315836ff858 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/common/build.ps1 b/eng/common/build.ps1 index ae2309e312d..8cfee107e7a 100644 --- a/eng/common/build.ps1 +++ b/eng/common/build.ps1 @@ -21,6 +21,7 @@ Param( [switch] $publish, [switch] $clean, [switch][Alias('pb')]$productBuild, + [switch]$fromVMR, [switch][Alias('bl')]$binaryLog, [switch][Alias('nobl')]$excludeCIBinarylog, [switch] $ci, @@ -74,6 +75,7 @@ function Print-Usage() { Write-Host " -nativeToolsOnMachine Sets the native tools on machine environment variable (indicating that the script should use native tools on machine)" Write-Host " -nodeReuse Sets nodereuse msbuild parameter ('true' or 'false')" Write-Host " -buildCheck Sets /check msbuild parameter" + Write-Host " -fromVMR Set when building from within the VMR" Write-Host "" Write-Host "Command line arguments not listed above are passed thru to msbuild." @@ -128,6 +130,7 @@ function Build { /p:Test=$test ` /p:Pack=$pack ` /p:DotNetBuild=$productBuild ` + /p:DotNetBuildFromVMR=$fromVMR ` /p:IntegrationTest=$integrationTest ` /p:PerformanceTest=$performanceTest ` /p:Sign=$sign ` diff --git a/eng/common/build.sh b/eng/common/build.sh index da906da2026..9767bb411a4 100755 --- a/eng/common/build.sh +++ b/eng/common/build.sh @@ -43,6 +43,7 @@ usage() echo " --nodeReuse Sets nodereuse msbuild parameter ('true' or 'false')" echo " --warnAsError Sets warnaserror msbuild parameter ('true' or 'false')" echo " --buildCheck Sets /check msbuild parameter" + echo " --fromVMR Set when building from within the VMR" echo "" echo "Command line arguments not listed above are passed thru to msbuild." echo "Arguments can also be passed in with a single hyphen." @@ -64,6 +65,7 @@ restore=false build=false source_build=false product_build=false +from_vmr=false rebuild=false test=false integration_test=false @@ -89,7 +91,7 @@ verbosity='minimal' runtime_source_feed='' runtime_source_feed_key='' -properties='' +properties=() while [[ $# > 0 ]]; do opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")" case "$opt" in @@ -142,6 +144,9 @@ while [[ $# > 0 ]]; do restore=true pack=true ;; + -fromvmr|-from-vmr) + from_vmr=true + ;; -test|-t) test=true ;; @@ -187,7 +192,7 @@ while [[ $# > 0 ]]; do shift ;; *) - properties="$properties $1" + properties+=("$1") ;; esac @@ -221,7 +226,7 @@ function Build { InitializeCustomToolset if [[ ! -z "$projects" ]]; then - properties="$properties /p:Projects=$projects" + properties+=("/p:Projects=$projects") fi local bl="" @@ -243,6 +248,7 @@ function Build { /p:Build=$build \ /p:DotNetBuild=$product_build \ /p:DotNetBuildSourceOnly=$source_build \ + /p:DotNetBuildFromVMR=$from_vmr \ /p:Rebuild=$rebuild \ /p:Test=$test \ /p:Pack=$pack \ @@ -251,7 +257,7 @@ function Build { /p:Sign=$sign \ /p:Publish=$publish \ /p:RestoreStaticGraphEnableBinaryLogger=$binary_log \ - $properties + ${properties[@]+"${properties[@]}"} ExitWithExitCode 0 } diff --git a/eng/common/core-templates/job/publish-build-assets.yml b/eng/common/core-templates/job/publish-build-assets.yml index 4f1dc42e02c..d5303229c97 100644 --- a/eng/common/core-templates/job/publish-build-assets.yml +++ b/eng/common/core-templates/job/publish-build-assets.yml @@ -32,6 +32,12 @@ parameters: # Optional: 🌤️ or not the build has assets it wants to publish to BAR isAssetlessBuild: false + # Optional, publishing version + publishingVersion: 3 + + # Optional: A minimatch pattern for the asset manifests to publish to BAR + assetManifestsPattern: '*/manifests/**/*.xml' + jobs: - job: Asset_Registry_Publish @@ -77,13 +83,31 @@ jobs: clean: true - ${{ if eq(parameters.isAssetlessBuild, 'false') }}: - - task: DownloadPipelineArtifact@2 - displayName: Download Asset Manifests - inputs: - artifactName: AssetManifests - targetPath: '$(Build.StagingDirectory)/AssetManifests' - condition: ${{ parameters.condition }} - continueOnError: ${{ parameters.continueOnError }} + - ${{ if eq(parameters.publishingVersion, 3) }}: + - task: DownloadPipelineArtifact@2 + displayName: Download Asset Manifests + inputs: + artifactName: AssetManifests + targetPath: '$(Build.StagingDirectory)/AssetManifests' + condition: ${{ parameters.condition }} + continueOnError: ${{ parameters.continueOnError }} + - ${{ if eq(parameters.publishingVersion, 4) }}: + - task: DownloadPipelineArtifact@2 + displayName: Download V4 asset manifests + inputs: + itemPattern: '*/manifests/**/*.xml' + targetPath: '$(Build.StagingDirectory)/AllAssetManifests' + condition: ${{ parameters.condition }} + continueOnError: ${{ parameters.continueOnError }} + - task: CopyFiles@2 + displayName: Copy V4 asset manifests to AssetManifests + inputs: + SourceFolder: '$(Build.StagingDirectory)/AllAssetManifests' + Contents: ${{ parameters.assetManifestsPattern }} + TargetFolder: '$(Build.StagingDirectory)/AssetManifests' + flattenFolders: true + condition: ${{ parameters.condition }} + continueOnError: ${{ parameters.continueOnError }} - task: NuGetAuthenticate@1 @@ -120,6 +144,17 @@ jobs: Copy-Item -Path $symbolExclusionfile -Destination "$(Build.StagingDirectory)/ReleaseConfigs" } + - ${{ if eq(parameters.publishingVersion, 4) }}: + - template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + args: + targetPath: '$(Build.ArtifactStagingDirectory)/MergedManifest.xml' + artifactName: AssetManifests + displayName: 'Publish Merged Manifest' + retryCountOnTaskFailure: 10 # for any logs being locked + sbomEnabled: false # we don't need SBOM for logs + - template: /eng/common/core-templates/steps/publish-build-artifacts.yml parameters: is1ESPipeline: ${{ parameters.is1ESPipeline }} diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 5f40a3f8238..c9e39595b58 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -65,8 +65,8 @@ $ErrorActionPreference = 'Stop' # Base-64 encoded SAS token that has permission to storage container described by $runtimeSourceFeed [string]$runtimeSourceFeedKey = if (Test-Path variable:runtimeSourceFeedKey) { $runtimeSourceFeedKey } else { $null } -# True if the build is a product build -[bool]$productBuild = if (Test-Path variable:productBuild) { $productBuild } else { $false } +# True when the build is running within the VMR. +[bool]$fromVMR = if (Test-Path variable:fromVMR) { $fromVMR } else { $false } function Create-Directory ([string[]] $path) { New-Item -Path $path -Force -ItemType 'Directory' | Out-Null @@ -644,7 +644,6 @@ function GetNuGetPackageCachePath() { $env:NUGET_PACKAGES = Join-Path $env:UserProfile '.nuget\packages\' } else { $env:NUGET_PACKAGES = Join-Path $RepoRoot '.packages\' - $env:RESTORENOHTTPCACHE = $true } } @@ -850,8 +849,8 @@ function MSBuild-Core() { } # When running on Azure Pipelines, override the returned exit code to avoid double logging. - # Skip this when the build is a child of the VMR orchestrator build. - if ($ci -and $env:SYSTEM_TEAMPROJECT -ne $null -and !$productBuild) { + # Skip this when the build is a child of the VMR build. + if ($ci -and $env:SYSTEM_TEAMPROJECT -ne $null -and !$fromVMR) { Write-PipelineSetResult -Result "Failed" -Message "msbuild execution failed." # Exiting with an exit code causes the azure pipelines task to log yet another "noise" error # The above Write-PipelineSetResult will cause the task to be marked as failure without adding yet another error diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 25f5932eee9..a7e84931510 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -72,8 +72,8 @@ fi runtime_source_feed=${runtime_source_feed:-''} runtime_source_feed_key=${runtime_source_feed_key:-''} -# True if the build is a product build -product_build=${product_build:-false} +# True when the build is running within the VMR. +from_vmr=${from_vmr:-false} # Resolve any symlinks in the given path. function ResolvePath { @@ -345,14 +345,12 @@ function InitializeBuildTool { _InitializeBuildToolCommand="msbuild" } -# Set RestoreNoHttpCache as a workaround for https://github.com/NuGet/Home/issues/3116 function GetNuGetPackageCachePath { if [[ -z ${NUGET_PACKAGES:-} ]]; then if [[ "$use_global_nuget_cache" == true ]]; then export NUGET_PACKAGES="$HOME/.nuget/packages/" else export NUGET_PACKAGES="$repo_root/.packages/" - export RESTORENOHTTPCACHE=true fi fi @@ -506,8 +504,8 @@ function MSBuild-Core { echo "Build failed with exit code $exit_code. Check errors above." # When running on Azure Pipelines, override the returned exit code to avoid double logging. - # Skip this when the build is a child of the VMR orchestrator build. - if [[ "$ci" == true && -n ${SYSTEM_TEAMPROJECT:-} && "$product_build" != true ]]; then + # Skip this when the build is a child of the VMR build. + if [[ "$ci" == true && -n ${SYSTEM_TEAMPROJECT:-} && "$from_vmr" != true ]]; then Write-PipelineSetResult -result "Failed" -message "msbuild execution failed." # Exiting with an exit code causes the azure pipelines task to log yet another "noise" error # The above Write-PipelineSetResult will cause the task to be marked as failure without adding yet another error @@ -530,6 +528,7 @@ function GetDarc { fi "$eng_root/common/darc-init.sh" --toolpath "$darc_path" $version + darc_tool="$darc_path/darc" } # Returns a full path to an Arcade SDK task project file. diff --git a/eng/common/vmr-sync.ps1 b/eng/common/vmr-sync.ps1 index 8c3c91ce8de..97302f3205b 100644 --- a/eng/common/vmr-sync.ps1 +++ b/eng/common/vmr-sync.ps1 @@ -103,14 +103,14 @@ Set-StrictMode -Version Latest Highlight 'Installing .NET, preparing the tooling..' . .\eng\common\tools.ps1 $dotnetRoot = InitializeDotNetCli -install:$true +$darc = Get-Darc $dotnet = "$dotnetRoot\dotnet.exe" -& "$dotnet" tool restore Highlight "Starting the synchronization of VMR.." # Synchronize the VMR $darcArgs = ( - "darc", "vmr", "forwardflow", + "vmr", "forwardflow", "--tmp", $tmpDir, "--$verbosity", $vmrDir @@ -124,7 +124,7 @@ if ($azdevPat) { $darcArgs += ("--azdev-pat", $azdevPat) } -& "$dotnet" $darcArgs +& "$darc" $darcArgs if ($LASTEXITCODE -eq 0) { Highlight "Synchronization succeeded" diff --git a/eng/common/vmr-sync.sh b/eng/common/vmr-sync.sh index 86d77ccf5b4..44239e331c0 100644 --- a/eng/common/vmr-sync.sh +++ b/eng/common/vmr-sync.sh @@ -164,9 +164,9 @@ set -e highlight 'Installing .NET, preparing the tooling..' source "./eng/common/tools.sh" InitializeDotNetCli true +GetDarc dotnetDir=$( cd ./.dotnet/; pwd -P ) dotnet=$dotnetDir/dotnet -"$dotnet" tool restore highlight "Starting the synchronization of VMR.." set +e @@ -186,7 +186,9 @@ fi # Synchronize the VMR -"$dotnet" darc vmr forwardflow \ +export DOTNET_ROOT="$dotnetDir" + +"$darc_tool" vmr forwardflow \ --tmp "$tmp_dir" \ $azdev_pat \ --$verbosity \ diff --git a/global.json b/global.json index d18020f5c59..6626537eba2 100644 --- a/global.json +++ b/global.json @@ -1,10 +1,10 @@ { "sdk": { - "version": "10.0.100-preview.3.25201.16", + "version": "10.0.100-preview.5.25265.106", "allowPrerelease": true }, "tools": { - "dotnet": "10.0.100-preview.3.25201.16", + "dotnet": "10.0.100-preview.5.25265.106", "vs": { "version": "17.8", "components": [ @@ -17,7 +17,7 @@ "perl": "5.38.2.2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25271.2", + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25279.3", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } From 515a6b2aacdb82a5b31cf73b58da86ed4457eae3 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 3 Jun 2025 02:02:09 +0000 Subject: [PATCH 02/18] Update dependencies from https://github.com/dotnet/arcade build 20250602.1 Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.25271.2 -> To Version 10.0.0-beta.25302.1 --- eng/Version.Details.xml | 4 ++-- global.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a10f5a720e7..7b8ed92945a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -35,9 +35,9 @@ - + https://github.com/dotnet/arcade - 69b86684b43321e96f35fa3ea34c5315836ff858 + 83c8fe20d45264a4d85ad8c83f46ea456948c209 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/global.json b/global.json index 6626537eba2..b6343cf7bba 100644 --- a/global.json +++ b/global.json @@ -17,7 +17,7 @@ "perl": "5.38.2.2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25279.3", + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25302.1", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } From d0f601b9788adb439a2782d06c229237feebd021 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 5 Jun 2025 02:02:19 +0000 Subject: [PATCH 03/18] Update dependencies from https://github.com/dotnet/arcade build 20250604.5 Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.25271.2 -> To Version 10.0.0-beta.25304.5 --- eng/Version.Details.xml | 4 ++-- eng/common/core-templates/job/onelocbuild.yml | 5 ++--- global.json | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 7b8ed92945a..ed94cc1188f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -35,9 +35,9 @@ - + https://github.com/dotnet/arcade - 83c8fe20d45264a4d85ad8c83f46ea456948c209 + d3a9e0bf843815be1a2b30895e2060ef73735772 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/common/core-templates/job/onelocbuild.yml b/eng/common/core-templates/job/onelocbuild.yml index 00feec8ebbc..8034815f421 100644 --- a/eng/common/core-templates/job/onelocbuild.yml +++ b/eng/common/core-templates/job/onelocbuild.yml @@ -86,8 +86,7 @@ jobs: isAutoCompletePrSelected: ${{ parameters.AutoCompletePr }} ${{ if eq(parameters.CreatePr, true) }}: isUseLfLineEndingsSelected: ${{ parameters.UseLfLineEndings }} - ${{ if eq(parameters.RepoType, 'gitHub') }}: - isShouldReusePrSelected: ${{ parameters.ReusePr }} + isShouldReusePrSelected: ${{ parameters.ReusePr }} packageSourceAuth: patAuth patVariable: ${{ parameters.CeapexPat }} ${{ if eq(parameters.RepoType, 'gitHub') }}: @@ -118,4 +117,4 @@ jobs: pathToPublish: '$(Build.SourcesDirectory)/eng/Localize/' publishLocation: Container artifactName: Loc - condition: ${{ parameters.condition }} \ No newline at end of file + condition: ${{ parameters.condition }} diff --git a/global.json b/global.json index b6343cf7bba..3f3549c7f8c 100644 --- a/global.json +++ b/global.json @@ -17,7 +17,7 @@ "perl": "5.38.2.2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25302.1", + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25304.5", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } From 61912dc09341fcac2aaf163e8b0ce2a4f3f88bff Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 6 Jun 2025 02:01:53 +0000 Subject: [PATCH 04/18] Update dependencies from https://github.com/dotnet/arcade build 20250605.3 Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.25271.2 -> To Version 10.0.0-beta.25305.3 --- eng/Version.Details.xml | 4 ++-- global.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ed94cc1188f..a5d29b4b5e4 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -35,9 +35,9 @@ - + https://github.com/dotnet/arcade - d3a9e0bf843815be1a2b30895e2060ef73735772 + aba421eb78276b26d1a24df7772474806b27aa13 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/global.json b/global.json index 3f3549c7f8c..f71df7391e9 100644 --- a/global.json +++ b/global.json @@ -17,7 +17,7 @@ "perl": "5.38.2.2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25304.5", + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25305.3", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } From 155dcb69390ef7edded445b11ca607ebe70a07aa Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 10 Jun 2025 02:02:04 +0000 Subject: [PATCH 05/18] Update dependencies from https://github.com/dotnet/arcade build 20250609.2 Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.25271.2 -> To Version 10.0.0-beta.25309.2 --- eng/Version.Details.xml | 4 ++-- .../core-templates/steps/source-index-stage1-publish.yml | 6 +++--- global.json | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a5d29b4b5e4..dbaa88a1b82 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -35,9 +35,9 @@ - + https://github.com/dotnet/arcade - aba421eb78276b26d1a24df7772474806b27aa13 + add492db56ebc80df604ba5a30723beef14ed3dd https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/common/core-templates/steps/source-index-stage1-publish.yml b/eng/common/core-templates/steps/source-index-stage1-publish.yml index 99c2326fc19..c2917c1efc1 100644 --- a/eng/common/core-templates/steps/source-index-stage1-publish.yml +++ b/eng/common/core-templates/steps/source-index-stage1-publish.yml @@ -1,15 +1,15 @@ parameters: sourceIndexUploadPackageVersion: 2.0.0-20250425.2 - sourceIndexProcessBinlogPackageVersion: 1.0.1-20250425.2 + sourceIndexProcessBinlogPackageVersion: 1.0.1-20250515.1 sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json binlogPath: artifacts/log/Debug/Build.binlog steps: - task: UseDotNet@2 - displayName: "Source Index: Use .NET 8 SDK" + displayName: "Source Index: Use .NET 9 SDK" inputs: packageType: sdk - version: 8.0.x + version: 9.0.x installationPath: $(Agent.TempDirectory)/dotnet workingDirectory: $(Agent.TempDirectory) diff --git a/global.json b/global.json index f71df7391e9..9820f77f826 100644 --- a/global.json +++ b/global.json @@ -1,10 +1,10 @@ { "sdk": { - "version": "10.0.100-preview.5.25265.106", + "version": "10.0.100-preview.6.25302.104", "allowPrerelease": true }, "tools": { - "dotnet": "10.0.100-preview.5.25265.106", + "dotnet": "10.0.100-preview.6.25302.104", "vs": { "version": "17.8", "components": [ @@ -17,7 +17,7 @@ "perl": "5.38.2.2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25305.3", + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25309.2", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } From 57809ccc31239a722270471a53c975e53183d640 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Tue, 10 Jun 2025 14:10:24 +0200 Subject: [PATCH 06/18] Change how .NET is installed for jobs without build script --- azure-pipelines-PR.yml | 72 +++++------------------------------------- 1 file changed, 8 insertions(+), 64 deletions(-) diff --git a/azure-pipelines-PR.yml b/azure-pipelines-PR.yml index 4e7c4394b1b..1e24193c7ae 100644 --- a/azure-pipelines-PR.yml +++ b/azure-pipelines-PR.yml @@ -113,14 +113,7 @@ stages: steps: - checkout: self clean: true - - task: UseDotNet@2 - displayName: install SDK - inputs: - packageType: sdk - useGlobalJson: true - includePreviewVersions: false - workingDirectory: $(Build.SourcesDirectory) - installationPath: $(Build.SourcesDirectory)/.dotnet + - script: .\Build.cmd -skipbuild - script: .\eng\test-determinism.cmd -configuration Debug env: FSHARP_EXPERIMENTAL_FEATURES: $(_experimental_flag) @@ -142,14 +135,7 @@ stages: clean: true - script: dotnet --list-sdks displayName: Report dotnet SDK versions - - task: UseDotNet@2 - displayName: install SDK - inputs: - packageType: sdk - useGlobalJson: true - includePreviewVersions: true - workingDirectory: $(Build.SourcesDirectory) - installationPath: $(Agent.ToolsDirectory)/dotnet + - script: .\Build.cmd -skipbuild - script: dotnet tool restore env: DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 @@ -181,14 +167,7 @@ stages: steps: - checkout: self clean: true - - task: UseDotNet@2 - displayName: install SDK - inputs: - packageType: sdk - useGlobalJson: true - includePreviewVersions: true - workingDirectory: $(Build.SourcesDirectory) - installationPath: $(Agent.ToolsDirectory)/dotnet + - script: .\Build.cmd -skipbuild - pwsh: ./check.ps1 -project $(_project) workingDirectory: $(Build.SourcesDirectory)/buildtools/checkpackages env: @@ -769,14 +748,7 @@ stages: clean: true - script: dotnet --list-sdks displayName: Report dotnet SDK versions - - task: UseDotNet@2 - displayName: install SDK - inputs: - packageType: sdk - useGlobalJson: true - includePreviewVersions: true - workingDirectory: $(Build.SourcesDirectory) - installationPath: $(Agent.ToolsDirectory)/dotnet + - script: .\Build.cmd -skipbuild - script: dotnet build .\FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\" workingDirectory: $(Build.SourcesDirectory) displayName: Regular rebuild of FSharp.Compiler.Service.sln @@ -795,14 +767,7 @@ stages: clean: true - script: dotnet --list-sdks displayName: Report dotnet SDK versions - - task: UseDotNet@2 - displayName: install SDK - inputs: - packageType: sdk - useGlobalJson: true - includePreviewVersions: true - workingDirectory: $(Build.SourcesDirectory) - installationPath: $(Agent.ToolsDirectory)/dotnet + - script: .\Build.cmd -skipbuild - script: dotnet build ./FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\" workingDirectory: $(Build.SourcesDirectory) displayName: Regular rebuild of FSharp.Compiler.Service.sln @@ -821,14 +786,7 @@ stages: clean: true - script: dotnet --list-sdks displayName: Report dotnet SDK versions - - task: UseDotNet@2 - displayName: install SDK - inputs: - packageType: sdk - useGlobalJson: true - includePreviewVersions: true - workingDirectory: $(Build.SourcesDirectory) - installationPath: $(Agent.ToolsDirectory)/dotnet + - script: .\Build.cmd -skipbuild - script: dotnet build ./FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\" workingDirectory: $(Build.SourcesDirectory) displayName: Regular rebuild of FSharp.Compiler.Service.sln @@ -869,14 +827,7 @@ stages: steps: - checkout: self clean: true - - task: UseDotNet@2 - displayName: install SDK - inputs: - packageType: sdk - useGlobalJson: true - includePreviewVersions: true - workingDirectory: $(Build.SourcesDirectory) - installationPath: $(Agent.ToolsDirectory)/dotnet + - script: .\Build.cmd -skipbuild - script: dotnet --list-sdks displayName: Report dotnet SDK versions - script: .\Build.cmd $(_kind) -pack -c $(_BuildConfig) @@ -900,14 +851,7 @@ stages: steps: - checkout: self clean: true - - task: UseDotNet@2 - displayName: install SDK - inputs: - packageType: sdk - useGlobalJson: true - includePreviewVersions: true - workingDirectory: $(Build.SourcesDirectory) - installationPath: $(Agent.ToolsDirectory)/dotnet + - script: .\Build.cmd -skipbuild - script: dotnet tool restore displayName: Restore dotnet tools - pwsh: .\tests\ILVerify\ilverify.ps1 From a292f3dba80a352ffdf05c5dfff38c311604d2d5 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Tue, 10 Jun 2025 14:20:57 +0200 Subject: [PATCH 07/18] Update azure-pipelines-PR.yml --- azure-pipelines-PR.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines-PR.yml b/azure-pipelines-PR.yml index 1e24193c7ae..2b22f617b64 100644 --- a/azure-pipelines-PR.yml +++ b/azure-pipelines-PR.yml @@ -767,7 +767,7 @@ stages: clean: true - script: dotnet --list-sdks displayName: Report dotnet SDK versions - - script: .\Build.cmd -skipbuild + - script: .\Build.sh --skipbuild - script: dotnet build ./FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\" workingDirectory: $(Build.SourcesDirectory) displayName: Regular rebuild of FSharp.Compiler.Service.sln @@ -786,7 +786,7 @@ stages: clean: true - script: dotnet --list-sdks displayName: Report dotnet SDK versions - - script: .\Build.cmd -skipbuild + - script: .\Build.sh --skipbuild - script: dotnet build ./FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\" workingDirectory: $(Build.SourcesDirectory) displayName: Regular rebuild of FSharp.Compiler.Service.sln From 9c4680c7d717983928fd8ffefb787cc557b78f6b Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Tue, 10 Jun 2025 15:03:26 +0200 Subject: [PATCH 08/18] Update azure-pipelines-PR.yml --- azure-pipelines-PR.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines-PR.yml b/azure-pipelines-PR.yml index 2b22f617b64..25b11f0b84a 100644 --- a/azure-pipelines-PR.yml +++ b/azure-pipelines-PR.yml @@ -135,7 +135,7 @@ stages: clean: true - script: dotnet --list-sdks displayName: Report dotnet SDK versions - - script: .\Build.cmd -skipbuild + - script: ./Build.sh --skipbuild - script: dotnet tool restore env: DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 @@ -167,7 +167,7 @@ stages: steps: - checkout: self clean: true - - script: .\Build.cmd -skipbuild + - script: ./Build.sh --skipbuild - pwsh: ./check.ps1 -project $(_project) workingDirectory: $(Build.SourcesDirectory)/buildtools/checkpackages env: @@ -767,7 +767,7 @@ stages: clean: true - script: dotnet --list-sdks displayName: Report dotnet SDK versions - - script: .\Build.sh --skipbuild + - script: ./Build.sh --skipbuild - script: dotnet build ./FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\" workingDirectory: $(Build.SourcesDirectory) displayName: Regular rebuild of FSharp.Compiler.Service.sln @@ -786,7 +786,7 @@ stages: clean: true - script: dotnet --list-sdks displayName: Report dotnet SDK versions - - script: .\Build.sh --skipbuild + - script: ./Build.sh --skipbuild - script: dotnet build ./FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\" workingDirectory: $(Build.SourcesDirectory) displayName: Regular rebuild of FSharp.Compiler.Service.sln From ab79d5626feb373dcd40daf06a1c845d9183f68b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 11 Jun 2025 02:02:52 +0000 Subject: [PATCH 09/18] Update dependencies from https://github.com/dotnet/arcade build 20250610.2 Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.25271.2 -> To Version 10.0.0-beta.25310.2 --- eng/Version.Details.xml | 4 ++-- eng/common/cross/build-rootfs.sh | 4 ++-- global.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index fa7c562b004..7b98269fb5b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -35,9 +35,9 @@ - + https://github.com/dotnet/arcade - add492db56ebc80df604ba5a30723beef14ed3dd + d237be4630776450573bc588eb995bb8f9ebc04f https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh index d6f005b5dab..8abfb71f727 100755 --- a/eng/common/cross/build-rootfs.sh +++ b/eng/common/cross/build-rootfs.sh @@ -295,8 +295,8 @@ while :; do ;; noble) # Ubuntu 24.04 __CodeName=noble - if [[ -n "$__LLDB_Package" ]]; then - __LLDB_Package="liblldb-18-dev" + if [[ -z "$__LLDB_Package" ]]; then + __LLDB_Package="liblldb-19-dev" fi ;; stretch) # Debian 9 diff --git a/global.json b/global.json index 9820f77f826..067bfe26860 100644 --- a/global.json +++ b/global.json @@ -17,7 +17,7 @@ "perl": "5.38.2.2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25309.2", + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25310.2", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } From e4ac538fd41250d4b1bd8725e714590392513539 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 12 Jun 2025 02:02:22 +0000 Subject: [PATCH 10/18] Update dependencies from https://github.com/dotnet/arcade build 20250611.1 Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.25271.2 -> To Version 10.0.0-beta.25311.1 --- eng/Version.Details.xml | 4 ++-- global.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 7b98269fb5b..35f3267b8d6 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -35,9 +35,9 @@ - + https://github.com/dotnet/arcade - d237be4630776450573bc588eb995bb8f9ebc04f + 5ad76e326524772ed87487009987bf88264f0da2 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/global.json b/global.json index 067bfe26860..88eff18cf3d 100644 --- a/global.json +++ b/global.json @@ -17,7 +17,7 @@ "perl": "5.38.2.2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25310.2", + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25311.1", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } From 7ca91954da24830401132db2a9f0ef914c57cde0 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 13 Jun 2025 02:01:53 +0000 Subject: [PATCH 11/18] Update dependencies from https://github.com/dotnet/arcade build 20250612.3 Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.25271.2 -> To Version 10.0.0-beta.25312.3 --- eng/Version.Details.xml | 4 ++-- eng/common/dotnet.cmd | 7 +++++++ eng/common/dotnet.ps1 | 11 +++++++++++ eng/common/dotnet.sh | 26 ++++++++++++++++++++++++++ eng/common/templates/vmr-build-pr.yml | 11 +---------- eng/common/tools.ps1 | 23 ++++------------------- eng/common/tools.sh | 22 ++++------------------ global.json | 2 +- 8 files changed, 56 insertions(+), 50 deletions(-) create mode 100644 eng/common/dotnet.cmd create mode 100644 eng/common/dotnet.ps1 create mode 100644 eng/common/dotnet.sh diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 35f3267b8d6..b8e0ffa2726 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -35,9 +35,9 @@ - + https://github.com/dotnet/arcade - 5ad76e326524772ed87487009987bf88264f0da2 + 186172916558a2e41c87c1ca4e02850e9bba5f53 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/common/dotnet.cmd b/eng/common/dotnet.cmd new file mode 100644 index 00000000000..527fa4bb38f --- /dev/null +++ b/eng/common/dotnet.cmd @@ -0,0 +1,7 @@ +@echo off + +:: This script is used to install the .NET SDK. +:: It will also invoke the SDK with any provided arguments. + +powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0dotnet.ps1""" %*" +exit /b %ErrorLevel% diff --git a/eng/common/dotnet.ps1 b/eng/common/dotnet.ps1 new file mode 100644 index 00000000000..45e5676c9eb --- /dev/null +++ b/eng/common/dotnet.ps1 @@ -0,0 +1,11 @@ +# This script is used to install the .NET SDK. +# It will also invoke the SDK with any provided arguments. + +. $PSScriptRoot\tools.ps1 +$dotnetRoot = InitializeDotNetCli -install:$true + +# Invoke acquired SDK with args if they are provided +if ($args.count -gt 0) { + $env:DOTNET_NOLOGO=1 + & "$dotnetRoot\dotnet.exe" $args +} diff --git a/eng/common/dotnet.sh b/eng/common/dotnet.sh new file mode 100644 index 00000000000..2ef68235675 --- /dev/null +++ b/eng/common/dotnet.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +# This script is used to install the .NET SDK. +# It will also invoke the SDK with any provided arguments. + +source="${BASH_SOURCE[0]}" +# resolve $SOURCE until the file is no longer a symlink +while [[ -h $source ]]; do + scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + source="$(readlink "$source")" + + # if $source was a relative symlink, we need to resolve it relative to the path where the + # symlink file was located + [[ $source != /* ]] && source="$scriptroot/$source" +done +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +source $scriptroot/tools.sh +InitializeDotNetCli true # install + +# Invoke acquired SDK with args if they are provided +if [[ $# > 0 ]]; then + __dotnetDir=${_InitializeDotNetCli} + dotnetPath=${__dotnetDir}/dotnet + ${dotnetPath} "$@" +fi diff --git a/eng/common/templates/vmr-build-pr.yml b/eng/common/templates/vmr-build-pr.yml index 670cf32c3bd..c1b6fec4584 100644 --- a/eng/common/templates/vmr-build-pr.yml +++ b/eng/common/templates/vmr-build-pr.yml @@ -1,14 +1,5 @@ trigger: none -pr: - branches: - include: - - main - - release/* - paths: - exclude: - - documentation/* - - README.md - - CODEOWNERS +pr: none variables: - template: /eng/common/templates/variables/pool-providers.yml@self diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index c9e39595b58..40f0aa86128 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -765,28 +765,13 @@ function MSBuild() { $toolsetBuildProject = InitializeToolset $basePath = Split-Path -parent $toolsetBuildProject - $possiblePaths = @( - # new scripts need to work with old packages, so we need to look for the old names/versions - (Join-Path $basePath (Join-Path $buildTool.Framework 'Microsoft.DotNet.ArcadeLogging.dll')), - (Join-Path $basePath (Join-Path $buildTool.Framework 'Microsoft.DotNet.Arcade.Sdk.dll')), - - # This list doesn't need to be updated anymore and can eventually be removed. - (Join-Path $basePath (Join-Path net9.0 'Microsoft.DotNet.ArcadeLogging.dll')), - (Join-Path $basePath (Join-Path net9.0 'Microsoft.DotNet.Arcade.Sdk.dll')), - (Join-Path $basePath (Join-Path net8.0 'Microsoft.DotNet.ArcadeLogging.dll')), - (Join-Path $basePath (Join-Path net8.0 'Microsoft.DotNet.Arcade.Sdk.dll')) - ) - $selectedPath = $null - foreach ($path in $possiblePaths) { - if (Test-Path $path -PathType Leaf) { - $selectedPath = $path - break - } - } + $selectedPath = Join-Path $basePath (Join-Path $buildTool.Framework 'Microsoft.DotNet.ArcadeLogging.dll') + if (-not $selectedPath) { - Write-PipelineTelemetryError -Category 'Build' -Message 'Unable to find arcade sdk logger assembly.' + Write-PipelineTelemetryError -Category 'Build' -Message "Unable to find arcade sdk logger assembly: $selectedPath" ExitWithExitCode 1 } + $args += "/logger:$selectedPath" } diff --git a/eng/common/tools.sh b/eng/common/tools.sh index a7e84931510..3def02a638d 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -447,27 +447,13 @@ function MSBuild { fi local toolset_dir="${_InitializeToolset%/*}" - # new scripts need to work with old packages, so we need to look for the old names/versions - local selectedPath= - local possiblePaths=() - possiblePaths+=( "$toolset_dir/net/Microsoft.DotNet.ArcadeLogging.dll" ) - possiblePaths+=( "$toolset_dir/net/Microsoft.DotNet.Arcade.Sdk.dll" ) - - # This list doesn't need to be updated anymore and can eventually be removed. - possiblePaths+=( "$toolset_dir/net9.0/Microsoft.DotNet.ArcadeLogging.dll" ) - possiblePaths+=( "$toolset_dir/net9.0/Microsoft.DotNet.Arcade.Sdk.dll" ) - possiblePaths+=( "$toolset_dir/net8.0/Microsoft.DotNet.ArcadeLogging.dll" ) - possiblePaths+=( "$toolset_dir/net8.0/Microsoft.DotNet.Arcade.Sdk.dll" ) - for path in "${possiblePaths[@]}"; do - if [[ -f $path ]]; then - selectedPath=$path - break - fi - done + local selectedPath="$toolset_dir/net/Microsoft.DotNet.ArcadeLogging.dll" + if [[ -z "$selectedPath" ]]; then - Write-PipelineTelemetryError -category 'Build' "Unable to find arcade sdk logger assembly." + Write-PipelineTelemetryError -category 'Build' "Unable to find arcade sdk logger assembly: $selectedPath" ExitWithExitCode 1 fi + args+=( "-logger:$selectedPath" ) fi diff --git a/global.json b/global.json index 88eff18cf3d..6f56f87d445 100644 --- a/global.json +++ b/global.json @@ -17,7 +17,7 @@ "perl": "5.38.2.2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25311.1", + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25312.3", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } From 60b6152e2dc3b1062143bda779623192c8547c94 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 14 Jun 2025 02:01:37 +0000 Subject: [PATCH 12/18] Update dependencies from https://github.com/dotnet/arcade build 20250613.2 Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.25271.2 -> To Version 10.0.0-beta.25313.2 --- eng/Version.Details.xml | 4 ++-- global.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b8e0ffa2726..49efce33c3c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -35,9 +35,9 @@ - + https://github.com/dotnet/arcade - 186172916558a2e41c87c1ca4e02850e9bba5f53 + 7a09c1144283309440a7966c664199944198c920 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/global.json b/global.json index 6f56f87d445..06ad0918b8a 100644 --- a/global.json +++ b/global.json @@ -17,7 +17,7 @@ "perl": "5.38.2.2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25312.3", + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25313.2", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } From cd15c6e2d81f7afe6c6f8edfd1731f88ae7ce8cf Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 17 Jun 2025 02:02:20 +0000 Subject: [PATCH 13/18] Update dependencies from https://github.com/dotnet/arcade build 20250616.2 Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.25271.2 -> To Version 10.0.0-beta.25316.2 --- eng/Version.Details.xml | 4 ++-- global.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 49efce33c3c..547deb6f1b3 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -35,9 +35,9 @@ - + https://github.com/dotnet/arcade - 7a09c1144283309440a7966c664199944198c920 + d9d02d858b71562509f72ea84409853e4deffc8f https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/global.json b/global.json index 06ad0918b8a..66db9e3b8c4 100644 --- a/global.json +++ b/global.json @@ -17,7 +17,7 @@ "perl": "5.38.2.2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25313.2", + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25316.2", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } From b36f22672f79bae41547872419e78ca3a3b43dfb Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Tue, 17 Jun 2025 16:40:43 +0200 Subject: [PATCH 14/18] Update azure-pipelines-PR.yml Change some usages of `dotnet` with `./eng/common/dotnet.sh` - see how it behaves --- azure-pipelines-PR.yml | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/azure-pipelines-PR.yml b/azure-pipelines-PR.yml index 25b11f0b84a..78fcaf1e54b 100644 --- a/azure-pipelines-PR.yml +++ b/azure-pipelines-PR.yml @@ -135,16 +135,16 @@ stages: clean: true - script: dotnet --list-sdks displayName: Report dotnet SDK versions - - script: ./Build.sh --skipbuild - - script: dotnet tool restore + + - script: ./eng/common/dotnet.sh tool restore env: DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 displayName: Install tools - - script: dotnet fsi src/Compiler/FSCompCheck.fsx + - script: ./eng/common/dotnet.sh fsi src/Compiler/FSCompCheck.fsx env: DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 displayName: Check error code sorting in src/Compiler/FSComp.txt - - script: dotnet fantomas . --check + - script: ./eng/common/dotnet.sh fantomas . --check env: DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 displayName: Check code formatting (run 'dotnet fantomas .' to fix) @@ -748,8 +748,7 @@ stages: clean: true - script: dotnet --list-sdks displayName: Report dotnet SDK versions - - script: .\Build.cmd -skipbuild - - script: dotnet build .\FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\" + - script: .\eng\common\dotnet.cmd build .\FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\" workingDirectory: $(Build.SourcesDirectory) displayName: Regular rebuild of FSharp.Compiler.Service.sln continueOnError: false @@ -767,8 +766,7 @@ stages: clean: true - script: dotnet --list-sdks displayName: Report dotnet SDK versions - - script: ./Build.sh --skipbuild - - script: dotnet build ./FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\" + - script: ./eng/common/dotnet.sh build ./FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\" workingDirectory: $(Build.SourcesDirectory) displayName: Regular rebuild of FSharp.Compiler.Service.sln continueOnError: false @@ -786,8 +784,7 @@ stages: clean: true - script: dotnet --list-sdks displayName: Report dotnet SDK versions - - script: ./Build.sh --skipbuild - - script: dotnet build ./FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\" + - script: ./eng/common/dotnet.sh build ./FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\" workingDirectory: $(Build.SourcesDirectory) displayName: Regular rebuild of FSharp.Compiler.Service.sln continueOnError: false @@ -827,7 +824,6 @@ stages: steps: - checkout: self clean: true - - script: .\Build.cmd -skipbuild - script: dotnet --list-sdks displayName: Report dotnet SDK versions - script: .\Build.cmd $(_kind) -pack -c $(_BuildConfig) @@ -851,8 +847,7 @@ stages: steps: - checkout: self clean: true - - script: .\Build.cmd -skipbuild - - script: dotnet tool restore + - script: .\eng\common\dotnet.cmd tool restore displayName: Restore dotnet tools - pwsh: .\tests\ILVerify\ilverify.ps1 displayName: Run ILVerify From ca52a74a77a6e5434e1fe213b5b3ee19983d4d30 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Thu, 19 Jun 2025 10:13:22 +0200 Subject: [PATCH 15/18] Apply path feature of global.json --- azure-pipelines-PR.yml | 11 ++++++++++- global.json | 4 +++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/azure-pipelines-PR.yml b/azure-pipelines-PR.yml index 78fcaf1e54b..207992a6b9b 100644 --- a/azure-pipelines-PR.yml +++ b/azure-pipelines-PR.yml @@ -113,7 +113,16 @@ stages: steps: - checkout: self clean: true - - script: .\Build.cmd -skipbuild + # We first download a publicly available .NET SDK. That one has support for `path` in global.json. dotnet.cmd script can then download a version which is not yet shipped, but matches global.json. + - task: UseDotNet@2 + displayName: install SDK + inputs: + packageType: sdk + version: '10.x' + includePreviewVersions: true + workingDirectory: $(Build.SourcesDirectory) + installationPath: $(Build.SourcesDirectory)/.dotnet + - script: .\eng\common\dotnet.cmd - script: .\eng\test-determinism.cmd -configuration Debug env: FSHARP_EXPERIMENTAL_FEATURES: $(_experimental_flag) diff --git a/global.json b/global.json index 66db9e3b8c4..3b9b9876b8b 100644 --- a/global.json +++ b/global.json @@ -1,7 +1,9 @@ { "sdk": { "version": "10.0.100-preview.6.25302.104", - "allowPrerelease": true + "allowPrerelease": true, + "paths": [ ".dotnet", "$host$" ], + "errorMessage": "The .NET SDK could not be found, please run ./eng/common/dotnet.sh." }, "tools": { "dotnet": "10.0.100-preview.6.25302.104", From fe69880904137fa108fd3bd72d354b81497d4711 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Thu, 19 Jun 2025 11:02:02 +0200 Subject: [PATCH 16/18] chmoded dotnet files once more --- eng/common/dotnet.cmd | 0 eng/common/dotnet.ps1 | 0 eng/common/dotnet.sh | 0 3 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 eng/common/dotnet.cmd mode change 100644 => 100755 eng/common/dotnet.ps1 mode change 100644 => 100755 eng/common/dotnet.sh diff --git a/eng/common/dotnet.cmd b/eng/common/dotnet.cmd old mode 100644 new mode 100755 diff --git a/eng/common/dotnet.ps1 b/eng/common/dotnet.ps1 old mode 100644 new mode 100755 diff --git a/eng/common/dotnet.sh b/eng/common/dotnet.sh old mode 100644 new mode 100755 From 5432f715397fd5876b6ecf8785f220c0a8b933b4 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Thu, 19 Jun 2025 11:23:39 +0200 Subject: [PATCH 17/18] Fix 3 more legs to work with prerelease SDK versions --- azure-pipelines-PR.yml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/azure-pipelines-PR.yml b/azure-pipelines-PR.yml index 207992a6b9b..2f5b6428cf6 100644 --- a/azure-pipelines-PR.yml +++ b/azure-pipelines-PR.yml @@ -176,7 +176,16 @@ stages: steps: - checkout: self clean: true - - script: ./Build.sh --skipbuild + # We first download a publicly available .NET SDK. That one has support for `path` in global.json. dotnet.cmd script can then download a version which is not yet shipped, but matches global.json. + - task: UseDotNet@2 + displayName: install SDK + inputs: + packageType: sdk + version: '10.x' + includePreviewVersions: true + workingDirectory: $(Build.SourcesDirectory) + installationPath: $(Build.SourcesDirectory)/.dotnet + - script: ./eng/common/dotnet.sh - pwsh: ./check.ps1 -project $(_project) workingDirectory: $(Build.SourcesDirectory)/buildtools/checkpackages env: @@ -856,7 +865,17 @@ stages: steps: - checkout: self clean: true - - script: .\eng\common\dotnet.cmd tool restore + # We first download a publicly available .NET SDK. That one has support for `path` in global.json. dotnet.cmd script can then download a version which is not yet shipped, but matches global.json. + - task: UseDotNet@2 + displayName: install SDK + inputs: + packageType: sdk + version: '10.x' + includePreviewVersions: true + workingDirectory: $(Build.SourcesDirectory) + installationPath: $(Build.SourcesDirectory)/.dotnet + - script: .\eng\common\dotnet.cmd + - script: dotnet tool restore displayName: Restore dotnet tools - pwsh: .\tests\ILVerify\ilverify.ps1 displayName: Run ILVerify From cf004cd9107449e9ac7fb8792acb36ce92d44df7 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Thu, 19 Jun 2025 13:05:44 +0200 Subject: [PATCH 18/18] AOT job to use dotnet.cmd as well --- azure-pipelines-PR.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/azure-pipelines-PR.yml b/azure-pipelines-PR.yml index 2f5b6428cf6..563f0afcbfb 100644 --- a/azure-pipelines-PR.yml +++ b/azure-pipelines-PR.yml @@ -842,8 +842,16 @@ stages: steps: - checkout: self clean: true - - script: dotnet --list-sdks - displayName: Report dotnet SDK versions + # We first download a publicly available .NET SDK. That one has support for `path` in global.json. dotnet.cmd script can then download a version which is not yet shipped, but matches global.json. + - task: UseDotNet@2 + displayName: install SDK + inputs: + packageType: sdk + version: '10.x' + includePreviewVersions: true + workingDirectory: $(Build.SourcesDirectory) + installationPath: $(Build.SourcesDirectory)/.dotnet + - script: .\eng\common\dotnet.cmd - script: .\Build.cmd $(_kind) -pack -c $(_BuildConfig) env: NativeToolsOnMachine: true