Let's try this
This commit is contained in:
parent
9450e95f2e
commit
ac15a78f8e
|
|
@ -362,6 +362,11 @@ try {
|
||||||
|
|
||||||
$toolsetBuildProj = InitializeToolset
|
$toolsetBuildProj = InitializeToolset
|
||||||
|
|
||||||
|
$sdkPath = [IO.Path]::Combine($env:DOTNET_INSTALL_DIR, 'sdk', '3.1.102')
|
||||||
|
if (!(Test-Path $sdkPath)) {
|
||||||
|
InstallDotNetSdk $dotnetRoot '3.1.102-servicing-014873' -skipNonVersionedFiles $true
|
||||||
|
}
|
||||||
|
|
||||||
$restore = $tmpRestore
|
$restore = $tmpRestore
|
||||||
|
|
||||||
if ($ci) {
|
if ($ci) {
|
||||||
|
|
|
||||||
2
build.sh
2
build.sh
|
|
@ -316,6 +316,8 @@ restore=true
|
||||||
|
|
||||||
InitializeToolset
|
InitializeToolset
|
||||||
|
|
||||||
|
InstallDotNetSdk "$DOTNET_INSTALL_DIR" "3.1.102-servicing-014873"
|
||||||
|
|
||||||
restore=$_tmp_restore=
|
restore=$_tmp_restore=
|
||||||
|
|
||||||
if [ "$build_repo_tasks" = true ]; then
|
if [ "$build_repo_tasks" = true ]; then
|
||||||
|
|
|
||||||
|
|
@ -139,6 +139,7 @@ function InitializeDotNetCli([bool]$install) {
|
||||||
InstallDotNetSdk $dotnetRoot $dotnetSdkVersion
|
InstallDotNetSdk $dotnetRoot $dotnetSdkVersion
|
||||||
} else {
|
} else {
|
||||||
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Unable to find dotnet with SDK version '$dotnetSdkVersion'"
|
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Unable to find dotnet with SDK version '$dotnetSdkVersion'"
|
||||||
|
ExitWithExitCode 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -183,7 +184,7 @@ function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $arc
|
||||||
InstallDotNet $dotnetRoot $version $architecture
|
InstallDotNet $dotnetRoot $version $architecture
|
||||||
}
|
}
|
||||||
|
|
||||||
function InstallDotNet([string] $dotnetRoot, [string] $version, [string] $architecture = "", [string] $runtime = "", [bool] $skipNonVersionedFiles = $true) {
|
function InstallDotNet([string] $dotnetRoot, [string] $version, [string] $architecture = "", [string] $runtime = "", [bool] $skipNonVersionedFiles = $false) {
|
||||||
$installScript = GetDotNetInstallScript $dotnetRoot
|
$installScript = GetDotNetInstallScript $dotnetRoot
|
||||||
$installParameters = @{
|
$installParameters = @{
|
||||||
Version = $version
|
Version = $version
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ fi
|
||||||
# Configures warning treatment in msbuild.
|
# Configures warning treatment in msbuild.
|
||||||
warn_as_error=${warn_as_error:-true}
|
warn_as_error=${warn_as_error:-true}
|
||||||
|
|
||||||
# True to attempt using .NET Core already that meets requirements specified in global.json
|
# True to attempt using .NET Core already that meets requirements specified in global.json
|
||||||
# installed on the machine instead of downloading one.
|
# installed on the machine instead of downloading one.
|
||||||
use_installed_dotnet_cli=${use_installed_dotnet_cli:-true}
|
use_installed_dotnet_cli=${use_installed_dotnet_cli:-true}
|
||||||
|
|
||||||
|
|
@ -143,6 +143,7 @@ function InitializeDotNetCli {
|
||||||
InstallDotNetSdk "$dotnet_root" "$dotnet_sdk_version"
|
InstallDotNetSdk "$dotnet_root" "$dotnet_sdk_version"
|
||||||
else
|
else
|
||||||
Write-PipelineTelemetryError -category 'InitializeToolset' "Unable to find dotnet with SDK version '$dotnet_sdk_version'"
|
Write-PipelineTelemetryError -category 'InitializeToolset' "Unable to find dotnet with SDK version '$dotnet_sdk_version'"
|
||||||
|
ExitWithExitCode 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
@ -180,7 +181,7 @@ function InstallDotNetSdk {
|
||||||
function InstallDotNet {
|
function InstallDotNet {
|
||||||
local root=$1
|
local root=$1
|
||||||
local version=$2
|
local version=$2
|
||||||
|
|
||||||
GetDotNetInstallScript "$root"
|
GetDotNetInstallScript "$root"
|
||||||
local install_script=$_GetDotNetInstallScript
|
local install_script=$_GetDotNetInstallScript
|
||||||
|
|
||||||
|
|
@ -221,7 +222,7 @@ function GetDotNetInstallScript {
|
||||||
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')."
|
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')."
|
||||||
ExitWithExitCode $exit_code
|
ExitWithExitCode $exit_code
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
wget -q -O "$install_script" "$install_script_url" || {
|
wget -q -O "$install_script" "$install_script_url" || {
|
||||||
local exit_code=$?
|
local exit_code=$?
|
||||||
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')."
|
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')."
|
||||||
|
|
@ -237,11 +238,11 @@ function InitializeBuildTool {
|
||||||
if [[ -n "${_InitializeBuildTool:-}" ]]; then
|
if [[ -n "${_InitializeBuildTool:-}" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
InitializeDotNetCli $restore
|
InitializeDotNetCli $restore
|
||||||
|
|
||||||
# return values
|
# return values
|
||||||
_InitializeBuildTool="$_InitializeDotNetCli/dotnet"
|
_InitializeBuildTool="$_InitializeDotNetCli/dotnet"
|
||||||
_InitializeBuildToolCommand="msbuild"
|
_InitializeBuildToolCommand="msbuild"
|
||||||
_InitializeBuildToolFramework="netcoreapp2.1"
|
_InitializeBuildToolFramework="netcoreapp2.1"
|
||||||
}
|
}
|
||||||
|
|
@ -302,7 +303,7 @@ function InitializeToolset {
|
||||||
if [[ "$binary_log" == true ]]; then
|
if [[ "$binary_log" == true ]]; then
|
||||||
bl="/bl:$log_dir/ToolsetRestore.binlog"
|
bl="/bl:$log_dir/ToolsetRestore.binlog"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo '<Project Sdk="Microsoft.DotNet.Arcade.Sdk"/>' > "$proj"
|
echo '<Project Sdk="Microsoft.DotNet.Arcade.Sdk"/>' > "$proj"
|
||||||
MSBuild-Core "$proj" $bl /t:__WriteToolsetLocation /clp:ErrorsOnly\;NoSummary /p:__ToolsetLocationOutputFile="$toolset_location_file"
|
MSBuild-Core "$proj" $bl /t:__WriteToolsetLocation /clp:ErrorsOnly\;NoSummary /p:__ToolsetLocationOutputFile="$toolset_location_file"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"sdk": {
|
"sdk": {
|
||||||
"version": "3.1.102-servicing-014873"
|
"version": "3.1.101"
|
||||||
},
|
},
|
||||||
"tools": {
|
"tools": {
|
||||||
"dotnet": "3.1.102-servicing-014873",
|
"dotnet": "3.1.101",
|
||||||
"runtimes": {
|
"runtimes": {
|
||||||
"dotnet/x64": [
|
"dotnet/x64": [
|
||||||
"$(MicrosoftNETCoreAppInternalPackageVersion)"
|
"$(MicrosoftNETCoreAppInternalPackageVersion)"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue