diff --git a/cli/azd/pkg/pipeline/pipeline_manager.go b/cli/azd/pkg/pipeline/pipeline_manager.go index 8ec9812c95b..24fc433f1d7 100644 --- a/cli/azd/pkg/pipeline/pipeline_manager.go +++ b/cli/azd/pkg/pipeline/pipeline_manager.go @@ -972,13 +972,13 @@ func generatePipelineDefinition(path string, props projectProperties) error { } builder := strings.Builder{} err = tmpl.Execute(&builder, struct { - BranchName string - FedCredLogIn bool - InstallDotNetAspire bool + BranchName string + FedCredLogIn bool + InstallDotNetForAspire bool }{ - BranchName: props.BranchName, - FedCredLogIn: props.AuthType == AuthTypeFederated, - InstallDotNetAspire: props.HasAppHost, + BranchName: props.BranchName, + FedCredLogIn: props.AuthType == AuthTypeFederated, + InstallDotNetForAspire: props.HasAppHost, }) if err != nil { return fmt.Errorf("executing template: %w", err) diff --git a/cli/azd/pkg/pipeline/testdata/Test_promptForCiFiles-no_files_-_azdo_selected_-_App_host_-_fed_Cred.snap b/cli/azd/pkg/pipeline/testdata/Test_promptForCiFiles-no_files_-_azdo_selected_-_App_host_-_fed_Cred.snap index 0a096b1b77a..4d59dfc0162 100644 --- a/cli/azd/pkg/pipeline/testdata/Test_promptForCiFiles-no_files_-_azdo_selected_-_App_host_-_fed_Cred.snap +++ b/cli/azd/pkg/pipeline/testdata/Test_promptForCiFiles-no_files_-_azdo_selected_-_App_host_-_fed_Cred.snap @@ -24,12 +24,14 @@ steps: - pwsh: | azd config set auth.useAzCliAuth "true" displayName: Configure AZD to Use AZ CLI Authentication. - - task: Bash@3 - displayName: Install .NET Aspire workload + - task: UseDotNet@2 inputs: - targetType: 'inline' - script: | - dotnet workload install aspire + version: '8.x' + displayName: Set up .NET 8 + - task: UseDotNet@2 + inputs: + version: '9.x' + displayName: Set up .NET 9 - task: AzureCLI@2 displayName: Provision Infrastructure diff --git a/cli/azd/pkg/pipeline/testdata/Test_promptForCiFiles-no_files_-_github_selected_-_App_host_-_fed_Cred.snap b/cli/azd/pkg/pipeline/testdata/Test_promptForCiFiles-no_files_-_github_selected_-_App_host_-_fed_Cred.snap index 2bdefe73ff4..e7a2151d847 100644 --- a/cli/azd/pkg/pipeline/testdata/Test_promptForCiFiles-no_files_-_github_selected_-_App_host_-_fed_Cred.snap +++ b/cli/azd/pkg/pipeline/testdata/Test_promptForCiFiles-no_files_-_github_selected_-_App_host_-_fed_Cred.snap @@ -28,8 +28,12 @@ jobs: uses: actions/checkout@v4 - name: Install azd uses: Azure/setup-azd@v2 - - name: Install .NET Aspire workload - run: dotnet workload install aspire + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: | + 8.x.x + 9.x.x - name: Log in with Azure (Federated Credentials) run: | diff --git a/cli/azd/resources/pipeline/.azdo/azure-dev.ymlt b/cli/azd/resources/pipeline/.azdo/azure-dev.ymlt index 248b13545c1..890a855a3b8 100644 --- a/cli/azd/resources/pipeline/.azdo/azure-dev.ymlt +++ b/cli/azd/resources/pipeline/.azdo/azure-dev.ymlt @@ -25,13 +25,15 @@ steps: - pwsh: | azd config set auth.useAzCliAuth "true" displayName: Configure AZD to Use AZ CLI Authentication. -{{- if .InstallDotNetAspire}} - - task: Bash@3 - displayName: Install .NET Aspire workload +{{- if .InstallDotNetForAspire}} + - task: UseDotNet@2 inputs: - targetType: 'inline' - script: | - dotnet workload install aspire + version: '8.x' + displayName: Set up .NET 8 + - task: UseDotNet@2 + inputs: + version: '9.x' + displayName: Set up .NET 9 {{ end }} - task: AzureCLI@2 displayName: Provision Infrastructure diff --git a/cli/azd/resources/pipeline/.github/azure-dev.ymlt b/cli/azd/resources/pipeline/.github/azure-dev.ymlt index 556585e1501..bf8d90323b5 100644 --- a/cli/azd/resources/pipeline/.github/azure-dev.ymlt +++ b/cli/azd/resources/pipeline/.github/azure-dev.ymlt @@ -30,9 +30,13 @@ jobs: uses: actions/checkout@v4 - name: Install azd uses: Azure/setup-azd@v2 -{{- if .InstallDotNetAspire}} - - name: Install .NET Aspire workload - run: dotnet workload install aspire +{{- if .InstallDotNetForAspire}} + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: | + 8.x.x + 9.x.x {{ end }} {{- if .FedCredLogIn }} - name: Log in with Azure (Federated Credentials)