Skip to content

Use .NET SDK and NuGet feed early access for build, package and release pipelines - #27795

Open
Aditya Patwardhan (adityapatwardhan) wants to merge 1 commit into
masterfrom
DotnetEarly
Open

Use .NET SDK and NuGet feed early access for build, package and release pipelines#27795
Aditya Patwardhan (adityapatwardhan) wants to merge 1 commit into
masterfrom
DotnetEarly

Conversation

@adityapatwardhan

Copy link
Copy Markdown
Member

PR Summary

This pull request introduces early access .NET build support into the PowerShell build and release pipelines. It adds new parameters and logic to allow builds to target early access .NET SDK and runtime versions, select specific early access feeds, and handle their installation and authentication securely. The changes are spread across official and non-official pipeline YAMLs, as well as supporting templates.

Key changes include:

Early Access Build Parameterization

  • Added new parameters (IsEarlyAccess, EarlyAccessFeed, DOTNET_RUNTIME_VERSION, DOTNET_SDK_VERSION) to all relevant pipeline YAMLs for both official and non-official builds, enabling selection of early access .NET feeds and versions at queue time. [1] [2] [3] [4] [5] [6] [7]

  • Propagated these parameters into pipeline variables and downstream template parameters to ensure early access settings flow throughout the build and release process. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Early Access .NET SDK/Runtime Download and Installation

  • Introduced a new template (downloadDotnetEarlyAccess.yml) to securely download early access .NET SDK/runtime artifacts using Azure credentials and upload them as pipeline artifacts.

  • Enhanced the install-dotnet.yml template to support conditional installation of early access SDKs by extracting from downloaded artifacts, with support for multiple architectures. [1] [2] [3] [4]

NuGet Feed and Credential Management for Early Access

  • Updated the insert-nuget-config-azfeed.yml template to switch NuGet config sources based on the early access flag and to securely set up credentials for Azure Artifacts feeds using Azure DevOps tokens. [1] [2]

These enhancements enable the build system to flexibly and securely consume early access .NET builds, supporting advanced development and testing scenarios.

PR Context

These changes to the pipelines allow us to consume .NET SDK and NuGet feeds early.

PR Checklist

Copilot AI lite review requested due to automatic review settings August 10, 2026 06:24
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds “early access” .NET SDK/runtime support to the Azure DevOps build/packaging/release pipelines, allowing queue-time selection of an early access feed and versions, and introducing pipeline logic to download/install those SDKs and authenticate to the corresponding Azure Artifacts feeds.

Changes:

  • Adds queue-time parameters/variables (IsEarlyAccess, EarlyAccessFeed, DOTNET_RUNTIME_VERSION, DOTNET_SDK_VERSION) and propagates them through official and non-official pipelines and stage templates.
  • Introduces a download job/template for early access .NET SDK artifacts and updates the install-dotnet template to install from those artifacts when early access is enabled.
  • Updates NuGet feed configuration/credential setup to support switching between private/public feeds and early access feeds.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
build.psm1 Adds EarlyAccess option to NuGet config switching and introduces Get-DotnetEarlyAccess helper.
.pipelines/templates/windows-hosted-build.yml Passes a RID-like dotnetArch into dotnet installation template.
.pipelines/templates/variables/PowerShell-Packages-Variables.yml Adds early access parameters and exports them as pipeline variables.
.pipelines/templates/variables/PowerShell-Coordinated_Packages-Variables.yml Adds early access parameters and exports them as pipeline variables.
.pipelines/templates/testartifacts.yml Pins dotnet install architecture for Windows/Linux test artifact jobs.
.pipelines/templates/stages/PowerShell-Release-Stages.yml Adds an early-access dotnet download stage and wires downstream stages to depend on it.
.pipelines/templates/stages/PowerShell-Packages-Stages.yml Adds early-access dotnet setup stage and makes packaging stages depend on it.
.pipelines/templates/stages/PowerShell-Coordinated_Packages-Stages.yml Threads IsEarlyAccess through coordinated stages and conditionally downloads early SDK artifacts.
.pipelines/templates/release-validate-sdk.yml Adds early access parameters/variables and installs dotnet based on selected architecture/feed.
.pipelines/templates/release-validate-globaltools.yml Adds early access parameters and architecture-aware dotnet install.
.pipelines/templates/release-validate-fxdpackages.yml Adds early access parameters and architecture-aware dotnet install.
.pipelines/templates/packaging/windows/package.yml Adds dotnetArch and passes it to dotnet install for packaging jobs.
.pipelines/templates/mac.yml Adds dotnetArch and passes it to dotnet install for mac jobs.
.pipelines/templates/linux.yml Adds dotnetArch and passes it to dotnet install for linux jobs.
.pipelines/templates/linux-package-build.yml Adds dotnetArch and passes it to dotnet install for linux packaging jobs.
.pipelines/templates/install-dotnet.yml Adds early-access artifact download/extract path and supports selecting SDK archive by architecture.
.pipelines/templates/insert-nuget-config-azfeed.yml Switches nuget config based on early access and sets up Azure Artifacts credential provider token/endpoint config.
.pipelines/templates/downloadDotnetEarlyAccess.yml New job template to download early access SDK artifacts and publish them as pipeline artifacts.
.pipelines/PowerShell-Release-Official.yml Adds queue-time early access parameters and passes them into release stages template.
.pipelines/PowerShell-Packages-Official.yml Adds queue-time early access parameters/variables and passes them into packages stages template.
.pipelines/PowerShell-Coordinated_Packages-Official.yml Adds queue-time early access parameters/variables and passes them into coordinated packages stages template.
.pipelines/NonOfficial/PowerShell-Release-NonOfficial.yml Mirrors official release pipeline early access parameters for non-official runs.
.pipelines/NonOfficial/PowerShell-Packages-NonOfficial.yml Mirrors official packages pipeline early access parameters for non-official runs.
.pipelines/NonOfficial/PowerShell-Coordinated_Packages-NonOfficial.yml Mirrors coordinated packages pipeline early access parameters for non-official runs.
Suppressed comments (2)

