diff --git a/eng/common/pipelines/templates/jobs/perf.yml b/eng/common/pipelines/templates/jobs/perf.yml index 6209cc5add59..67c4accf3800 100644 --- a/eng/common/pipelines/templates/jobs/perf.yml +++ b/eng/common/pipelines/templates/jobs/perf.yml @@ -112,8 +112,29 @@ jobs: - template: /eng/common/pipelines/templates/steps/verify-agent-os.yml parameters: AgentImage: $(OSVmImage) - - - template: /eng/pipelines/templates/steps/install-dotnet.yml + + # Copied from eng/pipelines/templates/steps/install-dotnet.yml, but changed workingDirectory + - task: UseDotNet@2 # About UseDotNet@2 task: https://learn.microsoft.com/azure/devops/pipelines/tasks/reference/use-dotnet-v2?view=azure-pipelines + displayName: "Use .NET SDK from global.json" + retryCountOnTaskFailure: 3 + inputs: + useGlobalJson: true + workingDirectory: azure-sdk-tools + + # Copied from eng/pipelines/templates/steps/install-dotnet.yml, but changed workingDirectory + - task: UseDotNet@2 + displayName: "Use .NET SDK 8.0.x" + retryCountOnTaskFailure: 3 + inputs: + # We must install sdk, not just runtime, as it is required by some of our tools, like test-proxy. + # Specifically, test-proxy requires asp.net core runtime, which is installed only when sdk option + # is selected, per: https://github.com/microsoft/azure-pipelines-tasks/issues/14405 + packageType: sdk + version: 8.0.x + # performMultiLevelLookup comes into play when given .NET executable target runtime is different + # than the installed .NET SDK. Without this, such runtime would not be found. + performMultiLevelLookup: true + workingDirectory: azure-sdk-tools - ${{ parameters.InstallLanguageSteps }}