Use DisableRarCache, earlier workaround is wrong
authorDavis Goodin <dagood@microsoft.com>
Tue, 25 Jun 2019 18:05:49 +0000 (13:05 -0500)
committerDavis Goodin <dagood@microsoft.com>
Tue, 25 Jun 2019 18:05:49 +0000 (13:05 -0500)
Commit migrated from https://github.com/dotnet/core-setup/commit/4691d1591777c7c885dc6ad0e979303e006c229b

src/installer/pkg/packaging-tools/framework.packaging.targets
src/installer/pkg/projects/Directory.Build.props
src/installer/pkg/projects/windowsdesktop/pkg/Microsoft.WindowsDesktop.App.pkgproj

index c7f1ea1..652f678 100644 (file)
       this itself because it would miss the cache of finished builds.
     -->
     <MSBuild
-      Projects="@(ProjectReference);@(WaitOnlyProjectReference)"
+      Projects="@(ProjectReference)"
       Targets="Build" />
 
     <MSBuild
index d8ce1dd..3b38e15 100644 (file)
     <RestoreOutputPath>$(BaseIntermediateOutputPath)</RestoreOutputPath>
     <ProjectAssetsFile>$(RestoreOutputPath)\project.assets.json</ProjectAssetsFile>
 
+    <!--
+      Disable ResolveAssemblyReference cache. The packaging projects run in parallel and use MSBuild
+      tasks calling various targets, many of which use ResolveReferences. The parallel writes to the
+      cache conflict and cause build failures. Disable the cache to avoid this.
+
+      In the long term, the "base" project build (depproj as of writing) should lay out the files or
+      metadata in a way the other projects can consume. Gathering the information ahead of time
+      removes the benefit of a cache.
+    -->
+    <DisableRarCache>true</DisableRarCache>
+
     <RestoreAllBuildRids>true</RestoreAllBuildRids>
   </PropertyGroup>
 
index 0dab35b..8b54a9e 100644 (file)
     <IgnoredReference Condition="'$(PackageTargetRuntime)' == ''" Include="DirectWriteForwarder" />
   </ItemGroup>
 
-  <!--
-    Wait for Microsoft.NETCore.App pkgprojs to be done with netcoreapp.depproj, but don't take any
-    dependency on the assets. ResolveAssemblyReference tasks running in parallel may try to write to
-    netcoreapp.depprojAssemblyReference.cache, hit the other's lock, and fail.
-  -->
-  <ItemGroup>
-    <WaitOnlyProjectReference Include="..\..\netcoreapp\pkg\legacy\*.pkgproj" />
-  </ItemGroup>
-
   <Target Name="GetNETCoreAppIgnoredReference" BeforeTargets="VerifyClosure">
     <MSBuild
       Projects="../../netcoreapp/src/netcoreapp.depproj"