Skip to content

Commit 8da0bcb

Browse files
committed
!fixup! Do not NuGet.exe restore in parallel
- also disable cache use in `Restore` target and `NuGet.exe restore` nit: Use `.\packages` folder in `Restore` target too
1 parent 5db6047 commit 8da0bcb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Runtime.msbuild

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
<Message Importance="High" Text='%0A&gt; "$(NuGetExe)" restore "src\System.Net.Http.Formatting.NetCore\packages.config" ...'
8989
Condition=" '$(BuildPortable)' == 'true' " />
9090
<Exec Command='"$(NuGetExe)" restore "src\System.Net.Http.Formatting.NetCore\packages.config" ^
91-
-PackagesDirectory packages -NonInteractive ^
91+
-PackagesDirectory packages -DirectDownload -DisableParallelProcessing -NoCache -NonInteractive ^
9292
-Verbosity quiet -ConfigFile .nuget\NuGet.Config'
9393
Condition=" '$(BuildPortable)' == 'true' " />
9494
<!-- 2. Restore SDK-style test projects because legacy test projects depend on TestCommon. -->
@@ -99,7 +99,7 @@
9999
<!-- 3. Restore remaining legacy projects. -->
100100
<Message Importance="High" Text='%0A&gt; "$(NuGetExe)" restore "@(_NuGetPackagesAndSolutions)" ...' />
101101
<Exec Command='"$(NuGetExe)" restore "%(_NuGetPackagesAndSolutions.Identity)" ^
102-
-PackagesDirectory packages -NonInteractive ^
102+
-PackagesDirectory packages -DirectDownload -DisableParallelProcessing -NoCache -NonInteractive ^
103103
-Verbosity quiet -ConfigFile .nuget\NuGet.Config' />
104104
<Message Importance="High" Text='' />
105105
</Target>

build.cmd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ if exist "%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" (
3838
goto BuildFail
3939
)
4040

41+
REM Use same NuGet configuration when using `Restore` target.
42+
set "NUGET_PACKAGES=%CD%\packages"
43+
set RESTORENOCACHE=true
44+
4145
if "%1" == "" goto BuildDefaults
4246

4347
%MSBuild% Runtime.msbuild /m /nr:false /p:Platform="Any CPU" /p:Desktop=true /v:M ^

0 commit comments

Comments
 (0)