Skip to content

Commit 82a5e68

Browse files
committed
Fix inconsistent NuGet restore generation
This change corrects cases where command line restore operations using the arcade tools failed to produce the same NuGet restore result that Visual Studio produces for the same project. This failure led to unnecessary regeneration of these files each time the IDE was opened or a command line build was performed, thus leading to reduced productivity and, in some cases, reduced reliability.
1 parent 6ee6969 commit 82a5e68

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

eng/common/tools.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ function GetNuGetPackageCachePath() {
489489
# Use local cache on CI to ensure deterministic build,
490490
# use global cache in dev builds to avoid cost of downloading packages.
491491
if ($useGlobalNuGetCache) {
492-
$env:NUGET_PACKAGES = Join-Path $env:UserProfile '.nuget\packages'
492+
$env:NUGET_PACKAGES = Join-Path $env:UserProfile '.nuget\packages\'
493493
} else {
494494
$env:NUGET_PACKAGES = Join-Path $RepoRoot '.packages'
495495
}

src/Microsoft.DotNet.Arcade.Sdk/tools/Build.proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@
239239

240240
<MSBuild Projects="@(_ProjectToRestore)"
241241
Properties="@(_SolutionBuildProps);__BuildPhase=SolutionRestore;_NETCORE_ENGINEERING_TELEMETRY=Restore;MSBuildRestoreSessionId=$([System.Guid]::NewGuid())"
242-
RemoveProperties="$(_RemoveProps)"
242+
RemoveProperties="$(_RemoveProps);TreatWarningsAsErrors"
243243
Targets="Restore"
244244
SkipNonexistentTargets="true"
245245
BuildInParallel="%(_ProjectToRestore.RestoreInParallel)"

0 commit comments

Comments
 (0)