Skip to content

Commit

Permalink
Do not condition RAR cache on BuildingProject=false (#2812)
Browse files Browse the repository at this point in the history
VS design time builds have BuildingProject=false. This makes them not use RAR caching.
By enabling DTB RAR caching, DTB RAR time gets cut down in half on warm caches, and remains mostly unchanged on cold caches.

Times (measured design time builds via the Project System Tools extension 3 times and averaged, on an mvc project):
- no cache: 210ms
- cold cache: 211ms
- warm cache: 108ms

#closes dotnet/project-system#3022
  • Loading branch information
cdmihai committed Dec 16, 2017
1 parent b88527e commit 331cd4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Tasks/Microsoft.Common.CurrentVersion.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2012,7 +2012,7 @@ Copyright (C) Microsoft Corporation. All rights reserved.
expensive to write the newly created cache file.
-->
<PropertyGroup>
<ResolveAssemblyReferencesStateFile Condition="'$(BuildingProject)'=='true'">$(IntermediateOutputPath)$(MSBuildProjectFile)ResolveAssemblyReference.cache</ResolveAssemblyReferencesStateFile>
<ResolveAssemblyReferencesStateFile Condition="'$(DisableRarCache)'!='true'">$(IntermediateOutputPath)$(MSBuildProjectFile)ResolveAssemblyReference.cache</ResolveAssemblyReferencesStateFile>
</PropertyGroup>

<!-- Make an App.Config item that exists when AutoUnify is false. -->
Expand Down Expand Up @@ -2555,7 +2555,7 @@ Copyright (C) Microsoft Corporation. All rights reserved.
</ItemGroup>

<PropertyGroup>
<DesignTimeResolveAssemblyReferencesStateFile Condition="'$(BuildingProject)'=='true'">$(IntermediateOutputPath)$(MSBuildProjectFile)DesignTimeResolveAssemblyReferences.cache</DesignTimeResolveAssemblyReferencesStateFile>
<DesignTimeResolveAssemblyReferencesStateFile Condition="'$(DisableRarCache)'!='true'">$(IntermediateOutputPath)$(MSBuildProjectFile)DesignTimeResolveAssemblyReferences.cache</DesignTimeResolveAssemblyReferencesStateFile>
</PropertyGroup>

<PropertyGroup>
Expand Down

0 comments on commit 331cd4a

Please sign in to comment.