File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -540,13 +540,15 @@ function GetDefaultMSBuildEngine() {
540
540
541
541
function GetNuGetPackageCachePath () {
542
542
if ($env: NUGET_PACKAGES -eq $null ) {
543
- # Use local cache on CI to ensure deterministic build,
543
+ # Use local cache on CI to ensure deterministic build.
544
+ # Avoid using the http cache as workaround for https://github.com/NuGet/Home/issues/3116
544
545
# use global cache in dev builds to avoid cost of downloading packages.
545
546
# For directory normalization, see also: https://github.com/NuGet/Home/issues/7968
546
547
if ($useGlobalNuGetCache ) {
547
548
$env: NUGET_PACKAGES = Join-Path $env: UserProfile ' .nuget\packages\'
548
549
} else {
549
550
$env: NUGET_PACKAGES = Join-Path $RepoRoot ' .packages\'
551
+ $env: RESTORENOCACHE = $true
550
552
}
551
553
}
552
554
Original file line number Diff line number Diff line change @@ -312,12 +312,14 @@ function InitializeBuildTool {
312
312
_InitializeBuildToolFramework=" netcoreapp2.1"
313
313
}
314
314
315
+ # Set RestoreNoCache as a workaround for https://github.com/NuGet/Home/issues/3116
315
316
function GetNuGetPackageCachePath {
316
317
if [[ -z ${NUGET_PACKAGES:- } ]]; then
317
318
if [[ " $use_global_nuget_cache " == true ]]; then
318
319
export NUGET_PACKAGES=" $HOME /.nuget/packages"
319
320
else
320
321
export NUGET_PACKAGES=" $repo_root /.packages"
322
+ export RESTORENOCACHE=true
321
323
fi
322
324
fi
323
325
You can’t perform that action at this time.
0 commit comments