The behaviour expected of filter exceptions is: -> throw in a async task with a try...
[mono-project.git] / eng / common / dotnet-install.ps1
blob811f0f717f736aaa0c0125e5bc80f2c3f3504164
1 [CmdletBinding(PositionalBinding=$false)]
2 Param(
3 [string] $verbosity = 'minimal',
4 [string] $architecture = '',
5 [string] $version = 'Latest',
6 [string] $runtime = 'dotnet',
7 [string] $RuntimeSourceFeed = '',
8 [string] $RuntimeSourceFeedKey = ''
11 . $PSScriptRoot\tools.ps1
13 $dotnetRoot = Join-Path $RepoRoot '.dotnet'
15 $installdir = $dotnetRoot
16 try {
17 if ($architecture -and $architecture.Trim() -eq 'x86') {
18 $installdir = Join-Path $installdir 'x86'
20 InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey
22 catch {
23 Write-Host $_.ScriptStackTrace
24 Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
25 ExitWithExitCode 1
28 ExitWithExitCode 0