From 7c14365165f430500df9e6fdcf17c54ab5ef4a69 Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Thu, 3 Sep 2026 13:53:33 +0200 Subject: [PATCH 01/18] Instrument MSBuildCache pipeline timings Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 065e7e7f-9806-4543-a87b-9079876f2cc1 --- azure-pipelines.yml | 10 +++++++ .../steps/build-msbuildcache-telemetry.yml | 30 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 eng/pipelines/steps/build-msbuildcache-telemetry.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a4a23ce22d..506cd78437 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -146,6 +146,8 @@ stages: - template: /eng/pipelines/steps/install-windows-prereqs.yml + - template: /eng/pipelines/steps/build-msbuildcache-telemetry.yml + # Seed from every trusted main merge. PR merge refs are read-only consumers, so the cache must be updated as # soon as main changes to avoid forcing the entire 204-node graph to miss. - pwsh: | @@ -185,8 +187,11 @@ stages: "/p:RepoRoot=$(Build.SourcesDirectory)\", "/p:Test=false", "/p:MSBuildCachePackageEnabled=true", + "/p:MSBuildCachePackageVersion=0.1.999-phase-telemetry", + "/p:RestoreAdditionalProjectSources=$(Agent.TempDirectory)\MSBuildCacheTelemetryPackages", "/p:MSBuildCacheEnabled=true", "/p:MSBuildCacheRemoteCacheIsReadOnly=false", + "/p:MSBuildCacheLogCacheOperationTimings=true", "/p:MSBuildCacheLogDirectory=$(Agent.TempDirectory)\MSBuildCache" ) @@ -451,6 +456,8 @@ stages: - template: /eng/pipelines/steps/install-windows-prereqs.yml + - template: /eng/pipelines/steps/build-msbuildcache-telemetry.yml + # MSBuildCache requires a direct static graph build; Arcade's outer Build.proj discovers its projects too late # for the project-cache plugin. Keep the regular Arcade build below as the correctness fallback during rollout. # @@ -502,8 +509,11 @@ stages: "/p:RepoRoot=$(Build.SourcesDirectory)\", "/p:Test=false", "/p:MSBuildCachePackageEnabled=true", + "/p:MSBuildCachePackageVersion=0.1.999-phase-telemetry", + "/p:RestoreAdditionalProjectSources=$(Agent.TempDirectory)\MSBuildCacheTelemetryPackages", "/p:MSBuildCacheEnabled=true", "/p:MSBuildCacheRemoteCacheIsReadOnly=true", + "/p:MSBuildCacheLogCacheOperationTimings=true", "/p:MSBuildCacheLogDirectory=$(Agent.TempDirectory)\MSBuildCache" ) diff --git a/eng/pipelines/steps/build-msbuildcache-telemetry.yml b/eng/pipelines/steps/build-msbuildcache-telemetry.yml new file mode 100644 index 0000000000..70b0d1453d --- /dev/null +++ b/eng/pipelines/steps/build-msbuildcache-telemetry.yml @@ -0,0 +1,30 @@ +steps: +- pwsh: | + $source = "$(Agent.TempDirectory)\MSBuildCacheTelemetry" + $packages = "$(Agent.TempDirectory)\MSBuildCacheTelemetryPackages" + $version = "0.1.999-phase-telemetry" + $commit = "a29f3f11307f769319f66834585a14bc986eef57" + + git clone --depth 1 --branch dev/janprovaznik/cache-phase-telemetry https://github.com/JanProvaznik/MSBuildCache $source + if ((git -C $source rev-parse HEAD) -ne $commit) { + throw "Expected MSBuildCache commit $commit." + } + + dotnet pack "$source\src\AzurePipelines\Microsoft.MSBuildCache.AzurePipelines.csproj" ` + --configuration Release ` + --output $packages ` + "-p:PackageVersion=$version" + if ($LASTEXITCODE -ne 0) { + throw "Failed to pack Microsoft.MSBuildCache.AzurePipelines." + } + + dotnet pack "$source\src\SharedCompilation\Microsoft.MSBuildCache.SharedCompilation.csproj" ` + --configuration Release ` + --output $packages ` + "-p:PackageVersion=$version" + if ($LASTEXITCODE -ne 0) { + throw "Failed to pack Microsoft.MSBuildCache.SharedCompilation." + } + + Get-ChildItem $packages -Filter *.nupkg | Select-Object Name, Length + displayName: Build instrumented MSBuildCache packages From 679e2fa894f507ec866b0d21587089bc4469e3d3 Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Thu, 3 Sep 2026 13:59:04 +0200 Subject: [PATCH 02/18] Use image SDK to pack telemetry plugin Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 065e7e7f-9806-4543-a87b-9079876f2cc1 --- eng/pipelines/steps/build-msbuildcache-telemetry.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/steps/build-msbuildcache-telemetry.yml b/eng/pipelines/steps/build-msbuildcache-telemetry.yml index 70b0d1453d..c456577e28 100644 --- a/eng/pipelines/steps/build-msbuildcache-telemetry.yml +++ b/eng/pipelines/steps/build-msbuildcache-telemetry.yml @@ -4,13 +4,19 @@ steps: $packages = "$(Agent.TempDirectory)\MSBuildCacheTelemetryPackages" $version = "0.1.999-phase-telemetry" $commit = "a29f3f11307f769319f66834585a14bc986eef57" + $dotnetRoot = Join-Path $env:ProgramFiles "dotnet" + $dotnet = Join-Path $dotnetRoot "dotnet.exe" git clone --depth 1 --branch dev/janprovaznik/cache-phase-telemetry https://github.com/JanProvaznik/MSBuildCache $source if ((git -C $source rev-parse HEAD) -ne $commit) { throw "Expected MSBuildCache commit $commit." } - dotnet pack "$source\src\AzurePipelines\Microsoft.MSBuildCache.AzurePipelines.csproj" ` + # TestFX's prerequisite step points DOTNET_ROOT at its not-yet-bootstrapped repo-local SDK. + # MSBuildCache uses the .NET 10 SDK already installed in the build image. + $env:DOTNET_ROOT = $dotnetRoot + + & $dotnet pack "$source\src\AzurePipelines\Microsoft.MSBuildCache.AzurePipelines.csproj" ` --configuration Release ` --output $packages ` "-p:PackageVersion=$version" @@ -18,7 +24,7 @@ steps: throw "Failed to pack Microsoft.MSBuildCache.AzurePipelines." } - dotnet pack "$source\src\SharedCompilation\Microsoft.MSBuildCache.SharedCompilation.csproj" ` + & $dotnet pack "$source\src\SharedCompilation\Microsoft.MSBuildCache.SharedCompilation.csproj" ` --configuration Release ` --output $packages ` "-p:PackageVersion=$version" From da7b53aa9a56fd3c3bf4090685e1dd15c079b2f4 Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Thu, 3 Sep 2026 14:03:10 +0200 Subject: [PATCH 03/18] Install SDK for telemetry plugin build Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 065e7e7f-9806-4543-a87b-9079876f2cc1 --- eng/pipelines/steps/build-msbuildcache-telemetry.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/steps/build-msbuildcache-telemetry.yml b/eng/pipelines/steps/build-msbuildcache-telemetry.yml index c456577e28..bca63cc452 100644 --- a/eng/pipelines/steps/build-msbuildcache-telemetry.yml +++ b/eng/pipelines/steps/build-msbuildcache-telemetry.yml @@ -1,10 +1,16 @@ steps: +- task: UseDotNet@2 + displayName: Install .NET 10 SDK for MSBuildCache + inputs: + version: 10.x + installationPath: $(Agent.TempDirectory)\dotnet10 + - pwsh: | $source = "$(Agent.TempDirectory)\MSBuildCacheTelemetry" $packages = "$(Agent.TempDirectory)\MSBuildCacheTelemetryPackages" $version = "0.1.999-phase-telemetry" $commit = "a29f3f11307f769319f66834585a14bc986eef57" - $dotnetRoot = Join-Path $env:ProgramFiles "dotnet" + $dotnetRoot = "$(Agent.TempDirectory)\dotnet10" $dotnet = Join-Path $dotnetRoot "dotnet.exe" git clone --depth 1 --branch dev/janprovaznik/cache-phase-telemetry https://github.com/JanProvaznik/MSBuildCache $source From fd97bd334e240b929b29828505678b2dfdc35963 Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Thu, 3 Sep 2026 14:13:18 +0200 Subject: [PATCH 04/18] Use SDK path exported by UseDotNet Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 065e7e7f-9806-4543-a87b-9079876f2cc1 --- eng/pipelines/steps/build-msbuildcache-telemetry.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/steps/build-msbuildcache-telemetry.yml b/eng/pipelines/steps/build-msbuildcache-telemetry.yml index bca63cc452..7c6d6f9697 100644 --- a/eng/pipelines/steps/build-msbuildcache-telemetry.yml +++ b/eng/pipelines/steps/build-msbuildcache-telemetry.yml @@ -3,15 +3,14 @@ steps: displayName: Install .NET 10 SDK for MSBuildCache inputs: version: 10.x - installationPath: $(Agent.TempDirectory)\dotnet10 - pwsh: | $source = "$(Agent.TempDirectory)\MSBuildCacheTelemetry" $packages = "$(Agent.TempDirectory)\MSBuildCacheTelemetryPackages" $version = "0.1.999-phase-telemetry" $commit = "a29f3f11307f769319f66834585a14bc986eef57" - $dotnetRoot = "$(Agent.TempDirectory)\dotnet10" - $dotnet = Join-Path $dotnetRoot "dotnet.exe" + $dotnet = (Get-Command dotnet -ErrorAction Stop).Source + $dotnetRoot = Split-Path $dotnet git clone --depth 1 --branch dev/janprovaznik/cache-phase-telemetry https://github.com/JanProvaznik/MSBuildCache $source if ((git -C $source rev-parse HEAD) -ne $commit) { From 8182028159686069a102113aceab897976297c81 Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Thu, 3 Sep 2026 14:26:55 +0200 Subject: [PATCH 05/18] Locate the SDK installed by UseDotNet Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 065e7e7f-9806-4543-a87b-9079876f2cc1 --- eng/pipelines/steps/build-msbuildcache-telemetry.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/steps/build-msbuildcache-telemetry.yml b/eng/pipelines/steps/build-msbuildcache-telemetry.yml index 7c6d6f9697..a3293d10f8 100644 --- a/eng/pipelines/steps/build-msbuildcache-telemetry.yml +++ b/eng/pipelines/steps/build-msbuildcache-telemetry.yml @@ -9,8 +9,13 @@ steps: $packages = "$(Agent.TempDirectory)\MSBuildCacheTelemetryPackages" $version = "0.1.999-phase-telemetry" $commit = "a29f3f11307f769319f66834585a14bc986eef57" - $dotnet = (Get-Command dotnet -ErrorAction Stop).Source - $dotnetRoot = Split-Path $dotnet + $dotnetRoot = Get-ChildItem "$(Agent.TempDirectory)" -Directory | + Where-Object { Test-Path (Join-Path $_.FullName "sdk\10.0.400") } | + Select-Object -First 1 -ExpandProperty FullName + if (!$dotnetRoot) { + throw "Could not locate the .NET 10.0.400 SDK installed by UseDotNet." + } + $dotnet = Join-Path $dotnetRoot "dotnet.exe" git clone --depth 1 --branch dev/janprovaznik/cache-phase-telemetry https://github.com/JanProvaznik/MSBuildCache $source if ((git -C $source rev-parse HEAD) -ne $commit) { @@ -20,6 +25,7 @@ steps: # TestFX's prerequisite step points DOTNET_ROOT at its not-yet-bootstrapped repo-local SDK. # MSBuildCache uses the .NET 10 SDK already installed in the build image. $env:DOTNET_ROOT = $dotnetRoot + & $dotnet --info & $dotnet pack "$source\src\AzurePipelines\Microsoft.MSBuildCache.AzurePipelines.csproj" ` --configuration Release ` From ec7b9a45e8dc7020a655b6570943f919b3b41668 Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Thu, 3 Sep 2026 14:37:53 +0200 Subject: [PATCH 06/18] Resolve SDK from MSBuildCache checkout Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 065e7e7f-9806-4543-a87b-9079876f2cc1 --- eng/pipelines/steps/build-msbuildcache-telemetry.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/pipelines/steps/build-msbuildcache-telemetry.yml b/eng/pipelines/steps/build-msbuildcache-telemetry.yml index a3293d10f8..5ada72536a 100644 --- a/eng/pipelines/steps/build-msbuildcache-telemetry.yml +++ b/eng/pipelines/steps/build-msbuildcache-telemetry.yml @@ -25,6 +25,7 @@ steps: # TestFX's prerequisite step points DOTNET_ROOT at its not-yet-bootstrapped repo-local SDK. # MSBuildCache uses the .NET 10 SDK already installed in the build image. $env:DOTNET_ROOT = $dotnetRoot + Set-Location $source & $dotnet --info & $dotnet pack "$source\src\AzurePipelines\Microsoft.MSBuildCache.AzurePipelines.csproj" ` From 4ba3849ec6ba9c39b8a3d92bd2e0cafe5c0506d9 Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Thu, 3 Sep 2026 14:50:18 +0200 Subject: [PATCH 07/18] Restore public targeting packs from NuGet.org Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 065e7e7f-9806-4543-a87b-9079876f2cc1 --- eng/pipelines/steps/build-msbuildcache-telemetry.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eng/pipelines/steps/build-msbuildcache-telemetry.yml b/eng/pipelines/steps/build-msbuildcache-telemetry.yml index 5ada72536a..6d50f85c68 100644 --- a/eng/pipelines/steps/build-msbuildcache-telemetry.yml +++ b/eng/pipelines/steps/build-msbuildcache-telemetry.yml @@ -31,6 +31,8 @@ steps: & $dotnet pack "$source\src\AzurePipelines\Microsoft.MSBuildCache.AzurePipelines.csproj" ` --configuration Release ` --output $packages ` + --source https://api.nuget.org/v3/index.json ` + --source https://pkgs.dev.azure.com/msbuildcache/public/_packaging/msbuildcache/nuget/v3/index.json ` "-p:PackageVersion=$version" if ($LASTEXITCODE -ne 0) { throw "Failed to pack Microsoft.MSBuildCache.AzurePipelines." @@ -39,6 +41,8 @@ steps: & $dotnet pack "$source\src\SharedCompilation\Microsoft.MSBuildCache.SharedCompilation.csproj" ` --configuration Release ` --output $packages ` + --source https://api.nuget.org/v3/index.json ` + --source https://pkgs.dev.azure.com/msbuildcache/public/_packaging/msbuildcache/nuget/v3/index.json ` "-p:PackageVersion=$version" if ($LASTEXITCODE -ne 0) { throw "Failed to pack Microsoft.MSBuildCache.SharedCompilation." From 10129f63bc6983fb0130496315de9ec7bf995aa6 Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Thu, 3 Sep 2026 14:55:18 +0200 Subject: [PATCH 08/18] Restore telemetry projects before packing Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 065e7e7f-9806-4543-a87b-9079876f2cc1 --- .../steps/build-msbuildcache-telemetry.yml | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/eng/pipelines/steps/build-msbuildcache-telemetry.yml b/eng/pipelines/steps/build-msbuildcache-telemetry.yml index 6d50f85c68..781d058580 100644 --- a/eng/pipelines/steps/build-msbuildcache-telemetry.yml +++ b/eng/pipelines/steps/build-msbuildcache-telemetry.yml @@ -28,21 +28,33 @@ steps: Set-Location $source & $dotnet --info - & $dotnet pack "$source\src\AzurePipelines\Microsoft.MSBuildCache.AzurePipelines.csproj" ` + $azurePipelinesProject = "$source\src\AzurePipelines\Microsoft.MSBuildCache.AzurePipelines.csproj" + & $dotnet restore $azurePipelinesProject ` + --source https://api.nuget.org/v3/index.json ` + --source https://pkgs.dev.azure.com/msbuildcache/public/_packaging/msbuildcache/nuget/v3/index.json + if ($LASTEXITCODE -ne 0) { + throw "Failed to restore Microsoft.MSBuildCache.AzurePipelines." + } + & $dotnet pack $azurePipelinesProject ` + --no-restore ` --configuration Release ` --output $packages ` - --source https://api.nuget.org/v3/index.json ` - --source https://pkgs.dev.azure.com/msbuildcache/public/_packaging/msbuildcache/nuget/v3/index.json ` "-p:PackageVersion=$version" if ($LASTEXITCODE -ne 0) { throw "Failed to pack Microsoft.MSBuildCache.AzurePipelines." } - & $dotnet pack "$source\src\SharedCompilation\Microsoft.MSBuildCache.SharedCompilation.csproj" ` + $sharedCompilationProject = "$source\src\SharedCompilation\Microsoft.MSBuildCache.SharedCompilation.csproj" + & $dotnet restore $sharedCompilationProject ` + --source https://api.nuget.org/v3/index.json ` + --source https://pkgs.dev.azure.com/msbuildcache/public/_packaging/msbuildcache/nuget/v3/index.json + if ($LASTEXITCODE -ne 0) { + throw "Failed to restore Microsoft.MSBuildCache.SharedCompilation." + } + & $dotnet pack $sharedCompilationProject ` + --no-restore ` --configuration Release ` --output $packages ` - --source https://api.nuget.org/v3/index.json ` - --source https://pkgs.dev.azure.com/msbuildcache/public/_packaging/msbuildcache/nuget/v3/index.json ` "-p:PackageVersion=$version" if ($LASTEXITCODE -ne 0) { throw "Failed to pack Microsoft.MSBuildCache.SharedCompilation." From 106bbc2d74c59948b1d056879484472f95e272bd Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Thu, 3 Sep 2026 15:00:29 +0200 Subject: [PATCH 09/18] Restore telemetry packages with explicit config Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 065e7e7f-9806-4543-a87b-9079876f2cc1 --- .../steps/build-msbuildcache-telemetry.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/eng/pipelines/steps/build-msbuildcache-telemetry.yml b/eng/pipelines/steps/build-msbuildcache-telemetry.yml index 781d058580..7336e9240c 100644 --- a/eng/pipelines/steps/build-msbuildcache-telemetry.yml +++ b/eng/pipelines/steps/build-msbuildcache-telemetry.yml @@ -7,6 +7,7 @@ steps: - pwsh: | $source = "$(Agent.TempDirectory)\MSBuildCacheTelemetry" $packages = "$(Agent.TempDirectory)\MSBuildCacheTelemetryPackages" + $nugetConfig = "$(Agent.TempDirectory)\MSBuildCacheTelemetry.NuGet.config" $version = "0.1.999-phase-telemetry" $commit = "a29f3f11307f769319f66834585a14bc986eef57" $dotnetRoot = Get-ChildItem "$(Agent.TempDirectory)" -Directory | @@ -27,11 +28,20 @@ steps: $env:DOTNET_ROOT = $dotnetRoot Set-Location $source & $dotnet --info + @' + + + + + + + + + '@ | Set-Content $nugetConfig $azurePipelinesProject = "$source\src\AzurePipelines\Microsoft.MSBuildCache.AzurePipelines.csproj" & $dotnet restore $azurePipelinesProject ` - --source https://api.nuget.org/v3/index.json ` - --source https://pkgs.dev.azure.com/msbuildcache/public/_packaging/msbuildcache/nuget/v3/index.json + --configfile $nugetConfig if ($LASTEXITCODE -ne 0) { throw "Failed to restore Microsoft.MSBuildCache.AzurePipelines." } @@ -46,8 +56,7 @@ steps: $sharedCompilationProject = "$source\src\SharedCompilation\Microsoft.MSBuildCache.SharedCompilation.csproj" & $dotnet restore $sharedCompilationProject ` - --source https://api.nuget.org/v3/index.json ` - --source https://pkgs.dev.azure.com/msbuildcache/public/_packaging/msbuildcache/nuget/v3/index.json + --configfile $nugetConfig if ($LASTEXITCODE -ne 0) { throw "Failed to restore Microsoft.MSBuildCache.SharedCompilation." } From b7d67443e06fdf11de41e9e4d03527e9f555dbf3 Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Thu, 3 Sep 2026 15:05:37 +0200 Subject: [PATCH 10/18] Map telemetry package sources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 065e7e7f-9806-4543-a87b-9079876f2cc1 --- eng/pipelines/steps/build-msbuildcache-telemetry.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/eng/pipelines/steps/build-msbuildcache-telemetry.yml b/eng/pipelines/steps/build-msbuildcache-telemetry.yml index 7336e9240c..8db6357aff 100644 --- a/eng/pipelines/steps/build-msbuildcache-telemetry.yml +++ b/eng/pipelines/steps/build-msbuildcache-telemetry.yml @@ -36,6 +36,16 @@ steps: + + + + + + + + + + '@ | Set-Content $nugetConfig From 5637e9fc800f63b8a332f7fd827bc830c464824f Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Thu, 3 Sep 2026 15:14:47 +0200 Subject: [PATCH 11/18] Map remaining internal telemetry dependencies Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 065e7e7f-9806-4543-a87b-9079876f2cc1 --- eng/pipelines/steps/build-msbuildcache-telemetry.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eng/pipelines/steps/build-msbuildcache-telemetry.yml b/eng/pipelines/steps/build-msbuildcache-telemetry.yml index 8db6357aff..c71616bcd3 100644 --- a/eng/pipelines/steps/build-msbuildcache-telemetry.yml +++ b/eng/pipelines/steps/build-msbuildcache-telemetry.yml @@ -41,8 +41,10 @@ steps: + + From 2f11a9bcbcd6976e89ff9339b45815e9ea408baa Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Thu, 3 Sep 2026 15:19:41 +0200 Subject: [PATCH 12/18] Clone telemetry source with version history Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 065e7e7f-9806-4543-a87b-9079876f2cc1 --- eng/pipelines/steps/build-msbuildcache-telemetry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/steps/build-msbuildcache-telemetry.yml b/eng/pipelines/steps/build-msbuildcache-telemetry.yml index c71616bcd3..08aab2d86c 100644 --- a/eng/pipelines/steps/build-msbuildcache-telemetry.yml +++ b/eng/pipelines/steps/build-msbuildcache-telemetry.yml @@ -18,7 +18,7 @@ steps: } $dotnet = Join-Path $dotnetRoot "dotnet.exe" - git clone --depth 1 --branch dev/janprovaznik/cache-phase-telemetry https://github.com/JanProvaznik/MSBuildCache $source + git clone --filter=blob:none --branch dev/janprovaznik/cache-phase-telemetry https://github.com/JanProvaznik/MSBuildCache $source if ((git -C $source rev-parse HEAD) -ne $commit) { throw "Expected MSBuildCache commit $commit." } From decdcb6a1298fc798367cf21b002b94b04c1def7 Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Thu, 3 Sep 2026 15:25:19 +0200 Subject: [PATCH 13/18] Clone complete telemetry repository Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 065e7e7f-9806-4543-a87b-9079876f2cc1 --- eng/pipelines/steps/build-msbuildcache-telemetry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/steps/build-msbuildcache-telemetry.yml b/eng/pipelines/steps/build-msbuildcache-telemetry.yml index 08aab2d86c..6ffb9f6861 100644 --- a/eng/pipelines/steps/build-msbuildcache-telemetry.yml +++ b/eng/pipelines/steps/build-msbuildcache-telemetry.yml @@ -18,7 +18,7 @@ steps: } $dotnet = Join-Path $dotnetRoot "dotnet.exe" - git clone --filter=blob:none --branch dev/janprovaznik/cache-phase-telemetry https://github.com/JanProvaznik/MSBuildCache $source + git clone --branch dev/janprovaznik/cache-phase-telemetry https://github.com/JanProvaznik/MSBuildCache $source if ((git -C $source rev-parse HEAD) -ne $commit) { throw "Expected MSBuildCache commit $commit." } From cc5b5fbe8eb36078a04716a7217c6c8e71f83fbb Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Thu, 3 Sep 2026 15:30:34 +0200 Subject: [PATCH 14/18] Use compilable telemetry package revision Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 065e7e7f-9806-4543-a87b-9079876f2cc1 --- eng/pipelines/steps/build-msbuildcache-telemetry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/steps/build-msbuildcache-telemetry.yml b/eng/pipelines/steps/build-msbuildcache-telemetry.yml index 6ffb9f6861..f9a12c302c 100644 --- a/eng/pipelines/steps/build-msbuildcache-telemetry.yml +++ b/eng/pipelines/steps/build-msbuildcache-telemetry.yml @@ -9,7 +9,7 @@ steps: $packages = "$(Agent.TempDirectory)\MSBuildCacheTelemetryPackages" $nugetConfig = "$(Agent.TempDirectory)\MSBuildCacheTelemetry.NuGet.config" $version = "0.1.999-phase-telemetry" - $commit = "a29f3f11307f769319f66834585a14bc986eef57" + $commit = "f932734021e47c835f86525f9f5944777030e59c" $dotnetRoot = Get-ChildItem "$(Agent.TempDirectory)" -Directory | Where-Object { Test-Path (Join-Path $_.FullName "sdk\10.0.400") } | Select-Object -First 1 -ExpandProperty FullName From 1c6b9b1f1bc956dd4d84437722c8a4d5fd091d33 Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Thu, 3 Sep 2026 15:36:09 +0200 Subject: [PATCH 15/18] Generate telemetry packages through build Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 065e7e7f-9806-4543-a87b-9079876f2cc1 --- eng/pipelines/steps/build-msbuildcache-telemetry.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/pipelines/steps/build-msbuildcache-telemetry.yml b/eng/pipelines/steps/build-msbuildcache-telemetry.yml index f9a12c302c..648e6b3d49 100644 --- a/eng/pipelines/steps/build-msbuildcache-telemetry.yml +++ b/eng/pipelines/steps/build-msbuildcache-telemetry.yml @@ -57,13 +57,13 @@ steps: if ($LASTEXITCODE -ne 0) { throw "Failed to restore Microsoft.MSBuildCache.AzurePipelines." } - & $dotnet pack $azurePipelinesProject ` + & $dotnet build $azurePipelinesProject ` --no-restore ` --configuration Release ` - --output $packages ` + "-p:PackageOutputPath=$packages" ` "-p:PackageVersion=$version" if ($LASTEXITCODE -ne 0) { - throw "Failed to pack Microsoft.MSBuildCache.AzurePipelines." + throw "Failed to build Microsoft.MSBuildCache.AzurePipelines." } $sharedCompilationProject = "$source\src\SharedCompilation\Microsoft.MSBuildCache.SharedCompilation.csproj" @@ -72,13 +72,13 @@ steps: if ($LASTEXITCODE -ne 0) { throw "Failed to restore Microsoft.MSBuildCache.SharedCompilation." } - & $dotnet pack $sharedCompilationProject ` + & $dotnet build $sharedCompilationProject ` --no-restore ` --configuration Release ` - --output $packages ` + "-p:PackageOutputPath=$packages" ` "-p:PackageVersion=$version" if ($LASTEXITCODE -ne 0) { - throw "Failed to pack Microsoft.MSBuildCache.SharedCompilation." + throw "Failed to build Microsoft.MSBuildCache.SharedCompilation." } Get-ChildItem $packages -Filter *.nupkg | Select-Object Name, Length From cbf9cc7f66d2b6241e03170b7955566d0bb0505e Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Thu, 3 Sep 2026 17:17:34 +0200 Subject: [PATCH 16/18] Run build after skipped cache seed stage Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 065e7e7f-9806-4543-a87b-9079876f2cc1 --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e06249cdc6..52ef5acce9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -302,6 +302,7 @@ stages: - stage: build displayName: Build + condition: in(dependencies.msbuild_cache_seed.result, 'Succeeded', 'SucceededWithIssues', 'Skipped') jobs: # Lightweight job that classifies the PR diff into product, samples, infrastructure-only, From 5a05f8848f3e8f79da3345a0425c9acb93a05644 Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Thu, 3 Sep 2026 19:02:45 +0200 Subject: [PATCH 17/18] Capture cache phase diagnostics in binlogs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 065e7e7f-9806-4543-a87b-9079876f2cc1 --- azure-pipelines.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 52ef5acce9..4c1d19ed64 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -173,7 +173,8 @@ stages: "/reportfileaccesses", "/nr:false", "/t:Build", - "/v:minimal", + "/v:diagnostic", + "/clp:Verbosity=minimal;Summary", "/bl:$binlogDirectory\MSBuildCache.binlog", "/p:Configuration=$(_BuildConfig)", "/p:ContinuousIntegrationBuild=true", @@ -491,7 +492,8 @@ stages: "/reportfileaccesses", "/nr:false", "/t:Build", - "/v:minimal", + "/v:diagnostic", + "/clp:Verbosity=minimal;Summary", "/bl:$binlogDirectory\MSBuildCache.binlog", "/p:Configuration=$(_BuildConfig)", "/p:ContinuousIntegrationBuild=true", From 34a4118ec5838a7a15e2f5e8d2a77c5591dfe062 Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Thu, 3 Sep 2026 19:31:18 +0200 Subject: [PATCH 18/18] Capture phase telemetry without diagnostic build overhead Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 065e7e7f-9806-4543-a87b-9079876f2cc1 --- azure-pipelines.yml | 6 ++---- eng/pipelines/steps/build-msbuildcache-telemetry.yml | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4c1d19ed64..52ef5acce9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -173,8 +173,7 @@ stages: "/reportfileaccesses", "/nr:false", "/t:Build", - "/v:diagnostic", - "/clp:Verbosity=minimal;Summary", + "/v:minimal", "/bl:$binlogDirectory\MSBuildCache.binlog", "/p:Configuration=$(_BuildConfig)", "/p:ContinuousIntegrationBuild=true", @@ -492,8 +491,7 @@ stages: "/reportfileaccesses", "/nr:false", "/t:Build", - "/v:diagnostic", - "/clp:Verbosity=minimal;Summary", + "/v:minimal", "/bl:$binlogDirectory\MSBuildCache.binlog", "/p:Configuration=$(_BuildConfig)", "/p:ContinuousIntegrationBuild=true", diff --git a/eng/pipelines/steps/build-msbuildcache-telemetry.yml b/eng/pipelines/steps/build-msbuildcache-telemetry.yml index 648e6b3d49..4a7386268d 100644 --- a/eng/pipelines/steps/build-msbuildcache-telemetry.yml +++ b/eng/pipelines/steps/build-msbuildcache-telemetry.yml @@ -9,7 +9,7 @@ steps: $packages = "$(Agent.TempDirectory)\MSBuildCacheTelemetryPackages" $nugetConfig = "$(Agent.TempDirectory)\MSBuildCacheTelemetry.NuGet.config" $version = "0.1.999-phase-telemetry" - $commit = "f932734021e47c835f86525f9f5944777030e59c" + $commit = "877701a8d0b2352cd7e70f59d9c146511041ed2e" $dotnetRoot = Get-ChildItem "$(Agent.TempDirectory)" -Directory | Where-Object { Test-Path (Join-Path $_.FullName "sdk\10.0.400") } | Select-Object -First 1 -ExpandProperty FullName