Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eng/common/tools.sh')
-rwxr-xr-xeng/common/tools.sh23
1 files changed, 18 insertions, 5 deletions
diff --git a/eng/common/tools.sh b/eng/common/tools.sh
index 0920f5965..9019b7f5c 100755
--- a/eng/common/tools.sh
+++ b/eng/common/tools.sh
@@ -307,7 +307,7 @@ function InitializeBuildTool {
# return values
_InitializeBuildTool="$_InitializeDotNetCli/dotnet"
_InitializeBuildToolCommand="msbuild"
- _InitializeBuildToolFramework="netcoreapp2.1"
+ _InitializeBuildToolFramework="netcoreapp3.1"
}
# Set RestoreNoCache as a workaround for https://github.com/NuGet/Home/issues/3116
@@ -414,11 +414,24 @@ function MSBuild {
fi
local toolset_dir="${_InitializeToolset%/*}"
- local logger_path="$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.ArcadeLogging.dll"
- if [[ ! -f $logger_path ]]; then
- logger_path="$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.Arcade.Sdk.dll"
+ # new scripts need to work with old packages, so we need to look for the old names/versions
+ local selectedPath=
+ local possiblePaths=()
+ possiblePaths+=( "$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.ArcadeLogging.dll" )
+ possiblePaths+=( "$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.Arcade.Sdk.dll" )
+ possiblePaths+=( "$toolset_dir/netcoreapp2.1/Microsoft.DotNet.ArcadeLogging.dll" )
+ possiblePaths+=( "$toolset_dir/netcoreapp2.1/Microsoft.DotNet.Arcade.Sdk.dll" )
+ for path in "${possiblePaths[@]}"; do
+ if [[ -f $path ]]; then
+ selectedPath=$path
+ break
+ fi
+ done
+ if [[ -z "$selectedPath" ]]; then
+ Write-PipelineTelemetryError -category 'Build' "Unable to find arcade sdk logger assembly."
+ ExitWithExitCode 1
fi
- args=( "${args[@]}" "-logger:$logger_path" )
+ args+=( "-logger:$selectedPath" )
fi
MSBuild-Core ${args[@]}