Skip to content

Commit fa34e8b

Browse files
build with final sdk
1 parent cb18d1b commit fa34e8b

File tree

1 file changed

+40
-5
lines changed

1 file changed

+40
-5
lines changed

azure-pipelines.ix.yml

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,47 @@ stages:
3131
pool:
3232
vmImage: ubuntu-latest
3333
steps:
34-
- task: UseDotNet@2
35-
displayName: Use .NET Core 5.0.x SDK
36-
inputs:
37-
version: 5.0.x
38-
includePreviewVersions: true
34+
# - task: UseDotNet@2
35+
# displayName: Use .NET Core 5.0.x SDK
36+
# inputs:
37+
# version: 5.0.x
38+
# includePreviewVersions: true
39+
- pwsh: |
40+
$branch = "release/5.0.1xx"
41+
$scriptPath = Join-Path $env:AGENT_TOOLSDIRECTORY dotnet-install.ps1
42+
Invoke-WebRequest -OutFile $scriptPath https://raw.githubusercontent.com/dotnet/install-scripts/master/src/dotnet-install.ps1
43+
&"$scriptPath" -Channel $branch
44+
45+
$configFile = Join-Path $env:AGENT_TOOLSDIRECTORY NuGet-darc.config
46+
# Get the darc feeds needed
47+
Invoke-WebRequest -OutFile $configFile "https://raw.githubusercontent.com/dotnet/installer/$branch/NuGet.config"
48+
49+
[xml]$nugetConfig = Get-Content $configFile
50+
$darcNodes = $nugetConfig.SelectNodes("/configuration/packageSources/add[starts-with(@key, 'darc-')]")
51+
52+
$installationPath = Join-Path $env:AGENT_TOOLSDIRECTORY dotnet
53+
54+
Write-Host "##vso[task.setvariable variable=DOTNET_ROOT]$installationPath"
55+
56+
# Enable multi-level lookup to fall back to the built-in SDK's for older versions. Set to 0 to disable
57+
Write-Host "##vso[task.setvariable variable=DOTNET_MULTILEVEL_LOOKUP]1"
58+
59+
# Make sure the new path is propagated back to the main host process
60+
Write-Host "##vso[task.setvariable variable=PATH]$env:PATH"
61+
62+
# Add the nightly NuGet feeds to the nuget config starting with the darc nodes
63+
foreach ($feed in $darcNodes) {
64+
$key = $feed.attributes['key'].value
65+
$value = $feed.attributes['value'].value
66+
67+
Write-Host "Adding DARC feed '$key': $value"
68+
dotnet nuget add source $value -n $key
69+
}
70+
71+
dotnet nuget add source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json -n dotnet5
3972
73+
displayName: Intall .NET 5.0 SDK
74+
4075
- task: UseDotNet@2
4176
displayName: .NET Core 3.1 runtime
4277
inputs:

0 commit comments

Comments
 (0)