.pipelines/templates/install-dotnet.yml:99

  • The early-access install step condition only checks for 'true'. If ISEARLYACCESS is emitted as 'True', the early-access install path will be skipped and the build will proceed without the intended SDK.
    condition: eq(variables['ISEARLYACCESS'], 'true')

.pipelines/templates/insert-nuget-config-azfeed.yml:95

  • This condition only checks for 'true'. If ISEARLYACCESS is set to 'True' (common for boolean variables), the credential-provider setup will be skipped even when early access is enabled.
  displayName: 'Setup Azure Artifacts Credential Provider secret'
  condition: eq(variables['ISEARLYACCESS'], 'true')
  env:
    ob_restore_phase: ${{ parameters.ob_restore_phase }}

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +39 to +47
- task: DownloadPipelineArtifact@2
inputs:
artifactName: 'dotnet-packages'
targetPath: '$(Pipeline.Workspace)/dotnet-packages'
displayName: "Download dotnet-packages artifact"
condition: eq(variables['ISEARLYACCESS'], 'true')
env:
ob_restore_phase: ${{ parameters.ob_restore_phase }}


displayName: 'Install dotnet SDK'
workingDirectory: $(RepoRoot)
condition: ne(variables['ISEARLYACCESS'], 'true')
Comment on lines +85 to +86
$vstsCommandString = "vso[task.setvariable variable=VSS_NUGET_EXTERNAL_FEED_ENDPOINTS]$VSS_NUGET_EXTERNAL_FEED_ENDPOINTS"
Write-Host "##$vstsCommandString"
Comment on lines +30 to +33
- pwsh: |
Get-ChildItem Env: | Out-String -Width 9999 -Stream | Write-Verbose -Verbose
displayName: Capture environment

Comment thread build.psm1
'net8' { 'https://pkgs.dev.azure.com/powershell-rel/PowerShell/_packaging/powershell-net-8-early-access/nuget/v3/index.json' }
'net9' { 'https://pkgs.dev.azure.com/powershell-rel/PowerShell/_packaging/powershell-net-9-early-access/nuget/v3/index.json' }
'net10' { 'https://pkgs.dev.azure.com/powershell-rel/PowerShell/_packaging/powershell-net-10-early-access/nuget/v3/index.json' }
default { throw "Unknown early access feed URL: $earlyAccess" }
Comment thread build.psm1
Comment on lines +949 to +953
Set-PipelineVariable -Name 'EARLY_ACCESS_FEED_URL' -Value $earlyAccessFeedUrl

$earlyAccessFeed = [NugetPackageSource] @{Url = $earlyAccessFeedUrl; Name = 'earlyaccess' }

New-NugetConfigFile -NugetPackageSource $earlyAccessFeed -Destination "$PSScriptRoot/" @extraParams
Comment thread build.psm1
Comment on lines +2607 to +2609
[Parameter(Mandatory)]
[string]$DOTNET_PRIVATE_SAS
)
Comment on lines +25 to +36
- stage: EarlyDotnet
displayName: 'Early .NET Setup'
dependsOn: []
condition: always()

jobs:
- ${{ if eq(parameters.IsEarlyAccess, true) }}:
- template: /.pipelines/templates/downloadDotnetEarlyAccess.yml@self
parameters:
DotnetRuntimeVersion: ${{ parameters.DOTNET_RUNTIME_VERSION }}
DotnetSdkVersion: ${{ parameters.DOTNET_SDK_VERSION }}

Comment on lines +31 to +39
- stage: downloadDotnetEarlyAccess
displayName: 'Download Early release .NET'
jobs:
- ${{ if eq(parameters.IsEarlyAccess, true) }}:
- template: /.pipelines/templates/downloadDotnetEarlyAccess.yml@self
parameters:
DotnetRuntimeVersion: ${{ parameters.DOTNET_RUNTIME_VERSION }}
DotnetSdkVersion: ${{ parameters.DOTNET_SDK_VERSION }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants