Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion eng/common/dotnet-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ Param(

. $PSScriptRoot\tools.ps1

$dotnetRoot = Join-Path $RepoRoot '.dotnet'
if (-not [string]::IsNullOrEmpty($env:DOTNET_GLOBAL_INSTALL_DIR)) {
$dotnetRoot = $env:DOTNET_GLOBAL_INSTALL_DIR
} else {
$dotnetRoot = Join-Path $RepoRoot '.dotnet'
}

$installdir = $dotnetRoot
try {
Expand Down
6 changes: 5 additions & 1 deletion eng/common/dotnet-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ case $cpuname in
;;
esac

dotnetRoot="${repo_root}.dotnet"
if [[ -n "${DOTNET_GLOBAL_INSTALL_DIR:-}" ]]; then
dotnetRoot="$DOTNET_GLOBAL_INSTALL_DIR"
else
dotnetRoot="${repo_root}.dotnet"
fi
if [[ $architecture != "" ]] && [[ $architecture != $buildarch ]]; then
dotnetRoot="$dotnetRoot/$architecture"
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@

<Exec Condition="'$(OS)' != 'Windows_NT'" Command="chmod +x &quot;$(_DotNetInstallScript)&quot;" />

<PropertyGroup>
<_DotNetPath Condition="'$(DOTNET_GLOBAL_INSTALL_DIR)' != ''">$(DOTNET_GLOBAL_INSTALL_DIR)</_DotNetPath>
<_DotNetPath Condition="'$(_DotNetPath)' == ''">$(RepoRoot).dotnet</_DotNetPath>
</PropertyGroup>

<InstallDotNetCore
VersionsPropsPath="$(RepositoryEngineeringDir)Versions.props"
GlobalJsonPath="$(RepoRoot)global.json"
DotNetPath ="$(RepoRoot).dotnet"
DotNetPath="$(_DotNetPath)"
Comment thread
AndriySvyryd marked this conversation as resolved.
DotNetInstallScript="$(_DotNetInstallScript)"
Platform="$(Platform)"
RuntimeSourceFeed="$(DotNetRuntimeSourceFeed)"
Expand Down
Loading