Skip to content

Commit 7738c5e

Browse files
authored
[release/8.0] Disable parallel restore for linker tests (#65375)
* Add RestoreDisableParallel to project template Added RestoreDisableParallel property to mitigate issue #61178. * Disable parallel restore for test console apps * Add PropertyGroup to disable parallel restore for tests Added a PropertyGroup to disable parallel restore for trimming test projects to mitigate a specific issue. * Disable parallel build for trimming tests * Fix closing tag for PropertyGroup in Directory.Build.props
1 parent 88e53d1 commit 7738c5e

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@
9191
<DisableLogTaskParameterItemMetadata_Csc_References>$(TrimTaskParameters)</DisableLogTaskParameterItemMetadata_Csc_References>
9292
</PropertyGroup>
9393

94+
<PropertyGroup Condition="'$(IsTrimmingTestProject)' == 'true'">
95+
<!-- Should mitigate https://github.com/dotnet/aspnetcore/issues/61178 -->
96+
<RestoreDisableParallel>true</RestoreDisableParallel>
97+
</PropertyGroup>
98+
9499
<Import Project="eng\QuarantinedTests.BeforeArcade.props" />
95100
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
96101
<Import Project="eng\QuarantinedTests.AfterArcade.props" />

eng/testing/linker/project.csproj.template

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
<MicrosoftNETCoreAppRuntimeVersion>{MicrosoftNETCoreAppRuntimeVersion}</MicrosoftNETCoreAppRuntimeVersion>
99
<RepoRoot>{RepoRoot}</RepoRoot>
1010
<_ExtraTrimmerArgs>{ExtraTrimmerArgs} $(_ExtraTrimmerArgs)</_ExtraTrimmerArgs>
11+
<!-- Should mitigate https://github.com/dotnet/aspnetcore/issues/61178 -->
12+
<RestoreDisableParallel>true</RestoreDisableParallel>
1113
{AdditionalProperties}
1214
</PropertyGroup>
1315

eng/testing/linker/trimmingTests.targets

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,10 @@
102102
DependsOnTargets="GenerateProjects">
103103

104104
<MSBuild Projects="@(TestConsoleApps)"
105+
BuildInParallel="false"
105106
Targets="Restore"
106107
Condition="'$(SkipTrimmingProjectsRestore)' != 'true'"
107-
Properties="MSBuildRestoreSessionId=$([System.Guid]::NewGuid());Configuration=$(Configuration)" />
108+
Properties="MSBuildRestoreSessionId=$([System.Guid]::NewGuid());Configuration=$(Configuration);RestoreDisableParallel=true" />
108109

109110
<MSBuild Projects="@(TestConsoleApps)"
110111
Targets="Publish"

0 commit comments

Comments
 (0)