msbuild
1[CmdletBinding(PositionalBinding=$false)]
2Param(
3[string] $verbosity = 'minimal',
4[string] $architecture = '',
5[string] $version = 'Latest',
6[string] $runtime = 'dotnet',
7[string] $RuntimeSourceFeed = '',
8[string] $RuntimeSourceFeedKey = ''
9)
10
11. $PSScriptRoot\tools.ps1
12
13$dotnetRoot = Join-Path $RepoRoot '.dotnet'
14
15$installdir = $dotnetRoot
16try {
17if ($architecture -and $architecture.Trim() -eq 'x86') {
18$installdir = Join-Path $installdir 'x86'
19}
20InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey
21}
22catch {
23Write-Host $_.ScriptStackTrace
24Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
25ExitWithExitCode 1
26}
27
28ExitWithExitCode 0
29