Add UsePythonVersion (#21109)

### Description
The machine has multiple python installations and none of them is in
PATH. Therefore we should explicitly set python version via this task to
avoid having surprises.

### Motivation and Context
Similar to #21095
This commit is contained in:
Changming Sun 2024-06-19 20:47:21 -07:00 committed by GitHub
parent 27f3ac78d4
commit bd3a9ee99d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View file

@ -116,6 +116,11 @@ stages:
DisplayName: 'ESRP - Sign C# dlls'
DoEsrp: ${{ parameters.DoEsrp }}
- task: UsePythonVersion@0
displayName: 'Use Python'
inputs:
versionSpec: 3.8
- task: MSBuild@1
displayName: 'Build Nuget Packages'
inputs:

View file

@ -228,6 +228,11 @@ stages:
DisplayName: 'ESRP - Sign C# dlls'
DoEsrp: ${{ parameters.DoEsrp }}
- task: UsePythonVersion@0
displayName: 'Use Python'
inputs:
versionSpec: 3.8
- task: MSBuild@1
displayName: 'Build Nuget Packages'
inputs: