We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07bb4bb commit 013c04eCopy full SHA for 013c04e
azure-pipelines.yml
@@ -14,6 +14,21 @@ variables:
14
Configuration: Release
15
16
steps:
17
+- task: PowerShell@2
18
+ displayName: 'Set default dotnet path'
19
+ inputs:
20
+ targetType: 'inline'
21
+ script: |
22
+ $infoContent = dotnet --info
23
+ $sdkBasePath = $infoContent |
24
+ Where-Object {$_ -match 'Base Path:'} |
25
+ ForEach-Object {
26
+ ($_ -replace '\s+Base Path:','').trim()
27
+ }
28
+ Write-Host "dotnet SDK path: $sdkBasePath"
29
+ $dotnetPath = (Get-Item $sdkBasePath).Parent.Parent.FullName
30
+ Write-Host "dotnet path: $dotnetPath"
31
+ Write-Host "##vso[task.setvariable variable=DotNetPath]$dotnetPath"
32
- task: UseDotNet@2
33
inputs:
34
packageType: 'sdk'
0 commit comments