From 364f4ba2045d59760ccd0714fcc08c74b70c9c09 Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Tue, 2 Jun 2026 09:36:45 -0700 Subject: [PATCH 01/36] Upgrade projects to .NET 10 and bump deps Migrate the repository to .NET 10: update TargetFrameworks across many csproj files and switch pipeline UseDotNet tasks and Azure Functions runtime to .NET 10. Bump several package versions (Azure.Identity, Microsoft.Azure.Functions.Worker and related packages, Microsoft.Extensions.*, Microsoft.Azure.Kusto.Data, transitive System.* versions) and add Basic.Reference.Assemblies.Net100 for test/reference support. Adjust test infra and code to support Net10 (add Net10 enum, default AssemblyBuilder framework, Net100 references, and a new TargetFrameworkCollector test). Add defensive parsing and robustness in ApiCatalog (GetMarkup bounds/token checks; PlatformAnnotationContext guards and exception handling) to prevent crashes when encountering malformed data. --- pipelines/build-pipeline.yml | 4 +-- pipelines/build-telemetry.yml | 4 +-- pipelines/gen-catalog.yml | 4 +-- pipelines/gen-design-notes.yml | 4 +-- pipelines/gen-usage-pipeline.yml | 4 +-- pipelines/release-telemetry.yml | 2 +- pipelines/templates/steps-build-planner.yml | 4 +-- pipelines/templates/upload-build-planner.yml | 4 +-- src/Directory.Packages.props | 25 ++++++++++--------- .../DumpMissingNetFxFeatures.csproj | 4 +-- src/DumpPackageList/DumpPackageList.csproj | 4 +-- src/DumpPacks/DumpPacks.csproj | 4 +-- src/GenCatalog/GenCatalog.csproj | 2 +- src/GenDesignNotes/GenDesignNotes.csproj | 4 +-- src/GenUsage/GenUsage.csproj | 4 +-- src/GenUsageNuGet/GenUsageNuGet.csproj | 4 +-- src/GenUsagePlanner/GenUsagePlanner.csproj | 4 +-- .../NetUpgradePlanner.csproj | 4 +-- .../NetUpgradePlannerTelemetry.csproj | 4 +-- ...Terrajobst.ApiCatalog.ActionsRunner.csproj | 4 +-- .../Terrajobst.ApiCatalog.DesignNotes.csproj | 4 +-- .../Terrajobst.ApiCatalog.Generation.csproj | 4 +-- .../Terrajobst.ApiCatalog.SuffixTree.csproj | 4 +-- .../Terrajobst.ApiCatalog.Tests.csproj | 2 +- .../CatalogModel/ApiCatalogModel.cs | 10 ++++++++ .../CatalogModel/PlatformAnnotationContext.cs | 23 ++++++++++++++--- .../Terrajobst.ApiCatalog.csproj | 4 +-- .../Terrajobst.NetUpgradePlanner.Excel.csproj | 2 +- .../Terrajobst.NetUpgradePlanner.csproj | 2 +- ...rajobst.UsageCrawling.Storage.Tests.csproj | 2 +- .../Terrajobst.UsageCrawling.Storage.csproj | 4 +-- .../TargetFrameworkCollectorTests.cs | 6 +++++ ...sesNullableReferenceTypesCollectorTests.cs | 2 +- .../Infra/AssemblyBuilder.cs | 5 ++-- .../Infra/TargetFramework.cs | 1 + .../Terrajobst.UsageCrawling.Tests.csproj | 5 ++-- .../Terrajobst.UsageCrawling.csproj | 2 +- src/apisof.net/apisof.net.csproj | 4 +-- src/apisofdotnet/apisofdotnet.csproj | 4 +-- 39 files changed, 112 insertions(+), 75 deletions(-) diff --git a/pipelines/build-pipeline.yml b/pipelines/build-pipeline.yml index 35daeebe..20709283 100644 --- a/pipelines/build-pipeline.yml +++ b/pipelines/build-pipeline.yml @@ -60,9 +60,9 @@ extends: - task: NuGetAuthenticate@1 displayName: "Authenticate with NuGet feeds" - task: UseDotNet@2 - displayName: Use .NET 8 SDK + displayName: Use .NET 10 SDK inputs: - version: 8.x + version: 10.x includePreviewVersions: true - script: | cd src/apisof.net diff --git a/pipelines/build-telemetry.yml b/pipelines/build-telemetry.yml index bd94cea1..949d6574 100644 --- a/pipelines/build-telemetry.yml +++ b/pipelines/build-telemetry.yml @@ -45,9 +45,9 @@ extends: steps: - checkout: self - task: UseDotNet@2 - displayName: Use .NET 8 SDK + displayName: Use .NET 10 SDK inputs: - version: 8.x + version: 10.x - script: | dotnet publish src/NetUpgradePlannerTelemetry/NetUpgradePlannerTelemetry.csproj -o "$(Build.ArtifactStagingDirectory)/publish" /p:SourceRevisionId=$(Build.SourceVersion) displayName: Publish Function diff --git a/pipelines/gen-catalog.yml b/pipelines/gen-catalog.yml index f28f1b5a..b6dd4ade 100644 --- a/pipelines/gen-catalog.yml +++ b/pipelines/gen-catalog.yml @@ -57,10 +57,10 @@ extends: clean: true fetchDepth: 0 - task: UseDotNet@2 - displayName: "Install .NET 8" + displayName: "Install .NET 10" inputs: packageType: sdk - version: 8.x + version: 10.x - task: NuGetAuthenticate@1 displayName: "NuGet Authenticate" - script: | diff --git a/pipelines/gen-design-notes.yml b/pipelines/gen-design-notes.yml index 1c35f9c8..a8517afe 100644 --- a/pipelines/gen-design-notes.yml +++ b/pipelines/gen-design-notes.yml @@ -61,9 +61,9 @@ extends: steps: - checkout: self - task: UseDotNet@2 - displayName: Use .NET 8 SDK + displayName: Use .NET 10 SDK inputs: - version: 8.x + version: 10.x - task: NugetAuthenticate@1 displayName: Authenticate with NuGet - script: | diff --git a/pipelines/gen-usage-pipeline.yml b/pipelines/gen-usage-pipeline.yml index 97abf4c9..d8f39952 100644 --- a/pipelines/gen-usage-pipeline.yml +++ b/pipelines/gen-usage-pipeline.yml @@ -65,9 +65,9 @@ extends: steps: - checkout: self - task: UseDotNet@2 - displayName: Use .NET 8 SDK + displayName: Use .NET 10 SDK inputs: - version: 8.x + version: 10.x includePreviewVersions: true - task: NuGetAuthenticate@1 displayName: "NuGet Authenticate" diff --git a/pipelines/release-telemetry.yml b/pipelines/release-telemetry.yml index 65e5f52b..11be626a 100644 --- a/pipelines/release-telemetry.yml +++ b/pipelines/release-telemetry.yml @@ -42,7 +42,7 @@ extends: displayName: Deploy Azure Function inputs: connectedServiceNameARM: "$(AzureDevSubscriptionConnection)" - runtimeStack: DOTNET|8.0 + runtimeStack: DOTNET|10.0 appType: functionAppLinux appName: apisofdotnetplanner-dev package: "$(Pipeline.Workspace)/telemetry-drop/telemetry.zip" diff --git a/pipelines/templates/steps-build-planner.yml b/pipelines/templates/steps-build-planner.yml index 80895fc7..fd1caf1e 100644 --- a/pipelines/templates/steps-build-planner.yml +++ b/pipelines/templates/steps-build-planner.yml @@ -6,9 +6,9 @@ steps: - task: NuGetAuthenticate@1 displayName: "NuGet Authenticate" - task: UseDotNet@2 - displayName: "Use .NET 8 SDK" + displayName: "Use .NET 10 SDK" inputs: - version: 8.x + version: 10.x - pwsh: | $ErrorActionPreference = 'Stop' $config = "$(Build.SourcesDirectory)/src/nuget.config" diff --git a/pipelines/templates/upload-build-planner.yml b/pipelines/templates/upload-build-planner.yml index 0c0668dc..3a799f90 100644 --- a/pipelines/templates/upload-build-planner.yml +++ b/pipelines/templates/upload-build-planner.yml @@ -8,9 +8,9 @@ steps: - task: NuGetAuthenticate@1 displayName: "NuGet Authenticate" - task: UseDotNet@2 - displayName: "Use .NET 8" + displayName: "Use .NET 10" inputs: - version: 8.x + version: 10.x - pwsh: | $ErrorActionPreference = 'Stop' $config = "$(Pipeline.Workspace)/velopack-input/nuget.config" diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 9d98822a..a04f94ee 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -5,7 +5,8 @@ - + + @@ -19,18 +20,18 @@ - - - - + + + + - - - - + + + + @@ -46,8 +47,8 @@ - - - + + + \ No newline at end of file diff --git a/src/DumpMissingNetFxFeatures/DumpMissingNetFxFeatures.csproj b/src/DumpMissingNetFxFeatures/DumpMissingNetFxFeatures.csproj index 0240c030..a90d63e5 100644 --- a/src/DumpMissingNetFxFeatures/DumpMissingNetFxFeatures.csproj +++ b/src/DumpMissingNetFxFeatures/DumpMissingNetFxFeatures.csproj @@ -1,8 +1,8 @@ - + Exe - net8.0 + net10.0 enable enable diff --git a/src/DumpPackageList/DumpPackageList.csproj b/src/DumpPackageList/DumpPackageList.csproj index ce19c6e5..ff17ceb8 100644 --- a/src/DumpPackageList/DumpPackageList.csproj +++ b/src/DumpPackageList/DumpPackageList.csproj @@ -1,8 +1,8 @@ - + Exe - net8.0 + net10.0 enable enable diff --git a/src/DumpPacks/DumpPacks.csproj b/src/DumpPacks/DumpPacks.csproj index 806679c2..2e3caa60 100644 --- a/src/DumpPacks/DumpPacks.csproj +++ b/src/DumpPacks/DumpPacks.csproj @@ -1,8 +1,8 @@ - + Exe - net8.0 + net10.0 enable enable diff --git a/src/GenCatalog/GenCatalog.csproj b/src/GenCatalog/GenCatalog.csproj index ea84a025..b2a681da 100644 --- a/src/GenCatalog/GenCatalog.csproj +++ b/src/GenCatalog/GenCatalog.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net10.0 enable enable diff --git a/src/GenDesignNotes/GenDesignNotes.csproj b/src/GenDesignNotes/GenDesignNotes.csproj index e928feac..aa665052 100644 --- a/src/GenDesignNotes/GenDesignNotes.csproj +++ b/src/GenDesignNotes/GenDesignNotes.csproj @@ -1,8 +1,8 @@ - + Exe - net8.0 + net10.0 enable enable diff --git a/src/GenUsage/GenUsage.csproj b/src/GenUsage/GenUsage.csproj index 6c5edd54..590ab648 100644 --- a/src/GenUsage/GenUsage.csproj +++ b/src/GenUsage/GenUsage.csproj @@ -1,8 +1,8 @@ - + Exe - net8.0 + net10.0 enable enable diff --git a/src/GenUsageNuGet/GenUsageNuGet.csproj b/src/GenUsageNuGet/GenUsageNuGet.csproj index dc7315d5..c6ca2067 100644 --- a/src/GenUsageNuGet/GenUsageNuGet.csproj +++ b/src/GenUsageNuGet/GenUsageNuGet.csproj @@ -1,8 +1,8 @@ - + Exe - net8.0 + net10.0 enable enable diff --git a/src/GenUsagePlanner/GenUsagePlanner.csproj b/src/GenUsagePlanner/GenUsagePlanner.csproj index 7acded07..6c6f0ee9 100644 --- a/src/GenUsagePlanner/GenUsagePlanner.csproj +++ b/src/GenUsagePlanner/GenUsagePlanner.csproj @@ -1,8 +1,8 @@ - + Exe - net8.0 + net10.0 enable enable diff --git a/src/NetUpgradePlanner/NetUpgradePlanner.csproj b/src/NetUpgradePlanner/NetUpgradePlanner.csproj index 8185599b..68796f20 100644 --- a/src/NetUpgradePlanner/NetUpgradePlanner.csproj +++ b/src/NetUpgradePlanner/NetUpgradePlanner.csproj @@ -1,8 +1,8 @@ - + WinExe - net8.0-windows + net10.0-windows enable enable true diff --git a/src/NetUpgradePlannerTelemetry/NetUpgradePlannerTelemetry.csproj b/src/NetUpgradePlannerTelemetry/NetUpgradePlannerTelemetry.csproj index 4571495b..6a3ff3f1 100644 --- a/src/NetUpgradePlannerTelemetry/NetUpgradePlannerTelemetry.csproj +++ b/src/NetUpgradePlannerTelemetry/NetUpgradePlannerTelemetry.csproj @@ -1,7 +1,7 @@ - + - net8.0 + net10.0 v4 Exe enable diff --git a/src/Terrajobst.ApiCatalog.ActionsRunner/Terrajobst.ApiCatalog.ActionsRunner.csproj b/src/Terrajobst.ApiCatalog.ActionsRunner/Terrajobst.ApiCatalog.ActionsRunner.csproj index fc567840..1df844c3 100644 --- a/src/Terrajobst.ApiCatalog.ActionsRunner/Terrajobst.ApiCatalog.ActionsRunner.csproj +++ b/src/Terrajobst.ApiCatalog.ActionsRunner/Terrajobst.ApiCatalog.ActionsRunner.csproj @@ -1,7 +1,7 @@ - + - net8.0 + net10.0 enable enable diff --git a/src/Terrajobst.ApiCatalog.DesignNotes/Terrajobst.ApiCatalog.DesignNotes.csproj b/src/Terrajobst.ApiCatalog.DesignNotes/Terrajobst.ApiCatalog.DesignNotes.csproj index c4cc1724..0fbaeacc 100644 --- a/src/Terrajobst.ApiCatalog.DesignNotes/Terrajobst.ApiCatalog.DesignNotes.csproj +++ b/src/Terrajobst.ApiCatalog.DesignNotes/Terrajobst.ApiCatalog.DesignNotes.csproj @@ -1,7 +1,7 @@ - + - net8.0 + net10.0 enable enable Terrajobst.ApiCatalog.ReviewNotes diff --git a/src/Terrajobst.ApiCatalog.Generation/Terrajobst.ApiCatalog.Generation.csproj b/src/Terrajobst.ApiCatalog.Generation/Terrajobst.ApiCatalog.Generation.csproj index 97fa3db4..0e352707 100644 --- a/src/Terrajobst.ApiCatalog.Generation/Terrajobst.ApiCatalog.Generation.csproj +++ b/src/Terrajobst.ApiCatalog.Generation/Terrajobst.ApiCatalog.Generation.csproj @@ -1,7 +1,7 @@ - + - net8.0 + net10.0 enable enable diff --git a/src/Terrajobst.ApiCatalog.SuffixTree/Terrajobst.ApiCatalog.SuffixTree.csproj b/src/Terrajobst.ApiCatalog.SuffixTree/Terrajobst.ApiCatalog.SuffixTree.csproj index a592a625..1a2b23d2 100644 --- a/src/Terrajobst.ApiCatalog.SuffixTree/Terrajobst.ApiCatalog.SuffixTree.csproj +++ b/src/Terrajobst.ApiCatalog.SuffixTree/Terrajobst.ApiCatalog.SuffixTree.csproj @@ -1,7 +1,7 @@ - + - net8.0 + net10.0 enable enable Terrajobst.SuffixTree diff --git a/src/Terrajobst.ApiCatalog.Tests/Terrajobst.ApiCatalog.Tests.csproj b/src/Terrajobst.ApiCatalog.Tests/Terrajobst.ApiCatalog.Tests.csproj index 3f863872..d0508866 100644 --- a/src/Terrajobst.ApiCatalog.Tests/Terrajobst.ApiCatalog.Tests.csproj +++ b/src/Terrajobst.ApiCatalog.Tests/Terrajobst.ApiCatalog.Tests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable enable false diff --git a/src/Terrajobst.ApiCatalog/CatalogModel/ApiCatalogModel.cs b/src/Terrajobst.ApiCatalog/CatalogModel/ApiCatalogModel.cs index d879cd6b..b146da9c 100644 --- a/src/Terrajobst.ApiCatalog/CatalogModel/ApiCatalogModel.cs +++ b/src/Terrajobst.ApiCatalog/CatalogModel/ApiCatalogModel.cs @@ -248,10 +248,20 @@ internal string GetString(int offset) internal Markup GetMarkup(int offset) { + if (offset < 0) + return new Markup(Array.Empty()); + var span = BlobHeap[offset..]; + + if (span.Length < 4) + return new Markup(Array.Empty()); + var tokenCount = BinaryPrimitives.ReadInt32LittleEndian(span); span = span[4..]; + if (tokenCount <= 0) + return new Markup(Array.Empty()); + var tokens = new List(tokenCount); for (var i = 0; i < tokenCount; i++) diff --git a/src/Terrajobst.ApiCatalog/CatalogModel/PlatformAnnotationContext.cs b/src/Terrajobst.ApiCatalog/CatalogModel/PlatformAnnotationContext.cs index 7cb918b9..307960f5 100644 --- a/src/Terrajobst.ApiCatalog/CatalogModel/PlatformAnnotationContext.cs +++ b/src/Terrajobst.ApiCatalog/CatalogModel/PlatformAnnotationContext.cs @@ -99,7 +99,15 @@ private IEnumerable GetKnownPlatforms() var declaration = member.Declarations.FirstOrDefault(d => frameworkAssemblies.Contains(d.Assembly)); if (declaration != default) { - var markup = declaration.GetMyMarkup(); + Markup markup; + try + { + markup = declaration.GetMyMarkup(); + } + catch (ArgumentOutOfRangeException) + { + continue; + } for (var i = 0; i < markup.Tokens.Length - 6; i++) { @@ -117,8 +125,17 @@ private IEnumerable GetKnownPlatforms() t5.Kind == MarkupTokenKind.CloseParenToken && t6.Kind == MarkupTokenKind.CloseBracketToken) { - var literalWithoutQuotes = t4.Text.Substring(1, t4.Text.Length - 2); - var impliedPlatformName = literalWithoutQuotes; + if (string.IsNullOrEmpty(t4.Text) || t4.Text.Length < 2) + continue; + + var impliedPlatformName = t4.Text; + if (impliedPlatformName.Length >= 2 && + impliedPlatformName[0] == '"' && + impliedPlatformName[^1] == '"') + { + impliedPlatformName = impliedPlatformName.Substring(1, impliedPlatformName.Length - 2); + } + yield return (platformName, impliedPlatformName); } } diff --git a/src/Terrajobst.ApiCatalog/Terrajobst.ApiCatalog.csproj b/src/Terrajobst.ApiCatalog/Terrajobst.ApiCatalog.csproj index 28741efe..aa8d0dd2 100644 --- a/src/Terrajobst.ApiCatalog/Terrajobst.ApiCatalog.csproj +++ b/src/Terrajobst.ApiCatalog/Terrajobst.ApiCatalog.csproj @@ -1,7 +1,7 @@ - + - net8.0 + net10.0 enable enable True diff --git a/src/Terrajobst.NetUpgradePlanner.Excel/Terrajobst.NetUpgradePlanner.Excel.csproj b/src/Terrajobst.NetUpgradePlanner.Excel/Terrajobst.NetUpgradePlanner.Excel.csproj index cfa66963..378b18bf 100644 --- a/src/Terrajobst.NetUpgradePlanner.Excel/Terrajobst.NetUpgradePlanner.Excel.csproj +++ b/src/Terrajobst.NetUpgradePlanner.Excel/Terrajobst.NetUpgradePlanner.Excel.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable enable Terrajobst.NetUpgradePlanner diff --git a/src/Terrajobst.NetUpgradePlanner/Terrajobst.NetUpgradePlanner.csproj b/src/Terrajobst.NetUpgradePlanner/Terrajobst.NetUpgradePlanner.csproj index d3a8ba4d..469771c7 100644 --- a/src/Terrajobst.NetUpgradePlanner/Terrajobst.NetUpgradePlanner.csproj +++ b/src/Terrajobst.NetUpgradePlanner/Terrajobst.NetUpgradePlanner.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable enable True diff --git a/src/Terrajobst.UsageCrawling.Storage.Tests/Terrajobst.UsageCrawling.Storage.Tests.csproj b/src/Terrajobst.UsageCrawling.Storage.Tests/Terrajobst.UsageCrawling.Storage.Tests.csproj index c7f24209..7b08e9f8 100644 --- a/src/Terrajobst.UsageCrawling.Storage.Tests/Terrajobst.UsageCrawling.Storage.Tests.csproj +++ b/src/Terrajobst.UsageCrawling.Storage.Tests/Terrajobst.UsageCrawling.Storage.Tests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable enable false diff --git a/src/Terrajobst.UsageCrawling.Storage/Terrajobst.UsageCrawling.Storage.csproj b/src/Terrajobst.UsageCrawling.Storage/Terrajobst.UsageCrawling.Storage.csproj index 54833c84..a1d238e6 100644 --- a/src/Terrajobst.UsageCrawling.Storage/Terrajobst.UsageCrawling.Storage.csproj +++ b/src/Terrajobst.UsageCrawling.Storage/Terrajobst.UsageCrawling.Storage.csproj @@ -1,7 +1,7 @@ - + - net8.0 + net10.0 enable enable diff --git a/src/Terrajobst.UsageCrawling.Tests/Collectors/TargetFrameworkCollectorTests.cs b/src/Terrajobst.UsageCrawling.Tests/Collectors/TargetFrameworkCollectorTests.cs index 809a1129..2b17c6c7 100644 --- a/src/Terrajobst.UsageCrawling.Tests/Collectors/TargetFrameworkCollectorTests.cs +++ b/src/Terrajobst.UsageCrawling.Tests/Collectors/TargetFrameworkCollectorTests.cs @@ -32,6 +32,12 @@ public void TargetFrameworkCollector_Prefers_TargetFramework_Over_References() Check(TargetFramework.Net80, source, [FeatureUsage.ForTargetFramework("net5.1")]); } + + [Fact] + public void TargetFrameworkCollector_Infers_Net100() + { + Check(TargetFramework.Net10, string.Empty, [FeatureUsage.ForTargetFramework("net10.0")]); + } [Fact] public void TargetFrameworkCollector_Infers_NetCoreApp80() diff --git a/src/Terrajobst.UsageCrawling.Tests/Collectors/UsesNullableReferenceTypesCollectorTests.cs b/src/Terrajobst.UsageCrawling.Tests/Collectors/UsesNullableReferenceTypesCollectorTests.cs index 962e2952..533294ba 100644 --- a/src/Terrajobst.UsageCrawling.Tests/Collectors/UsesNullableReferenceTypesCollectorTests.cs +++ b/src/Terrajobst.UsageCrawling.Tests/Collectors/UsesNullableReferenceTypesCollectorTests.cs @@ -78,7 +78,7 @@ public static IEnumerable GetNullableModes() private static CSharpCompilation ApplyNullableMode(CSharpCompilation compilation, NullableMode mode) { var references = mode == NullableMode.ReferencedFrameworkTypes - ? Net80.References.All + ? Net100.References.All : NetStandard20.References.All; return compilation.WithReferences(references); diff --git a/src/Terrajobst.UsageCrawling.Tests/Infra/AssemblyBuilder.cs b/src/Terrajobst.UsageCrawling.Tests/Infra/AssemblyBuilder.cs index 4fefcd4b..213f3751 100644 --- a/src/Terrajobst.UsageCrawling.Tests/Infra/AssemblyBuilder.cs +++ b/src/Terrajobst.UsageCrawling.Tests/Infra/AssemblyBuilder.cs @@ -14,7 +14,7 @@ public sealed class AssemblyBuilder public AssemblyBuilder SetAssembly( string source, - TargetFramework framework = TargetFramework.Net80, + TargetFramework framework = TargetFramework.Net10, Func? transformer = null ) { @@ -27,7 +27,7 @@ public AssemblyBuilder SetAssembly( return this; } - public AssemblyBuilder AddDependency(string source, TargetFramework framework = TargetFramework.Net80) + public AssemblyBuilder AddDependency(string source, TargetFramework framework = TargetFramework.Net10) { var compilation = CreateCompilation(source, framework); _dependencies.Add(compilation); @@ -74,6 +74,7 @@ private static IEnumerable GetReferences(TargetFramework fram { return framework switch { + TargetFramework.Net10 => Net100.References.All, TargetFramework.Net80 => Net80.References.All, TargetFramework.Net472 => Net472.References.All, TargetFramework.NetStandard20 => NetStandard20.References.All, diff --git a/src/Terrajobst.UsageCrawling.Tests/Infra/TargetFramework.cs b/src/Terrajobst.UsageCrawling.Tests/Infra/TargetFramework.cs index cc816502..ee6df7ff 100644 --- a/src/Terrajobst.UsageCrawling.Tests/Infra/TargetFramework.cs +++ b/src/Terrajobst.UsageCrawling.Tests/Infra/TargetFramework.cs @@ -2,6 +2,7 @@ public enum TargetFramework { + Net10, Net80, Net472, NetStandard20, diff --git a/src/Terrajobst.UsageCrawling.Tests/Terrajobst.UsageCrawling.Tests.csproj b/src/Terrajobst.UsageCrawling.Tests/Terrajobst.UsageCrawling.Tests.csproj index cb16a6fb..d5b6a559 100644 --- a/src/Terrajobst.UsageCrawling.Tests/Terrajobst.UsageCrawling.Tests.csproj +++ b/src/Terrajobst.UsageCrawling.Tests/Terrajobst.UsageCrawling.Tests.csproj @@ -1,7 +1,7 @@ - + - net8.0 + net10.0 enable enable false @@ -10,6 +10,7 @@ + diff --git a/src/Terrajobst.UsageCrawling/Terrajobst.UsageCrawling.csproj b/src/Terrajobst.UsageCrawling/Terrajobst.UsageCrawling.csproj index 42e1a646..fc42b954 100644 --- a/src/Terrajobst.UsageCrawling/Terrajobst.UsageCrawling.csproj +++ b/src/Terrajobst.UsageCrawling/Terrajobst.UsageCrawling.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable enable True diff --git a/src/apisof.net/apisof.net.csproj b/src/apisof.net/apisof.net.csproj index 09098b9f..83942d56 100644 --- a/src/apisof.net/apisof.net.csproj +++ b/src/apisof.net/apisof.net.csproj @@ -1,7 +1,7 @@ - + - net8.0 + net10.0 enable enable ApisOfDotNet diff --git a/src/apisofdotnet/apisofdotnet.csproj b/src/apisofdotnet/apisofdotnet.csproj index d3f5f23a..c29b46c3 100644 --- a/src/apisofdotnet/apisofdotnet.csproj +++ b/src/apisofdotnet/apisofdotnet.csproj @@ -1,8 +1,8 @@ - + Exe - net8.0 + net10.0 enable enable From d58917ac72b49f58488730121bddd3f02a95ce25 Mon Sep 17 00:00:00 2001 From: Dan Zhu <33338258+danzhu54@users.noreply.github.com> Date: Wed, 3 Jun 2026 09:52:35 -0700 Subject: [PATCH 02/36] Restore original implied-platform parsing in PlatformAnnotationContext GetMarkup now honors the negative-offset "no markup" sentinel and no longer throws, so the ArgumentOutOfRangeException try/catch is removed to restore the original control flow. Quote stripping is restored to the original semantics via an UnquoteLiteral helper that strips surrounding quotes for the expected "platform" literal form, while guarding the degenerate short/unquoted case that the old Substring(1, Length - 2) could not handle. --- .../CatalogModel/PlatformAnnotationContext.cs | 37 ++++++++----------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/src/Terrajobst.ApiCatalog/CatalogModel/PlatformAnnotationContext.cs b/src/Terrajobst.ApiCatalog/CatalogModel/PlatformAnnotationContext.cs index 307960f5..0ac48180 100644 --- a/src/Terrajobst.ApiCatalog/CatalogModel/PlatformAnnotationContext.cs +++ b/src/Terrajobst.ApiCatalog/CatalogModel/PlatformAnnotationContext.cs @@ -99,15 +99,7 @@ private IEnumerable GetKnownPlatforms() var declaration = member.Declarations.FirstOrDefault(d => frameworkAssemblies.Contains(d.Assembly)); if (declaration != default) { - Markup markup; - try - { - markup = declaration.GetMyMarkup(); - } - catch (ArgumentOutOfRangeException) - { - continue; - } + var markup = declaration.GetMyMarkup(); for (var i = 0; i < markup.Tokens.Length - 6; i++) { @@ -125,17 +117,7 @@ private IEnumerable GetKnownPlatforms() t5.Kind == MarkupTokenKind.CloseParenToken && t6.Kind == MarkupTokenKind.CloseBracketToken) { - if (string.IsNullOrEmpty(t4.Text) || t4.Text.Length < 2) - continue; - - var impliedPlatformName = t4.Text; - if (impliedPlatformName.Length >= 2 && - impliedPlatformName[0] == '"' && - impliedPlatformName[^1] == '"') - { - impliedPlatformName = impliedPlatformName.Substring(1, impliedPlatformName.Length - 2); - } - + var impliedPlatformName = UnquoteLiteral(t4.Text); yield return (platformName, impliedPlatformName); } } @@ -145,6 +127,19 @@ private IEnumerable GetKnownPlatforms() } } + private static string UnquoteLiteral(string text) + { + // LiteralString tokens are stored as C# string literals (e.g. "windows"). + // Strip the surrounding quotes to recover the platform name. The guard keeps + // the original behavior for the expected quoted form while avoiding the + // out-of-range trim the old Substring(1, Length - 2) performed on + // unexpectedly short or unquoted text. + if (text.Length >= 2 && text[0] == '"' && text[^1] == '"') + return text.Substring(1, text.Length - 2); + + return text; + } + private static bool TryGetPlatformFromIsPlatformMethod(ApiModel operatingSystemMember, [MaybeNullWhen(false)] out string platformName) { const string prefix = "Is"; @@ -280,4 +275,4 @@ public static (string Name, Version Version) ParsePlatform(string nameAndVersion var framework = NuGetFramework.Parse("net5.0-" + nameAndVersion); return (framework.Platform, framework.PlatformVersion); } -} \ No newline at end of file +} From 9ce3d6ead10e9d3e031c9f5d41bff63cbab1d242 Mon Sep 17 00:00:00 2001 From: Dan Zhu <33338258+danzhu54@users.noreply.github.com> Date: Wed, 3 Jun 2026 09:59:02 -0700 Subject: [PATCH 03/36] Restore original GetMarkup semantics; keep only the negative-offset sentinel A negative markup offset is the existing "no markup" sentinel in this blob format (same convention used for absent ReferenceTokens). Some declarations legitimately have no markup, so honor that sentinel and return an empty markup. Removes the span.Length < 4 and tokenCount <= 0 guards, which silently masked genuine catalog corruption and changed behavior for valid data. This keeps the only required .NET 10 adaptation (tolerating the no-markup sentinel) while preserving the original behavior for all valid catalog data. --- .../CatalogModel/ApiCatalogModel.cs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/Terrajobst.ApiCatalog/CatalogModel/ApiCatalogModel.cs b/src/Terrajobst.ApiCatalog/CatalogModel/ApiCatalogModel.cs index b146da9c..b2aaddc5 100644 --- a/src/Terrajobst.ApiCatalog/CatalogModel/ApiCatalogModel.cs +++ b/src/Terrajobst.ApiCatalog/CatalogModel/ApiCatalogModel.cs @@ -248,20 +248,17 @@ internal string GetString(int offset) internal Markup GetMarkup(int offset) { + // A negative offset is the sentinel for "no markup" -- the same convention + // used for absent references in this blob format (see the ReferenceToken + // handling below). Some declarations legitimately have no markup, so return + // an empty markup instead of indexing past the heap and throwing. if (offset < 0) return new Markup(Array.Empty()); var span = BlobHeap[offset..]; - - if (span.Length < 4) - return new Markup(Array.Empty()); - var tokenCount = BinaryPrimitives.ReadInt32LittleEndian(span); span = span[4..]; - if (tokenCount <= 0) - return new Markup(Array.Empty()); - var tokens = new List(tokenCount); for (var i = 0; i < tokenCount; i++) @@ -997,4 +994,4 @@ void IDisposable.Dispose() { } } -} \ No newline at end of file +} From e5ad2eaa07b4e0fd27e053a8f67c0215d37d7372 Mon Sep 17 00:00:00 2001 From: Dan Zhu Date: Wed, 3 Jun 2026 10:26:45 -0700 Subject: [PATCH 04/36] Address warnings --- src/NetUpgradePlanner/App.manifest | 1 - src/NetUpgradePlanner/NetUpgradePlanner.csproj | 1 + .../Collectors/IncrementalUsageCollector.cs | 2 -- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/NetUpgradePlanner/App.manifest b/src/NetUpgradePlanner/App.manifest index 82254ecd..4bc59aee 100644 --- a/src/NetUpgradePlanner/App.manifest +++ b/src/NetUpgradePlanner/App.manifest @@ -41,7 +41,6 @@ - true true diff --git a/src/NetUpgradePlanner/NetUpgradePlanner.csproj b/src/NetUpgradePlanner/NetUpgradePlanner.csproj index 68796f20..8869697d 100644 --- a/src/NetUpgradePlanner/NetUpgradePlanner.csproj +++ b/src/NetUpgradePlanner/NetUpgradePlanner.csproj @@ -9,6 +9,7 @@ true NetUpgradePlanner.ico App.manifest + PerMonitorV2 .NET Upgrade Planner $(Product) WFAC010 diff --git a/src/Terrajobst.UsageCrawling/Collectors/IncrementalUsageCollector.cs b/src/Terrajobst.UsageCrawling/Collectors/IncrementalUsageCollector.cs index 8b0361a8..6a633ab8 100644 --- a/src/Terrajobst.UsageCrawling/Collectors/IncrementalUsageCollector.cs +++ b/src/Terrajobst.UsageCrawling/Collectors/IncrementalUsageCollector.cs @@ -35,8 +35,6 @@ internal Context(HashSet receiver) public void Report(FeatureUsage feature) { - ThrowIfNull(feature); - _receiver.Add(feature); } } From 262e85a3514872d2bb515accb602a7dc9169a329 Mon Sep 17 00:00:00 2001 From: Dan Zhu Date: Wed, 3 Jun 2026 15:37:03 -0700 Subject: [PATCH 05/36] Add .NET 10 installation steps to pipeline templates --- pipelines/release-gen-design-notes-pipeline.yml | 12 ++++++++++++ pipelines/templates/steps-gen-catalog-run.yml | 6 ++++++ pipelines/templates/steps-gen-usage.yml | 7 +++++++ 3 files changed, 25 insertions(+) diff --git a/pipelines/release-gen-design-notes-pipeline.yml b/pipelines/release-gen-design-notes-pipeline.yml index 0bedad51..de194663 100644 --- a/pipelines/release-gen-design-notes-pipeline.yml +++ b/pipelines/release-gen-design-notes-pipeline.yml @@ -48,6 +48,12 @@ extends: artifactName: "gen-design-notes-drop" targetPath: "$(Pipeline.Workspace)/gen-design-notes-drop" steps: + - task: UseDotNet@2 + displayName: "Install .NET 10" + inputs: + packageType: runtime + version: 10.x + includePreviewVersions: true - task: AzureCLI@2 displayName: "Upload GenDesignNotes Dev" inputs: @@ -78,6 +84,12 @@ extends: artifactName: "gen-design-notes-drop" targetPath: "$(Pipeline.Workspace)/gen-design-notes-drop" steps: + - task: UseDotNet@2 + displayName: "Install .NET 10" + inputs: + packageType: runtime + version: 10.x + includePreviewVersions: true - task: AzureCLI@2 displayName: "Run GenDesignNotes (Prod)" inputs: diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index 6e29c257..8e477b44 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -5,6 +5,12 @@ parameters: steps: - task: NugetAuthenticate@1 displayName: "Authenticate with NuGet feed" + - task: UseDotNet@2 + displayName: "Install .NET 10" + inputs: + packageType: runtime + version: 10.x + includePreviewVersions: true - task: AzureCLI@2 displayName: "Run GenCatalog" timeoutInMinutes: 0 diff --git a/pipelines/templates/steps-gen-usage.yml b/pipelines/templates/steps-gen-usage.yml index d4676e96..5b85613b 100644 --- a/pipelines/templates/steps-gen-usage.yml +++ b/pipelines/templates/steps-gen-usage.yml @@ -34,6 +34,13 @@ steps: - task: NuGetAuthenticate@1 displayName: "Authenticate with NuGet feed" + - task: UseDotNet@2 + displayName: "Install .NET 10" + inputs: + packageType: runtime + version: 10.x + includePreviewVersions: true + - ${{ each tool in parameters.Tools }}: - task: AzureCLI@2 displayName: "Run ${{ tool.name }} (${{ parameters.BuildType }})" From b4b88f5e897a3a7df0c9e7b1c79a85e19d4401da Mon Sep 17 00:00:00 2001 From: Dan Zhu Date: Wed, 3 Jun 2026 15:46:51 -0700 Subject: [PATCH 06/36] Add installation path for dotnet --- pipelines/release-gen-design-notes-pipeline.yml | 8 ++++++-- pipelines/templates/steps-gen-catalog-run.yml | 4 +++- pipelines/templates/steps-gen-usage.yml | 4 +++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pipelines/release-gen-design-notes-pipeline.yml b/pipelines/release-gen-design-notes-pipeline.yml index de194663..4819a2fb 100644 --- a/pipelines/release-gen-design-notes-pipeline.yml +++ b/pipelines/release-gen-design-notes-pipeline.yml @@ -54,6 +54,7 @@ extends: packageType: runtime version: 10.x includePreviewVersions: true + installationPath: $(Agent.ToolsDirectory)/dotnet - task: AzureCLI@2 displayName: "Upload GenDesignNotes Dev" inputs: @@ -63,10 +64,11 @@ extends: addSpnToEnvironment: true inlineScript: | Set-Location "$(Pipeline.Workspace)/gen-design-notes-drop" - dotnet GenDesignNotes.dll + & "$(Agent.ToolsDirectory)/dotnet/dotnet.exe" GenDesignNotes.dll env: AzureStorageServiceUrl: $(AzureStorageServiceUrlDev) ApisOfDotNetWebHookSecret: $(ApisOfDotNetWebHookSecretDev) + DOTNET_ROOT: $(Agent.ToolsDirectory)/dotnet - stage: Production displayName: Run in Production @@ -90,6 +92,7 @@ extends: packageType: runtime version: 10.x includePreviewVersions: true + installationPath: $(Agent.ToolsDirectory)/dotnet - task: AzureCLI@2 displayName: "Run GenDesignNotes (Prod)" inputs: @@ -99,7 +102,8 @@ extends: addSpnToEnvironment: true inlineScript: | Set-Location "$(Pipeline.Workspace)/gen-design-notes-drop" - dotnet GenDesignNotes.dll + & "$(Agent.ToolsDirectory)/dotnet/dotnet.exe" GenDesignNotes.dll env: AzureStorageServiceUrl: $(AzureStorageServiceUrlProd) ApisOfDotNetWebHookSecret: $(ApisOfDotNetWebHookSecretProd) + DOTNET_ROOT: $(Agent.ToolsDirectory)/dotnet diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index 8e477b44..3ea0241e 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -11,6 +11,7 @@ steps: packageType: runtime version: 10.x includePreviewVersions: true + installationPath: $(Agent.ToolsDirectory)/dotnet - task: AzureCLI@2 displayName: "Run GenCatalog" timeoutInMinutes: 0 @@ -30,11 +31,12 @@ steps: New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packs" | Out-Null New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packages" | Out-Null - dotnet "$(Pipeline.Workspace)/gen-catalog-drop/publish-gen-catalog/GenCatalog.dll" + & "$(Agent.ToolsDirectory)/dotnet/dotnet.exe" "$(Pipeline.Workspace)/gen-catalog-drop/publish-gen-catalog/GenCatalog.dll" env: AzureStorageServiceUrl: $(AzureStorageServiceUrl) ApisOfDotNetWebHookSecret: $(ApisOfDotNetWebHookSecret) APISOFDOTNET_INDEX_PATH: $(Pipeline.Workspace)/catalog + DOTNET_ROOT: $(Agent.ToolsDirectory)/dotnet DOTNET_gcServer: 0 DOTNET_GCConserveMemory: 9 DOTNET_GCHeapHardLimitPercent: 75 diff --git a/pipelines/templates/steps-gen-usage.yml b/pipelines/templates/steps-gen-usage.yml index 5b85613b..42d883b5 100644 --- a/pipelines/templates/steps-gen-usage.yml +++ b/pipelines/templates/steps-gen-usage.yml @@ -40,6 +40,7 @@ steps: packageType: runtime version: 10.x includePreviewVersions: true + installationPath: $(Agent.ToolsDirectory)/dotnet - ${{ each tool in parameters.Tools }}: - task: AzureCLI@2 @@ -50,9 +51,10 @@ steps: scriptType: "bash" scriptLocation: "inlineScript" inlineScript: | - dotnet "$(Pipeline.Workspace)/gen-usage-drop/${{ tool.publishDir }}/${{ tool.dll }}" ${{ tool.args }} + "$(Agent.ToolsDirectory)/dotnet/dotnet" "$(Pipeline.Workspace)/gen-usage-drop/${{ tool.publishDir }}/${{ tool.dll }}" ${{ tool.args }} env: AzureStorageServiceUrl: $(AzureStorageServiceUrl) ApisOfDotNetWebHookSecret: $(ApisOfDotNetWebHookSecret) + DOTNET_ROOT: $(Agent.ToolsDirectory)/dotnet ${{ each pair in tool.env }}: ${{ pair.key }}: ${{ pair.value }} From 9ae042738ab1fcdf8e554de9088f6c5b47a18854 Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Wed, 17 Jun 2026 16:20:01 -0700 Subject: [PATCH 07/36] checking path --- pipelines/templates/steps-gen-catalog-run.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index 3ea0241e..ce1d5b7f 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -25,7 +25,8 @@ steps: if (Test-Path $env:APISOFDOTNET_INDEX_PATH) { Remove-Item -Recurse -Force $env:APISOFDOTNET_INDEX_PATH } - + Write-Host $env:AGENT_TOOLSDIRECTORY + New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/index" | Out-Null New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/frameworks" | Out-Null New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packs" | Out-Null From ecd45906554475df91bd59e68fabd3331d040277 Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Wed, 17 Jun 2026 16:41:52 -0700 Subject: [PATCH 08/36] Update steps-gen-usage.yml --- pipelines/templates/steps-gen-usage.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pipelines/templates/steps-gen-usage.yml b/pipelines/templates/steps-gen-usage.yml index 42d883b5..aba0de1f 100644 --- a/pipelines/templates/steps-gen-usage.yml +++ b/pipelines/templates/steps-gen-usage.yml @@ -40,7 +40,7 @@ steps: packageType: runtime version: 10.x includePreviewVersions: true - installationPath: $(Agent.ToolsDirectory)/dotnet + installationPath: $(Agent.ToolsDirectory)\dotnet - ${{ each tool in parameters.Tools }}: - task: AzureCLI@2 @@ -51,10 +51,10 @@ steps: scriptType: "bash" scriptLocation: "inlineScript" inlineScript: | - "$(Agent.ToolsDirectory)/dotnet/dotnet" "$(Pipeline.Workspace)/gen-usage-drop/${{ tool.publishDir }}/${{ tool.dll }}" ${{ tool.args }} + "$(Agent.ToolsDirectory)\dotnet\dotnet" "$(Pipeline.Workspace)/gen-usage-drop/${{ tool.publishDir }}/${{ tool.dll }}" ${{ tool.args }} env: AzureStorageServiceUrl: $(AzureStorageServiceUrl) ApisOfDotNetWebHookSecret: $(ApisOfDotNetWebHookSecret) - DOTNET_ROOT: $(Agent.ToolsDirectory)/dotnet + DOTNET_ROOT: $(Agent.ToolsDirectory)\dotnet ${{ each pair in tool.env }}: ${{ pair.key }}: ${{ pair.value }} From 5193ae2d6e34d3225d97224b48acbc55f8aae803 Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Wed, 17 Jun 2026 16:54:37 -0700 Subject: [PATCH 09/36] Update steps-gen-catalog-run.yml --- pipelines/templates/steps-gen-catalog-run.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index ce1d5b7f..c7ecfcc2 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -32,7 +32,17 @@ steps: New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packs" | Out-Null New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packages" | Out-Null - & "$(Agent.ToolsDirectory)/dotnet/dotnet.exe" "$(Pipeline.Workspace)/gen-catalog-drop/publish-gen-catalog/GenCatalog.dll" + $dotnetExe = Join-Path $env:DOTNET_ROOT "dotnet.exe" + if (-not (Test-Path $dotnetExe)) { + Write-Host "dotnet executable not found at '$dotnetExe'. Attempting to locate dotnet on PATH." + $dotnetCmd = Get-Command dotnet -ErrorAction SilentlyContinue + if ($null -eq $dotnetCmd) { + throw "Unable to locate dotnet. DOTNET_ROOT='$env:DOTNET_ROOT'." + } + $dotnetExe = $dotnetCmd.Source + } + + & $dotnetExe "$(Pipeline.Workspace)/gen-catalog-drop/publish-gen-catalog/GenCatalog.dll" env: AzureStorageServiceUrl: $(AzureStorageServiceUrl) ApisOfDotNetWebHookSecret: $(ApisOfDotNetWebHookSecret) From 426ae05dbccc97d9b4638ce435064ffe670e7db0 Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 07:29:47 -0700 Subject: [PATCH 10/36] Update steps-gen-catalog-run.yml --- pipelines/templates/steps-gen-catalog-run.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index c7ecfcc2..7988193d 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -11,7 +11,6 @@ steps: packageType: runtime version: 10.x includePreviewVersions: true - installationPath: $(Agent.ToolsDirectory)/dotnet - task: AzureCLI@2 displayName: "Run GenCatalog" timeoutInMinutes: 0 @@ -32,22 +31,15 @@ steps: New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packs" | Out-Null New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packages" | Out-Null - $dotnetExe = Join-Path $env:DOTNET_ROOT "dotnet.exe" - if (-not (Test-Path $dotnetExe)) { - Write-Host "dotnet executable not found at '$dotnetExe'. Attempting to locate dotnet on PATH." - $dotnetCmd = Get-Command dotnet -ErrorAction SilentlyContinue - if ($null -eq $dotnetCmd) { - throw "Unable to locate dotnet. DOTNET_ROOT='$env:DOTNET_ROOT'." - } - $dotnetExe = $dotnetCmd.Source + $dotnetCmd = Get-Command dotnet -ErrorAction SilentlyContinue + if ($null -eq $dotnetCmd) { + throw "Unable to locate dotnet. Ensure UseDotNet@2 task has run successfully." } - - & $dotnetExe "$(Pipeline.Workspace)/gen-catalog-drop/publish-gen-catalog/GenCatalog.dll" + & $dotnetCmd.Source "$(Pipeline.Workspace)/gen-catalog-drop/publish-gen-catalog/GenCatalog.dll" env: AzureStorageServiceUrl: $(AzureStorageServiceUrl) ApisOfDotNetWebHookSecret: $(ApisOfDotNetWebHookSecret) APISOFDOTNET_INDEX_PATH: $(Pipeline.Workspace)/catalog - DOTNET_ROOT: $(Agent.ToolsDirectory)/dotnet DOTNET_gcServer: 0 DOTNET_GCConserveMemory: 9 DOTNET_GCHeapHardLimitPercent: 75 From c1a53e29f0d95622750089b20e987398c12c9dd4 Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 08:50:20 -0700 Subject: [PATCH 11/36] checking dotnet tool install path --- pipelines/templates/steps-gen-catalog-run.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index 7988193d..3574e4bb 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -25,6 +25,7 @@ steps: Remove-Item -Recurse -Force $env:APISOFDOTNET_INDEX_PATH } Write-Host $env:AGENT_TOOLSDIRECTORY + Get-ChildItem -Recurse "$(Agent.ToolsDirectory)" -Filter dotnet.exe New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/index" | Out-Null New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/frameworks" | Out-Null From 3e818338753c53ece826221cdee9bd283ce50eeb Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 09:40:49 -0700 Subject: [PATCH 12/36] Update steps-gen-catalog-run.yml --- pipelines/templates/steps-gen-catalog-run.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index 3574e4bb..8d13dc78 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -24,19 +24,18 @@ steps: if (Test-Path $env:APISOFDOTNET_INDEX_PATH) { Remove-Item -Recurse -Force $env:APISOFDOTNET_INDEX_PATH } - Write-Host $env:AGENT_TOOLSDIRECTORY - Get-ChildItem -Recurse "$(Agent.ToolsDirectory)" -Filter dotnet.exe + New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/index" | Out-Null New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/frameworks" | Out-Null New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packs" | Out-Null New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packages" | Out-Null - $dotnetCmd = Get-Command dotnet -ErrorAction SilentlyContinue - if ($null -eq $dotnetCmd) { - throw "Unable to locate dotnet. Ensure UseDotNet@2 task has run successfully." - } - & $dotnetCmd.Source "$(Pipeline.Workspace)/gen-catalog-drop/publish-gen-catalog/GenCatalog.dll" + $dotnet = "$(Agent.ToolsDirectory)\dotnet\dotnet.exe" + + & $dotnet --list-runtimes + + & $dotnet "$(Pipeline.Workspace)/gen-catalog-drop/publish-gen-catalog/GenCatalog.dll" env: AzureStorageServiceUrl: $(AzureStorageServiceUrl) ApisOfDotNetWebHookSecret: $(ApisOfDotNetWebHookSecret) From c88176df266505c5f05e6db28efab17444c26f9e Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 09:49:52 -0700 Subject: [PATCH 13/36] Update steps-gen-catalog-run.yml --- pipelines/templates/steps-gen-catalog-run.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index 8d13dc78..d7a11bb3 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -11,6 +11,7 @@ steps: packageType: runtime version: 10.x includePreviewVersions: true + installationPath: $(Agent.ToolsDirectory)\dotnet - task: AzureCLI@2 displayName: "Run GenCatalog" timeoutInMinutes: 0 @@ -20,6 +21,9 @@ steps: scriptLocation: "inlineScript" addSpnToEnvironment: true inlineScript: | + $env:DOTNET_ROOT = "$(Agent.ToolsDirectory)\dotnet" + $env:PATH = "$env:DOTNET_ROOT;$env:PATH" + $env:APISOFDOTNET_INDEX_PATH = "$(Pipeline.Workspace)/catalog" if (Test-Path $env:APISOFDOTNET_INDEX_PATH) { Remove-Item -Recurse -Force $env:APISOFDOTNET_INDEX_PATH @@ -40,6 +44,7 @@ steps: AzureStorageServiceUrl: $(AzureStorageServiceUrl) ApisOfDotNetWebHookSecret: $(ApisOfDotNetWebHookSecret) APISOFDOTNET_INDEX_PATH: $(Pipeline.Workspace)/catalog + DOTNET_ROOT: $(Agent.ToolsDirectory)\dotnet DOTNET_gcServer: 0 DOTNET_GCConserveMemory: 9 DOTNET_GCHeapHardLimitPercent: 75 From 1f27cc651162fc336845436b337fc1a0d7292728 Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 10:08:32 -0700 Subject: [PATCH 14/36] Update steps-gen-catalog-run.yml --- pipelines/templates/steps-gen-catalog-run.yml | 41 ++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index d7a11bb3..c1f982f5 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -24,6 +24,35 @@ steps: $env:DOTNET_ROOT = "$(Agent.ToolsDirectory)\dotnet" $env:PATH = "$env:DOTNET_ROOT;$env:PATH" + Write-Host "=== .NET Runtime Diagnostics ===" + Write-Host "Agent.ToolsDirectory: $(Agent.ToolsDirectory)" + Write-Host "DOTNET_ROOT: $env:DOTNET_ROOT" + Write-Host "PATH (first 8 entries):" + ($env:PATH -split ';' | Select-Object -First 8) | ForEach-Object { Write-Host " $_" } + + Write-Host "Checking DOTNET_ROOT existence..." + if (Test-Path $env:DOTNET_ROOT) { + Write-Host "DOTNET_ROOT exists" + Write-Host "Top-level contents of DOTNET_ROOT:" + Get-ChildItem -Path $env:DOTNET_ROOT -Force -ErrorAction SilentlyContinue | Select-Object Mode,Length,Name | Format-Table -AutoSize | Out-String | Write-Host + } + else { + Write-Host "DOTNET_ROOT does not exist" + } + + Write-Host "Searching ToolCache for dotnet.exe..." + Get-ChildItem -Path "$(Agent.ToolsDirectory)" -Filter dotnet.exe -Recurse -ErrorAction SilentlyContinue | + Select-Object -First 20 FullName | + Format-Table -AutoSize | + Out-String | + Write-Host + + Write-Host "where.exe dotnet:" + & where.exe dotnet 2>&1 | Out-String | Write-Host + + Write-Host "Get-Command dotnet:" + Get-Command dotnet -ErrorAction SilentlyContinue | Select-Object Name,Source,Version | Format-Table -AutoSize | Out-String | Write-Host + $env:APISOFDOTNET_INDEX_PATH = "$(Pipeline.Workspace)/catalog" if (Test-Path $env:APISOFDOTNET_INDEX_PATH) { Remove-Item -Recurse -Force $env:APISOFDOTNET_INDEX_PATH @@ -35,7 +64,17 @@ steps: New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packs" | Out-Null New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packages" | Out-Null - $dotnet = "$(Agent.ToolsDirectory)\dotnet\dotnet.exe" + $dotnet = Join-Path $env:DOTNET_ROOT "dotnet.exe" + if (-not (Test-Path $dotnet)) { + $dotnetCommand = Get-Command dotnet -ErrorAction SilentlyContinue + if ($dotnetCommand) { + $dotnet = $dotnetCommand.Source + } + } + + if (-not (Test-Path $dotnet)) { + throw "dotnet.exe was not found. DOTNET_ROOT='$env:DOTNET_ROOT' PATH='$env:PATH'" + } & $dotnet --list-runtimes From 5df8f52f99ba39a36d16ab245929751254ca24eb Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 10:24:33 -0700 Subject: [PATCH 15/36] Update steps-gen-catalog-run.yml --- pipelines/templates/steps-gen-catalog-run.yml | 36 ++++++++++++++----- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index c1f982f5..3b15c6bd 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -21,12 +21,38 @@ steps: scriptLocation: "inlineScript" addSpnToEnvironment: true inlineScript: | - $env:DOTNET_ROOT = "$(Agent.ToolsDirectory)\dotnet" + $dotnetRootCandidates = @( + "$(Agent.ToolsDirectory)\dotnet", + "$(Agent.ToolsDirectory)\dotnet\x64" + ) + + $dotnet = $null + foreach ($candidateRoot in $dotnetRootCandidates) { + $candidateExe = Join-Path $candidateRoot "dotnet.exe" + if (Test-Path $candidateExe) { + $dotnet = $candidateExe + break + } + } + + if (-not $dotnet) { + $dotnet = Get-ChildItem -Path "$(Agent.ToolsDirectory)\dotnet" -Filter dotnet.exe -Recurse -ErrorAction SilentlyContinue | + Select-Object -First 1 -ExpandProperty FullName + } + + if (-not $dotnet) { + throw "dotnet.exe was not found under '$(Agent.ToolsDirectory)\\dotnet' after UseDotNet runtime install." + } + + $env:DOTNET_ROOT = Split-Path -Path $dotnet -Parent + $env:DOTNET_MULTILEVEL_LOOKUP = "0" $env:PATH = "$env:DOTNET_ROOT;$env:PATH" Write-Host "=== .NET Runtime Diagnostics ===" Write-Host "Agent.ToolsDirectory: $(Agent.ToolsDirectory)" + Write-Host "Resolved dotnet: $dotnet" Write-Host "DOTNET_ROOT: $env:DOTNET_ROOT" + Write-Host "DOTNET_MULTILEVEL_LOOKUP: $env:DOTNET_MULTILEVEL_LOOKUP" Write-Host "PATH (first 8 entries):" ($env:PATH -split ';' | Select-Object -First 8) | ForEach-Object { Write-Host " $_" } @@ -64,14 +90,6 @@ steps: New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packs" | Out-Null New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packages" | Out-Null - $dotnet = Join-Path $env:DOTNET_ROOT "dotnet.exe" - if (-not (Test-Path $dotnet)) { - $dotnetCommand = Get-Command dotnet -ErrorAction SilentlyContinue - if ($dotnetCommand) { - $dotnet = $dotnetCommand.Source - } - } - if (-not (Test-Path $dotnet)) { throw "dotnet.exe was not found. DOTNET_ROOT='$env:DOTNET_ROOT' PATH='$env:PATH'" } From eaa19e98969c7450a98eb8b042cbcf1e1e1493ee Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 10:37:33 -0700 Subject: [PATCH 16/36] Update steps-gen-catalog-run.yml --- pipelines/templates/steps-gen-catalog-run.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index 3b15c6bd..f3a2599b 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -11,7 +11,6 @@ steps: packageType: runtime version: 10.x includePreviewVersions: true - installationPath: $(Agent.ToolsDirectory)\dotnet - task: AzureCLI@2 displayName: "Run GenCatalog" timeoutInMinutes: 0 @@ -23,7 +22,9 @@ steps: inlineScript: | $dotnetRootCandidates = @( "$(Agent.ToolsDirectory)\dotnet", - "$(Agent.ToolsDirectory)\dotnet\x64" + "$(Agent.ToolsDirectory)\dotnet\x64", + "$(Agent.ToolsDirectory)\windows\dotnet", + "$(Agent.ToolsDirectory)\windows\dotnet\x64" ) $dotnet = $null @@ -36,12 +37,12 @@ steps: } if (-not $dotnet) { - $dotnet = Get-ChildItem -Path "$(Agent.ToolsDirectory)\dotnet" -Filter dotnet.exe -Recurse -ErrorAction SilentlyContinue | + $dotnet = Get-ChildItem -Path "$(Agent.ToolsDirectory)" -Filter dotnet.exe -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1 -ExpandProperty FullName } if (-not $dotnet) { - throw "dotnet.exe was not found under '$(Agent.ToolsDirectory)\\dotnet' after UseDotNet runtime install." + throw "dotnet.exe was not found under '$(Agent.ToolsDirectory)' after UseDotNet runtime install." } $env:DOTNET_ROOT = Split-Path -Path $dotnet -Parent @@ -66,7 +67,7 @@ steps: Write-Host "DOTNET_ROOT does not exist" } - Write-Host "Searching ToolCache for dotnet.exe..." + Write-Host "Searching Agent.ToolsDirectory for dotnet.exe..." Get-ChildItem -Path "$(Agent.ToolsDirectory)" -Filter dotnet.exe -Recurse -ErrorAction SilentlyContinue | Select-Object -First 20 FullName | Format-Table -AutoSize | From abd4d685f6a745da0f41fe6c2ef42dc65dea66ee Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 10:51:13 -0700 Subject: [PATCH 17/36] Update steps-gen-catalog-run.yml --- pipelines/templates/steps-gen-catalog-run.yml | 46 ++++++++++--------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index f3a2599b..f794d770 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -20,40 +20,43 @@ steps: scriptLocation: "inlineScript" addSpnToEnvironment: true inlineScript: | - $dotnetRootCandidates = @( - "$(Agent.ToolsDirectory)\dotnet", - "$(Agent.ToolsDirectory)\dotnet\x64", - "$(Agent.ToolsDirectory)\windows\dotnet", - "$(Agent.ToolsDirectory)\windows\dotnet\x64" - ) - $dotnet = $null - foreach ($candidateRoot in $dotnetRootCandidates) { - $candidateExe = Join-Path $candidateRoot "dotnet.exe" - if (Test-Path $candidateExe) { - $dotnet = $candidateExe - break - } + + $dotnetCommand = Get-Command dotnet -ErrorAction SilentlyContinue + if ($dotnetCommand) { + $dotnet = $dotnetCommand.Source } if (-not $dotnet) { - $dotnet = Get-ChildItem -Path "$(Agent.ToolsDirectory)" -Filter dotnet.exe -Recurse -ErrorAction SilentlyContinue | - Select-Object -First 1 -ExpandProperty FullName + $probeRoots = @( + "$(Agent.ToolsDirectory)", + "$(Agent.TempDirectory)", + "$(Pipeline.Workspace)" + ) + + foreach ($probeRoot in $probeRoots) { + if (Test-Path $probeRoot) { + $found = Get-ChildItem -Path $probeRoot -Filter dotnet.exe -Recurse -ErrorAction SilentlyContinue | + Select-Object -First 1 -ExpandProperty FullName + if ($found) { + $dotnet = $found + break + } + } + } } if (-not $dotnet) { - throw "dotnet.exe was not found under '$(Agent.ToolsDirectory)' after UseDotNet runtime install." + throw "dotnet.exe was not found via PATH or probe roots. PATH='$env:PATH'" } $env:DOTNET_ROOT = Split-Path -Path $dotnet -Parent - $env:DOTNET_MULTILEVEL_LOOKUP = "0" - $env:PATH = "$env:DOTNET_ROOT;$env:PATH" Write-Host "=== .NET Runtime Diagnostics ===" Write-Host "Agent.ToolsDirectory: $(Agent.ToolsDirectory)" + Write-Host "Agent.TempDirectory: $(Agent.TempDirectory)" Write-Host "Resolved dotnet: $dotnet" Write-Host "DOTNET_ROOT: $env:DOTNET_ROOT" - Write-Host "DOTNET_MULTILEVEL_LOOKUP: $env:DOTNET_MULTILEVEL_LOOKUP" Write-Host "PATH (first 8 entries):" ($env:PATH -split ';' | Select-Object -First 8) | ForEach-Object { Write-Host " $_" } @@ -67,8 +70,8 @@ steps: Write-Host "DOTNET_ROOT does not exist" } - Write-Host "Searching Agent.ToolsDirectory for dotnet.exe..." - Get-ChildItem -Path "$(Agent.ToolsDirectory)" -Filter dotnet.exe -Recurse -ErrorAction SilentlyContinue | + Write-Host "Searching Agent.ToolsDirectory and Agent.TempDirectory for dotnet.exe..." + Get-ChildItem -Path "$(Agent.ToolsDirectory)", "$(Agent.TempDirectory)" -Filter dotnet.exe -Recurse -ErrorAction SilentlyContinue | Select-Object -First 20 FullName | Format-Table -AutoSize | Out-String | @@ -102,7 +105,6 @@ steps: AzureStorageServiceUrl: $(AzureStorageServiceUrl) ApisOfDotNetWebHookSecret: $(ApisOfDotNetWebHookSecret) APISOFDOTNET_INDEX_PATH: $(Pipeline.Workspace)/catalog - DOTNET_ROOT: $(Agent.ToolsDirectory)\dotnet DOTNET_gcServer: 0 DOTNET_GCConserveMemory: 9 DOTNET_GCHeapHardLimitPercent: 75 From 11977cb9d088a174f277aa9d4d8e3cd2cb11efd5 Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 11:08:03 -0700 Subject: [PATCH 18/36] Update steps-gen-catalog-run.yml --- pipelines/templates/steps-gen-catalog-run.yml | 86 ++----------------- 1 file changed, 5 insertions(+), 81 deletions(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index f794d770..2fff566e 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -20,87 +20,8 @@ steps: scriptLocation: "inlineScript" addSpnToEnvironment: true inlineScript: | - $dotnet = $null - - $dotnetCommand = Get-Command dotnet -ErrorAction SilentlyContinue - if ($dotnetCommand) { - $dotnet = $dotnetCommand.Source - } - - if (-not $dotnet) { - $probeRoots = @( - "$(Agent.ToolsDirectory)", - "$(Agent.TempDirectory)", - "$(Pipeline.Workspace)" - ) - - foreach ($probeRoot in $probeRoots) { - if (Test-Path $probeRoot) { - $found = Get-ChildItem -Path $probeRoot -Filter dotnet.exe -Recurse -ErrorAction SilentlyContinue | - Select-Object -First 1 -ExpandProperty FullName - if ($found) { - $dotnet = $found - break - } - } - } - } - - if (-not $dotnet) { - throw "dotnet.exe was not found via PATH or probe roots. PATH='$env:PATH'" - } - - $env:DOTNET_ROOT = Split-Path -Path $dotnet -Parent - - Write-Host "=== .NET Runtime Diagnostics ===" - Write-Host "Agent.ToolsDirectory: $(Agent.ToolsDirectory)" - Write-Host "Agent.TempDirectory: $(Agent.TempDirectory)" - Write-Host "Resolved dotnet: $dotnet" - Write-Host "DOTNET_ROOT: $env:DOTNET_ROOT" - Write-Host "PATH (first 8 entries):" - ($env:PATH -split ';' | Select-Object -First 8) | ForEach-Object { Write-Host " $_" } - - Write-Host "Checking DOTNET_ROOT existence..." - if (Test-Path $env:DOTNET_ROOT) { - Write-Host "DOTNET_ROOT exists" - Write-Host "Top-level contents of DOTNET_ROOT:" - Get-ChildItem -Path $env:DOTNET_ROOT -Force -ErrorAction SilentlyContinue | Select-Object Mode,Length,Name | Format-Table -AutoSize | Out-String | Write-Host - } - else { - Write-Host "DOTNET_ROOT does not exist" - } - - Write-Host "Searching Agent.ToolsDirectory and Agent.TempDirectory for dotnet.exe..." - Get-ChildItem -Path "$(Agent.ToolsDirectory)", "$(Agent.TempDirectory)" -Filter dotnet.exe -Recurse -ErrorAction SilentlyContinue | - Select-Object -First 20 FullName | - Format-Table -AutoSize | - Out-String | - Write-Host - - Write-Host "where.exe dotnet:" - & where.exe dotnet 2>&1 | Out-String | Write-Host - - Write-Host "Get-Command dotnet:" - Get-Command dotnet -ErrorAction SilentlyContinue | Select-Object Name,Source,Version | Format-Table -AutoSize | Out-String | Write-Host - - $env:APISOFDOTNET_INDEX_PATH = "$(Pipeline.Workspace)/catalog" - if (Test-Path $env:APISOFDOTNET_INDEX_PATH) { - Remove-Item -Recurse -Force $env:APISOFDOTNET_INDEX_PATH - } - - - New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/index" | Out-Null - New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/frameworks" | Out-Null - New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packs" | Out-Null - New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packages" | Out-Null - - if (-not (Test-Path $dotnet)) { - throw "dotnet.exe was not found. DOTNET_ROOT='$env:DOTNET_ROOT' PATH='$env:PATH'" - } - - & $dotnet --list-runtimes - - & $dotnet "$(Pipeline.Workspace)/gen-catalog-drop/publish-gen-catalog/GenCatalog.dll" + dotnet --version + dotnet $(Pipeline.Workspace)/gen-catalog-drop/publish-gen-catalog/GenCatalog.dll env: AzureStorageServiceUrl: $(AzureStorageServiceUrl) ApisOfDotNetWebHookSecret: $(ApisOfDotNetWebHookSecret) @@ -109,3 +30,6 @@ steps: DOTNET_GCConserveMemory: 9 DOTNET_GCHeapHardLimitPercent: 75 DOTNET_GCHeapHardLimit: 5368709120 + DOTNET_ROOT: $(Agent.ToolsDirectory)/dotnet + PATH: $(Agent.ToolsDirectory)/dotnet;$(PATH) + From 34e68feb2bfe8e3cb035e731f3718af270017491 Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 11:26:37 -0700 Subject: [PATCH 19/36] Update steps-gen-catalog-run.yml --- pipelines/templates/steps-gen-catalog-run.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index 2fff566e..e07330cc 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -8,7 +8,7 @@ steps: - task: UseDotNet@2 displayName: "Install .NET 10" inputs: - packageType: runtime + packageType: sdk version: 10.x includePreviewVersions: true - task: AzureCLI@2 From c822c8f263d079e57110b0914e3f256b59180007 Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 11:57:55 -0700 Subject: [PATCH 20/36] Update steps-gen-catalog-run.yml --- pipelines/templates/steps-gen-catalog-run.yml | 34 ++++++++++++++++--- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index e07330cc..3b40a7d4 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -8,9 +8,10 @@ steps: - task: UseDotNet@2 displayName: "Install .NET 10" inputs: - packageType: sdk + packageType: runtime version: 10.x includePreviewVersions: true + installationPath: $(Pipeline.Workspace)/dotnet - task: AzureCLI@2 displayName: "Run GenCatalog" timeoutInMinutes: 0 @@ -20,8 +21,33 @@ steps: scriptLocation: "inlineScript" addSpnToEnvironment: true inlineScript: | - dotnet --version - dotnet $(Pipeline.Workspace)/gen-catalog-drop/publish-gen-catalog/GenCatalog.dll + $env:APISOFDOTNET_INDEX_PATH = "$(Pipeline.Workspace)/catalog" + if (Test-Path $env:APISOFDOTNET_INDEX_PATH) { + Remove-Item -Recurse -Force $env:APISOFDOTNET_INDEX_PATH + } + + New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/index" | Out-Null + New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/frameworks" | Out-Null + New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packs" | Out-Null + New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packages" | Out-Null + + $publishDir = "$(Pipeline.Workspace)/gen-catalog-drop/publish-gen-catalog" + $dotnet = "$(Pipeline.Workspace)/dotnet/dotnet.exe" + + if (-not (Test-Path $publishDir)) { + throw "Publish directory not found: $publishDir" + } + + if (-not (Test-Path $dotnet)) { + throw "dotnet host not found at: $dotnet" + } + + $env:DOTNET_ROOT = "$(Pipeline.Workspace)/dotnet" + $env:PATH = "$env:DOTNET_ROOT;$env:PATH" + + Set-Location "$publishDir" + & $dotnet --version + & $dotnet GenCatalog.dll env: AzureStorageServiceUrl: $(AzureStorageServiceUrl) ApisOfDotNetWebHookSecret: $(ApisOfDotNetWebHookSecret) @@ -30,6 +56,4 @@ steps: DOTNET_GCConserveMemory: 9 DOTNET_GCHeapHardLimitPercent: 75 DOTNET_GCHeapHardLimit: 5368709120 - DOTNET_ROOT: $(Agent.ToolsDirectory)/dotnet - PATH: $(Agent.ToolsDirectory)/dotnet;$(PATH) From 80e250c849315db9f807115e1fb6f8b007dbce7f Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 12:16:48 -0700 Subject: [PATCH 21/36] Update steps-gen-catalog-run.yml --- pipelines/templates/steps-gen-catalog-run.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index 3b40a7d4..c6b947c7 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -11,7 +11,7 @@ steps: packageType: runtime version: 10.x includePreviewVersions: true - installationPath: $(Pipeline.Workspace)/dotnet + installationPath: $(Pipeline.Workspace)\dotnet - task: AzureCLI@2 displayName: "Run GenCatalog" timeoutInMinutes: 0 @@ -32,22 +32,23 @@ steps: New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packages" | Out-Null $publishDir = "$(Pipeline.Workspace)/gen-catalog-drop/publish-gen-catalog" - $dotnet = "$(Pipeline.Workspace)/dotnet/dotnet.exe" + $runtimeRoot = "$(Pipeline.Workspace)\dotnet" if (-not (Test-Path $publishDir)) { throw "Publish directory not found: $publishDir" } - if (-not (Test-Path $dotnet)) { - throw "dotnet host not found at: $dotnet" + if (-not (Test-Path $runtimeRoot)) { + throw "Runtime root not found at: $runtimeRoot" } - $env:DOTNET_ROOT = "$(Pipeline.Workspace)/dotnet" + $env:DOTNET_ROOT = $runtimeRoot $env:PATH = "$env:DOTNET_ROOT;$env:PATH" Set-Location "$publishDir" - & $dotnet --version - & $dotnet GenCatalog.dll + where.exe dotnet + dotnet --list-runtimes + dotnet GenCatalog.dll env: AzureStorageServiceUrl: $(AzureStorageServiceUrl) ApisOfDotNetWebHookSecret: $(ApisOfDotNetWebHookSecret) From 72a8930b395f7c9b56ca7ba755ac38f06bf6a9f3 Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 12:34:09 -0700 Subject: [PATCH 22/36] Update steps-gen-catalog-run.yml --- pipelines/templates/steps-gen-catalog-run.yml | 34 ++++++------------- 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index c6b947c7..030888c4 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -11,7 +11,7 @@ steps: packageType: runtime version: 10.x includePreviewVersions: true - installationPath: $(Pipeline.Workspace)\dotnet + installationPath: $(Pipeline.Workspace)/dotnet - task: AzureCLI@2 displayName: "Run GenCatalog" timeoutInMinutes: 0 @@ -21,38 +21,24 @@ steps: scriptLocation: "inlineScript" addSpnToEnvironment: true inlineScript: | - $env:APISOFDOTNET_INDEX_PATH = "$(Pipeline.Workspace)/catalog" + cd $(Pipeline.Workspace)/gen-catalog-drop/publish-gen-catalog + + $env:APISOFDOTNET_INDEX_PATH = "$(Pipeline.Workspace)\catalog" if (Test-Path $env:APISOFDOTNET_INDEX_PATH) { Remove-Item -Recurse -Force $env:APISOFDOTNET_INDEX_PATH } - New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/index" | Out-Null - New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/frameworks" | Out-Null - New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packs" | Out-Null - New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packages" | Out-Null - - $publishDir = "$(Pipeline.Workspace)/gen-catalog-drop/publish-gen-catalog" - $runtimeRoot = "$(Pipeline.Workspace)\dotnet" - - if (-not (Test-Path $publishDir)) { - throw "Publish directory not found: $publishDir" - } - - if (-not (Test-Path $runtimeRoot)) { - throw "Runtime root not found at: $runtimeRoot" - } - - $env:DOTNET_ROOT = $runtimeRoot - $env:PATH = "$env:DOTNET_ROOT;$env:PATH" + New-Item -ItemType Directory -Force -Path (Join-Path $env:APISOFDOTNET_INDEX_PATH "index") | Out-Null + New-Item -ItemType Directory -Force -Path (Join-Path $env:APISOFDOTNET_INDEX_PATH "frameworks") | Out-Null + New-Item -ItemType Directory -Force -Path (Join-Path $env:APISOFDOTNET_INDEX_PATH "packs") | Out-Null + New-Item -ItemType Directory -Force -Path (Join-Path $env:APISOFDOTNET_INDEX_PATH "packages") | Out-Null - Set-Location "$publishDir" - where.exe dotnet - dotnet --list-runtimes + dotnet --version dotnet GenCatalog.dll env: AzureStorageServiceUrl: $(AzureStorageServiceUrl) ApisOfDotNetWebHookSecret: $(ApisOfDotNetWebHookSecret) - APISOFDOTNET_INDEX_PATH: $(Pipeline.Workspace)/catalog + APISOFDOTNET_INDEX_PATH: $(Pipeline.Workspace)\catalog DOTNET_gcServer: 0 DOTNET_GCConserveMemory: 9 DOTNET_GCHeapHardLimitPercent: 75 From e8b4ee1262886795748784c6ec3ac203f0a6d97a Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 12:48:50 -0700 Subject: [PATCH 23/36] fixing path --- pipelines/templates/steps-gen-catalog-run.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index 030888c4..b469981f 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -21,26 +21,26 @@ steps: scriptLocation: "inlineScript" addSpnToEnvironment: true inlineScript: | - cd $(Pipeline.Workspace)/gen-catalog-drop/publish-gen-catalog - - $env:APISOFDOTNET_INDEX_PATH = "$(Pipeline.Workspace)\catalog" + $env:APISOFDOTNET_INDEX_PATH = "$(Pipeline.Workspace)/catalog" if (Test-Path $env:APISOFDOTNET_INDEX_PATH) { Remove-Item -Recurse -Force $env:APISOFDOTNET_INDEX_PATH } - New-Item -ItemType Directory -Force -Path (Join-Path $env:APISOFDOTNET_INDEX_PATH "index") | Out-Null - New-Item -ItemType Directory -Force -Path (Join-Path $env:APISOFDOTNET_INDEX_PATH "frameworks") | Out-Null - New-Item -ItemType Directory -Force -Path (Join-Path $env:APISOFDOTNET_INDEX_PATH "packs") | Out-Null - New-Item -ItemType Directory -Force -Path (Join-Path $env:APISOFDOTNET_INDEX_PATH "packages") | Out-Null + New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/index" | Out-Null + New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/frameworks" | Out-Null + New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packs" | Out-Null + New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packages" | Out-Null dotnet --version - dotnet GenCatalog.dll + dotnet $(Pipeline.Workspace)/gen-catalog-drop/publish-gen-catalog/GenCatalog.dll env: AzureStorageServiceUrl: $(AzureStorageServiceUrl) ApisOfDotNetWebHookSecret: $(ApisOfDotNetWebHookSecret) - APISOFDOTNET_INDEX_PATH: $(Pipeline.Workspace)\catalog + APISOFDOTNET_INDEX_PATH: $(Pipeline.Workspace)/catalog DOTNET_gcServer: 0 DOTNET_GCConserveMemory: 9 DOTNET_GCHeapHardLimitPercent: 75 DOTNET_GCHeapHardLimit: 5368709120 + DOTNET_ROOT: $(Pipeline.Workspace)/dotnet + PATH: $(Pipeline.Workspace)/dotnet;$(PATH) From 959366a0394059c448e359123108a70c8f981c22 Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 13:02:01 -0700 Subject: [PATCH 24/36] Update steps-gen-catalog-run.yml --- pipelines/templates/steps-gen-catalog-run.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index b469981f..642cdb47 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -11,7 +11,6 @@ steps: packageType: runtime version: 10.x includePreviewVersions: true - installationPath: $(Pipeline.Workspace)/dotnet - task: AzureCLI@2 displayName: "Run GenCatalog" timeoutInMinutes: 0 @@ -41,6 +40,6 @@ steps: DOTNET_GCConserveMemory: 9 DOTNET_GCHeapHardLimitPercent: 75 DOTNET_GCHeapHardLimit: 5368709120 - DOTNET_ROOT: $(Pipeline.Workspace)/dotnet - PATH: $(Pipeline.Workspace)/dotnet;$(PATH) + DOTNET_ROOT: $(Agent.ToolsDirectory)/dotnet + PATH: $(Agent.ToolsDirectory)/dotnet;$(PATH) From d23e6194da1e3d26fec52238167db22dc54a3979 Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 13:14:06 -0700 Subject: [PATCH 25/36] change to sdk --- pipelines/templates/steps-gen-catalog-run.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index 642cdb47..05d369f6 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -8,7 +8,7 @@ steps: - task: UseDotNet@2 displayName: "Install .NET 10" inputs: - packageType: runtime + packageType: sdk version: 10.x includePreviewVersions: true - task: AzureCLI@2 From ae3d96a5787d89043cbaff991fb0063a083ee2a3 Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 13:42:35 -0700 Subject: [PATCH 26/36] fetching tool cache path --- pipelines/templates/steps-gen-catalog-run.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index 05d369f6..15f710fc 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -8,9 +8,14 @@ steps: - task: UseDotNet@2 displayName: "Install .NET 10" inputs: - packageType: sdk + packageType: runtime version: 10.x includePreviewVersions: true + - pwsh: | + where.exe dotnet + dotnet --list-runtimes + Write-Host "Agent.ToolsDirectory:=$(Agent.ToolsDirectory)" + displayName: "Verify .NET installation" - task: AzureCLI@2 displayName: "Run GenCatalog" timeoutInMinutes: 0 @@ -20,6 +25,11 @@ steps: scriptLocation: "inlineScript" addSpnToEnvironment: true inlineScript: | + $dotnet = "$(Agent.ToolsDirectory)\dotnet\dotnet.exe" + $env:DOTNET_ROOT = "$(Agent.ToolsDirectory)\dotnet" + $env:DOTNET_MULTILEVEL_LOOKUP = "0" + $env:PATH = "$env:DOTNET_ROOT;$env:PATH" + $env:APISOFDOTNET_INDEX_PATH = "$(Pipeline.Workspace)/catalog" if (Test-Path $env:APISOFDOTNET_INDEX_PATH) { Remove-Item -Recurse -Force $env:APISOFDOTNET_INDEX_PATH @@ -30,8 +40,8 @@ steps: New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packs" | Out-Null New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packages" | Out-Null - dotnet --version - dotnet $(Pipeline.Workspace)/gen-catalog-drop/publish-gen-catalog/GenCatalog.dll + & $dotnet --version + & $dotnet "$(Pipeline.Workspace)/gen-catalog-drop/publish-gen-catalog/GenCatalog.dll" env: AzureStorageServiceUrl: $(AzureStorageServiceUrl) ApisOfDotNetWebHookSecret: $(ApisOfDotNetWebHookSecret) @@ -40,6 +50,4 @@ steps: DOTNET_GCConserveMemory: 9 DOTNET_GCHeapHardLimitPercent: 75 DOTNET_GCHeapHardLimit: 5368709120 - DOTNET_ROOT: $(Agent.ToolsDirectory)/dotnet - PATH: $(Agent.ToolsDirectory)/dotnet;$(PATH) From e2cca07dae24ffcfb5f9829af99430bc92a4cde0 Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 13:54:01 -0700 Subject: [PATCH 27/36] Update steps-gen-catalog-run.yml --- pipelines/templates/steps-gen-catalog-run.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index 15f710fc..14e0f365 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -11,7 +11,10 @@ steps: packageType: runtime version: 10.x includePreviewVersions: true + installationPath: $(Pipeline.Workspace)\dotnet - pwsh: | + $env:DOTNET_ROOT = "$(Pipeline.Workspace)\dotnet" + $env:DOTNET_MULTILEVEL_LOOKUP = "0" where.exe dotnet dotnet --list-runtimes Write-Host "Agent.ToolsDirectory:=$(Agent.ToolsDirectory)" @@ -25,10 +28,9 @@ steps: scriptLocation: "inlineScript" addSpnToEnvironment: true inlineScript: | - $dotnet = "$(Agent.ToolsDirectory)\dotnet\dotnet.exe" - $env:DOTNET_ROOT = "$(Agent.ToolsDirectory)\dotnet" + $env:DOTNET_ROOT = "$(Pipeline.Workspace)\dotnet" $env:DOTNET_MULTILEVEL_LOOKUP = "0" - $env:PATH = "$env:DOTNET_ROOT;$env:PATH" + $env:PATH = "C:\Program Files\dotnet;$env:PATH" $env:APISOFDOTNET_INDEX_PATH = "$(Pipeline.Workspace)/catalog" if (Test-Path $env:APISOFDOTNET_INDEX_PATH) { @@ -40,8 +42,8 @@ steps: New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packs" | Out-Null New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packages" | Out-Null - & $dotnet --version - & $dotnet "$(Pipeline.Workspace)/gen-catalog-drop/publish-gen-catalog/GenCatalog.dll" + dotnet --version + dotnet "$(Pipeline.Workspace)/gen-catalog-drop/publish-gen-catalog/GenCatalog.dll" env: AzureStorageServiceUrl: $(AzureStorageServiceUrl) ApisOfDotNetWebHookSecret: $(ApisOfDotNetWebHookSecret) From a49078d54c655dd8531b8fe98010c87a3aa3e9ad Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 14:06:53 -0700 Subject: [PATCH 28/36] change install path --- pipelines/templates/steps-gen-catalog-run.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index 14e0f365..5638f2ec 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -11,9 +11,9 @@ steps: packageType: runtime version: 10.x includePreviewVersions: true - installationPath: $(Pipeline.Workspace)\dotnet + installationPath: $(Pipeline.Workspace)\10\dotnet" - pwsh: | - $env:DOTNET_ROOT = "$(Pipeline.Workspace)\dotnet" + $env:DOTNET_ROOT = "$(Pipeline.Workspace)\10\dotnet" $env:DOTNET_MULTILEVEL_LOOKUP = "0" where.exe dotnet dotnet --list-runtimes @@ -28,11 +28,11 @@ steps: scriptLocation: "inlineScript" addSpnToEnvironment: true inlineScript: | - $env:DOTNET_ROOT = "$(Pipeline.Workspace)\dotnet" + $env:DOTNET_ROOT = "$(Pipeline.Workspace)\10\dotnet" $env:DOTNET_MULTILEVEL_LOOKUP = "0" - $env:PATH = "C:\Program Files\dotnet;$env:PATH" + $env:PATH = "$(Pipeline.Workspace)\10\dotnet;$env:PATH" - $env:APISOFDOTNET_INDEX_PATH = "$(Pipeline.Workspace)/catalog" + $env:APISOFDOTNET_INDEX_PATH = "$(Pipeline.Workspace)\catalog" if (Test-Path $env:APISOFDOTNET_INDEX_PATH) { Remove-Item -Recurse -Force $env:APISOFDOTNET_INDEX_PATH } @@ -43,11 +43,11 @@ steps: New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packages" | Out-Null dotnet --version - dotnet "$(Pipeline.Workspace)/gen-catalog-drop/publish-gen-catalog/GenCatalog.dll" + dotnet "$(Pipeline.Workspace)\gen-catalog-drop\publish-gen-catalog\GenCatalog.dll" env: AzureStorageServiceUrl: $(AzureStorageServiceUrl) ApisOfDotNetWebHookSecret: $(ApisOfDotNetWebHookSecret) - APISOFDOTNET_INDEX_PATH: $(Pipeline.Workspace)/catalog + APISOFDOTNET_INDEX_PATH: $(Pipeline.Workspace)\catalog DOTNET_gcServer: 0 DOTNET_GCConserveMemory: 9 DOTNET_GCHeapHardLimitPercent: 75 From cf723a83c8efd5f1bc6ec5ae71fa86d471ace755 Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 14:19:04 -0700 Subject: [PATCH 29/36] Update steps-gen-catalog-run.yml --- pipelines/templates/steps-gen-catalog-run.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index 5638f2ec..312cecc8 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -11,7 +11,7 @@ steps: packageType: runtime version: 10.x includePreviewVersions: true - installationPath: $(Pipeline.Workspace)\10\dotnet" + installationPath: $(Pipeline.Workspace)\10\dotnet - pwsh: | $env:DOTNET_ROOT = "$(Pipeline.Workspace)\10\dotnet" $env:DOTNET_MULTILEVEL_LOOKUP = "0" From 3f5c35edbf02628b0db1309fd76e0348f1bb696d Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 14:28:26 -0700 Subject: [PATCH 30/36] Update steps-gen-catalog-run.yml --- pipelines/templates/steps-gen-catalog-run.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index 312cecc8..52681bd5 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -13,7 +13,12 @@ steps: includePreviewVersions: true installationPath: $(Pipeline.Workspace)\10\dotnet - pwsh: | - $env:DOTNET_ROOT = "$(Pipeline.Workspace)\10\dotnet" + $installPath = "$(Pipeline.Workspace)\10\dotnet" + Write-Host "Install path exists: $(Test-Path $installPath)" + if (Test-Path $installPath) { + Get-ChildItem $installPath -Recurse -Depth 4 | Select-Object FullName | Format-Table -AutoSize + } + $env:DOTNET_ROOT = $installPath $env:DOTNET_MULTILEVEL_LOOKUP = "0" where.exe dotnet dotnet --list-runtimes From 0bee53673daffe93489254937524033370550cfa Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 14:36:35 -0700 Subject: [PATCH 31/36] Update steps-gen-catalog-run.yml --- pipelines/templates/steps-gen-catalog-run.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index 52681bd5..3fa20b5c 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -19,7 +19,6 @@ steps: Get-ChildItem $installPath -Recurse -Depth 4 | Select-Object FullName | Format-Table -AutoSize } $env:DOTNET_ROOT = $installPath - $env:DOTNET_MULTILEVEL_LOOKUP = "0" where.exe dotnet dotnet --list-runtimes Write-Host "Agent.ToolsDirectory:=$(Agent.ToolsDirectory)" @@ -34,8 +33,6 @@ steps: addSpnToEnvironment: true inlineScript: | $env:DOTNET_ROOT = "$(Pipeline.Workspace)\10\dotnet" - $env:DOTNET_MULTILEVEL_LOOKUP = "0" - $env:PATH = "$(Pipeline.Workspace)\10\dotnet;$env:PATH" $env:APISOFDOTNET_INDEX_PATH = "$(Pipeline.Workspace)\catalog" if (Test-Path $env:APISOFDOTNET_INDEX_PATH) { From 4a2e01687a444fe7bc8c2c15e2fc0b6efe03b749 Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 14:43:39 -0700 Subject: [PATCH 32/36] manual install .net 10 runtime --- pipelines/templates/steps-gen-catalog-run.yml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index 3fa20b5c..4f105870 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -13,16 +13,12 @@ steps: includePreviewVersions: true installationPath: $(Pipeline.Workspace)\10\dotnet - pwsh: | - $installPath = "$(Pipeline.Workspace)\10\dotnet" - Write-Host "Install path exists: $(Test-Path $installPath)" - if (Test-Path $installPath) { - Get-ChildItem $installPath -Recurse -Depth 4 | Select-Object FullName | Format-Table -AutoSize - } - $env:DOTNET_ROOT = $installPath - where.exe dotnet + $src = "$(Pipeline.Workspace)\10\dotnet\shared" + $dst = "C:\Program Files\dotnet\shared" + Write-Host "Copying .NET 10 runtime from $src to $dst" + Copy-Item -Path $src -Destination $dst -Recurse -Force dotnet --list-runtimes - Write-Host "Agent.ToolsDirectory:=$(Agent.ToolsDirectory)" - displayName: "Verify .NET installation" + displayName: "Install .NET 10 runtime into host" - task: AzureCLI@2 displayName: "Run GenCatalog" timeoutInMinutes: 0 @@ -32,8 +28,6 @@ steps: scriptLocation: "inlineScript" addSpnToEnvironment: true inlineScript: | - $env:DOTNET_ROOT = "$(Pipeline.Workspace)\10\dotnet" - $env:APISOFDOTNET_INDEX_PATH = "$(Pipeline.Workspace)\catalog" if (Test-Path $env:APISOFDOTNET_INDEX_PATH) { Remove-Item -Recurse -Force $env:APISOFDOTNET_INDEX_PATH From 5c2cdb3144b323b96b022e7d9a279af3035278e9 Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 14:54:37 -0700 Subject: [PATCH 33/36] Update steps-gen-catalog-run.yml --- pipelines/templates/steps-gen-catalog-run.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index 4f105870..d4d13d4c 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -16,7 +16,8 @@ steps: $src = "$(Pipeline.Workspace)\10\dotnet\shared" $dst = "C:\Program Files\dotnet\shared" Write-Host "Copying .NET 10 runtime from $src to $dst" - Copy-Item -Path $src -Destination $dst -Recurse -Force + Copy-Item -Path "$src\*" -Destination $dst -Recurse -Force + Write-Host "Installed 10.0.9 path exists: $(Test-Path 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\10.0.9')" dotnet --list-runtimes displayName: "Install .NET 10 runtime into host" - task: AzureCLI@2 From 141479a2ccc3b682a946997ae490d12915113bda Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Thu, 18 Jun 2026 15:05:24 -0700 Subject: [PATCH 34/36] use sdk --- pipelines/templates/steps-gen-catalog-run.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/pipelines/templates/steps-gen-catalog-run.yml b/pipelines/templates/steps-gen-catalog-run.yml index d4d13d4c..ca8f19f2 100644 --- a/pipelines/templates/steps-gen-catalog-run.yml +++ b/pipelines/templates/steps-gen-catalog-run.yml @@ -8,18 +8,9 @@ steps: - task: UseDotNet@2 displayName: "Install .NET 10" inputs: - packageType: runtime + packageType: sdk version: 10.x includePreviewVersions: true - installationPath: $(Pipeline.Workspace)\10\dotnet - - pwsh: | - $src = "$(Pipeline.Workspace)\10\dotnet\shared" - $dst = "C:\Program Files\dotnet\shared" - Write-Host "Copying .NET 10 runtime from $src to $dst" - Copy-Item -Path "$src\*" -Destination $dst -Recurse -Force - Write-Host "Installed 10.0.9 path exists: $(Test-Path 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\10.0.9')" - dotnet --list-runtimes - displayName: "Install .NET 10 runtime into host" - task: AzureCLI@2 displayName: "Run GenCatalog" timeoutInMinutes: 0 @@ -39,7 +30,6 @@ steps: New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packs" | Out-Null New-Item -ItemType Directory -Force -Path "$env:APISOFDOTNET_INDEX_PATH/packages" | Out-Null - dotnet --version dotnet "$(Pipeline.Workspace)\gen-catalog-drop\publish-gen-catalog\GenCatalog.dll" env: AzureStorageServiceUrl: $(AzureStorageServiceUrl) From cf594a89b69a703641961fa70a60c01354c97c89 Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Fri, 19 Jun 2026 09:02:15 -0700 Subject: [PATCH 35/36] Use .NET 10 SDK and enable preview versions Add packageType: sdk and includePreviewVersions: true to UseDotNet@2 steps across multiple pipeline files (gen-catalog, gen-design-notes, gen-usage-pipeline, templates/steps-build-planner.yml, templates/upload-build-planner.yml). In templates/steps-gen-usage.yml change packageType from runtime to sdk, remove explicit installationPath and DOTNET_ROOT, and simplify the dotnet invocation to use the PATH (dotnet ...). These changes ensure the SDK (including preview builds) is used consistently and simplify local dotnet tooling invocation in the pipelines. --- pipelines/gen-catalog.yml | 1 + pipelines/gen-design-notes.yml | 2 ++ pipelines/gen-usage-pipeline.yml | 1 + pipelines/templates/steps-build-planner.yml | 2 ++ pipelines/templates/steps-gen-usage.yml | 6 ++---- pipelines/templates/upload-build-planner.yml | 2 ++ 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pipelines/gen-catalog.yml b/pipelines/gen-catalog.yml index b6dd4ade..8f698ccf 100644 --- a/pipelines/gen-catalog.yml +++ b/pipelines/gen-catalog.yml @@ -61,6 +61,7 @@ extends: inputs: packageType: sdk version: 10.x + includePreviewVersions: true - task: NuGetAuthenticate@1 displayName: "NuGet Authenticate" - script: | diff --git a/pipelines/gen-design-notes.yml b/pipelines/gen-design-notes.yml index a8517afe..3615013a 100644 --- a/pipelines/gen-design-notes.yml +++ b/pipelines/gen-design-notes.yml @@ -63,7 +63,9 @@ extends: - task: UseDotNet@2 displayName: Use .NET 10 SDK inputs: + packageType: sdk version: 10.x + includePreviewVersions: true - task: NugetAuthenticate@1 displayName: Authenticate with NuGet - script: | diff --git a/pipelines/gen-usage-pipeline.yml b/pipelines/gen-usage-pipeline.yml index d8f39952..e1337555 100644 --- a/pipelines/gen-usage-pipeline.yml +++ b/pipelines/gen-usage-pipeline.yml @@ -68,6 +68,7 @@ extends: displayName: Use .NET 10 SDK inputs: version: 10.x + packageType: sdk includePreviewVersions: true - task: NuGetAuthenticate@1 displayName: "NuGet Authenticate" diff --git a/pipelines/templates/steps-build-planner.yml b/pipelines/templates/steps-build-planner.yml index fd1caf1e..2585c1b7 100644 --- a/pipelines/templates/steps-build-planner.yml +++ b/pipelines/templates/steps-build-planner.yml @@ -8,7 +8,9 @@ steps: - task: UseDotNet@2 displayName: "Use .NET 10 SDK" inputs: + packageType: sdk version: 10.x + includePreviewVersions: true - pwsh: | $ErrorActionPreference = 'Stop' $config = "$(Build.SourcesDirectory)/src/nuget.config" diff --git a/pipelines/templates/steps-gen-usage.yml b/pipelines/templates/steps-gen-usage.yml index aba0de1f..fb9d55b2 100644 --- a/pipelines/templates/steps-gen-usage.yml +++ b/pipelines/templates/steps-gen-usage.yml @@ -37,10 +37,9 @@ steps: - task: UseDotNet@2 displayName: "Install .NET 10" inputs: - packageType: runtime + packageType: sdk version: 10.x includePreviewVersions: true - installationPath: $(Agent.ToolsDirectory)\dotnet - ${{ each tool in parameters.Tools }}: - task: AzureCLI@2 @@ -51,10 +50,9 @@ steps: scriptType: "bash" scriptLocation: "inlineScript" inlineScript: | - "$(Agent.ToolsDirectory)\dotnet\dotnet" "$(Pipeline.Workspace)/gen-usage-drop/${{ tool.publishDir }}/${{ tool.dll }}" ${{ tool.args }} + dotnet "$(Pipeline.Workspace)/gen-usage-drop/${{ tool.publishDir }}/${{ tool.dll }}" ${{ tool.args }} env: AzureStorageServiceUrl: $(AzureStorageServiceUrl) ApisOfDotNetWebHookSecret: $(ApisOfDotNetWebHookSecret) - DOTNET_ROOT: $(Agent.ToolsDirectory)\dotnet ${{ each pair in tool.env }}: ${{ pair.key }}: ${{ pair.value }} diff --git a/pipelines/templates/upload-build-planner.yml b/pipelines/templates/upload-build-planner.yml index 3a799f90..032e441a 100644 --- a/pipelines/templates/upload-build-planner.yml +++ b/pipelines/templates/upload-build-planner.yml @@ -10,7 +10,9 @@ steps: - task: UseDotNet@2 displayName: "Use .NET 10" inputs: + packageType: sdk version: 10.x + includePreviewVersions: true - pwsh: | $ErrorActionPreference = 'Stop' $config = "$(Pipeline.Workspace)/velopack-input/nuget.config" From 8746d2657319b324739028780fc454f98a69bf93 Mon Sep 17 00:00:00 2001 From: Syrle Foronda Date: Fri, 19 Jun 2026 09:12:22 -0700 Subject: [PATCH 36/36] Use .NET SDK and simplify dotnet invocation Change UseDotNet@2 inputs to install the SDK (packageType: sdk) and enable preview versions across pipelines. In release-gen-design-notes-pipeline, switch from installing the runtime to the SDK, remove installationPath and DOTNET_ROOT, and call dotnet directly (instead of using the explicit Agent.ToolsDirectory path). These changes ensure the dotnet CLI is available on PATH and simplify invocation for GenDesignNotes; also apply the same SDK packageType addition to build and telemetry pipelines. --- pipelines/build-pipeline.yml | 1 + pipelines/build-telemetry.yml | 2 ++ pipelines/release-gen-design-notes-pipeline.yml | 14 +++++--------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/pipelines/build-pipeline.yml b/pipelines/build-pipeline.yml index 20709283..70681330 100644 --- a/pipelines/build-pipeline.yml +++ b/pipelines/build-pipeline.yml @@ -62,6 +62,7 @@ extends: - task: UseDotNet@2 displayName: Use .NET 10 SDK inputs: + packageType: sdk version: 10.x includePreviewVersions: true - script: | diff --git a/pipelines/build-telemetry.yml b/pipelines/build-telemetry.yml index 949d6574..74bec8a7 100644 --- a/pipelines/build-telemetry.yml +++ b/pipelines/build-telemetry.yml @@ -47,7 +47,9 @@ extends: - task: UseDotNet@2 displayName: Use .NET 10 SDK inputs: + packageType: sdk version: 10.x + includePreviewVersions: true - script: | dotnet publish src/NetUpgradePlannerTelemetry/NetUpgradePlannerTelemetry.csproj -o "$(Build.ArtifactStagingDirectory)/publish" /p:SourceRevisionId=$(Build.SourceVersion) displayName: Publish Function diff --git a/pipelines/release-gen-design-notes-pipeline.yml b/pipelines/release-gen-design-notes-pipeline.yml index 4819a2fb..24d78d7c 100644 --- a/pipelines/release-gen-design-notes-pipeline.yml +++ b/pipelines/release-gen-design-notes-pipeline.yml @@ -51,10 +51,9 @@ extends: - task: UseDotNet@2 displayName: "Install .NET 10" inputs: - packageType: runtime + packageType: sdk version: 10.x includePreviewVersions: true - installationPath: $(Agent.ToolsDirectory)/dotnet - task: AzureCLI@2 displayName: "Upload GenDesignNotes Dev" inputs: @@ -64,11 +63,10 @@ extends: addSpnToEnvironment: true inlineScript: | Set-Location "$(Pipeline.Workspace)/gen-design-notes-drop" - & "$(Agent.ToolsDirectory)/dotnet/dotnet.exe" GenDesignNotes.dll + dotnet GenDesignNotes.dll env: AzureStorageServiceUrl: $(AzureStorageServiceUrlDev) ApisOfDotNetWebHookSecret: $(ApisOfDotNetWebHookSecretDev) - DOTNET_ROOT: $(Agent.ToolsDirectory)/dotnet - stage: Production displayName: Run in Production @@ -89,10 +87,9 @@ extends: - task: UseDotNet@2 displayName: "Install .NET 10" inputs: - packageType: runtime + packageType: sdk version: 10.x includePreviewVersions: true - installationPath: $(Agent.ToolsDirectory)/dotnet - task: AzureCLI@2 displayName: "Run GenDesignNotes (Prod)" inputs: @@ -102,8 +99,7 @@ extends: addSpnToEnvironment: true inlineScript: | Set-Location "$(Pipeline.Workspace)/gen-design-notes-drop" - & "$(Agent.ToolsDirectory)/dotnet/dotnet.exe" GenDesignNotes.dll + dotnet GenDesignNotes.dll env: AzureStorageServiceUrl: $(AzureStorageServiceUrlProd) - ApisOfDotNetWebHookSecret: $(ApisOfDotNetWebHookSecretProd) - DOTNET_ROOT: $(Agent.ToolsDirectory)/dotnet + ApisOfDotNetWebHookSecret: $(ApisOfDotNetWebHookSecretProd) \ No newline at end of file