@@ -541,7 +541,9 @@ Fix steps:
541541
542542 try {
543543 Push-Location $globalToolSrcFolder
544- $Arguments += " --output" , $publishPath
544+ if ($Arguments -notcontains ' --output' ) {
545+ $Arguments += " --output" , $publishPath
546+ }
545547 Write-Log - message " Run dotnet $Arguments from $PWD to build global tool entry point"
546548 Start-NativeExecution { dotnet $Arguments }
547549 }
@@ -801,8 +803,8 @@ function New-PSOptions {
801803 [ValidateSet (" Debug" , " Release" , " CodeCoverage" , ' ' )]
802804 [string ]$Configuration ,
803805
804- [ValidateSet (" net6 .0" )]
805- [string ]$Framework = " net6 .0" ,
806+ [ValidateSet (" net7 .0" )]
807+ [string ]$Framework = " net7 .0" ,
806808
807809 # These are duplicated from Start-PSBuild
808810 # We do not use ValidateScript since we want tab completion
@@ -1745,11 +1747,6 @@ function Install-Dotnet {
17451747
17461748 Write-Verbose - Verbose " In install-dotnet"
17471749
1748- # This is needed workaround for RTM pre-release build as the SDK version is always 6.0.100 after installation for every pre-release
1749- if ($dotnetCLIRequiredVersion -like ' 6.0.100-rtm.*' ) {
1750- $dotnetCLIRequiredVersion = ' 6.0.100'
1751- }
1752-
17531750 # This allows sudo install to be optional; needed when running in containers / as root
17541751 # Note that when it is null, Invoke-Expression (but not &) must be used to interpolate properly
17551752 $sudo = if (! $NoSudo ) { " sudo" }
@@ -1818,13 +1815,11 @@ function Install-Dotnet {
18181815 $installScript = " dotnet-install.ps1"
18191816 Invoke-WebRequest - Uri $installObtainUrl / $installScript - OutFile $installScript
18201817 if (-not $environment.IsCoreCLR ) {
1821- $installArgs = @ {
1822- Quality = $Quality
1823- }
1824-
1818+ $installArgs = @ {}
18251819 if ($Version ) {
18261820 $installArgs += @ { Version = $Version }
18271821 } elseif ($Channel ) {
1822+ $installArgs += @ { Quality = $Quality }
18281823 $installArgs += @ { Channel = $Channel }
18291824 }
18301825
@@ -1850,7 +1845,7 @@ function Install-Dotnet {
18501845 $fullDotnetInstallPath = Join-Path - Path (Convert-Path - Path $PWD.Path ) - ChildPath $installScript
18511846
18521847 if ($Version ) {
1853- $psArgs = @ (' -NoLogo' , ' -NoProfile' , ' -File' , $fullDotnetInstallPath , ' -Version' , $Version , ' -Quality ' , $Quality )
1848+ $psArgs = @ (' -NoLogo' , ' -NoProfile' , ' -File' , $fullDotnetInstallPath , ' -Version' , $Version )
18541849 }
18551850 elseif ($Channel ) {
18561851 $psArgs = @ (' -NoLogo' , ' -NoProfile' , ' -File' , $fullDotnetInstallPath , ' -Channel' , $Channel , ' -Quality' , $Quality )
0 commit comments