File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 129129 <Target Name =" Test" DependsOnTargets =" ExecuteApplications" />
130130 <Target Name =" VSTest" DependsOnTargets =" Test" />
131131
132- <!-- define Restore/Build to do nothing, for this project only Test does the testing -->
133- <Target Name =" Restore" />
132+ <!--
133+ The Restore target generates and restores the trimming test projects. BuildAfterTargetingPack.csproj calls
134+ Restore on all delayed-build .proj files with BuildInParallel="false", which serializes these restores and
135+ avoids a NuGet file-move race on Windows where concurrent static-graph restores race when committing
136+ project.assets.json for shared ProjectReference targets (https://github.com/dotnet/aspnetcore/issues/61178).
137+ PublishTrimmedProjects also restores as a fallback for local dev where Restore may not be called separately;
138+ after the serialized Restore phase in CI those calls are fast no-ops.
139+ -->
140+ <Target Name =" Restore" DependsOnTargets =" GenerateProjects" >
141+ <MSBuild Projects =" @(TestConsoleApps)"
142+ BuildInParallel =" false"
143+ Targets =" Restore"
144+ Condition =" '$(SkipTrimmingProjectsRestore)' != 'true'"
145+ Properties =" MSBuildRestoreSessionId=$([System.Guid]::NewGuid());Configuration=$(Configuration);RestoreDisableParallel=true" />
146+ </Target >
134147 <Target Name =" Build" />
135148</Project >
You can’t perform that action at this time.
0 commit comments