Associate inputs and outputs for .Views dll with a set in FastUpToDate check (dotnet/aspnetcore-tooling#1277)

Follow up to https://github.com/dotnet/project-system/issues/5596

FastUpToDateCheck now has a way to associate inputs and outputs using the Set attribute.
This change prevents FastUpToDateCheck from rebuilding a project when a *.cshtml file is
newer than the project's dll output.

Fixes https://github.com/aspnet/AspNetCore/issues/13204\n\nCommit migrated from 2bf9c12490
This commit is contained in:
Pranav K 2019-10-31 12:31:50 -07:00 committed by GitHub
parent e2dc96c7b9
commit 7f36d6e5f0
1 changed files with 2 additions and 2 deletions

View File

@ -307,7 +307,7 @@ Copyright (c) .NET Foundation. All rights reserved.
Add all cshtml files to UpToDateCheckInput - a collection of files used by FastUpToDateCheck to determine
if any of the the project inputs have changed.
-->
<UpToDateCheckInput Condition="'$(RazorCompileOnBuild)'=='true'" Include="@(Content->WithMetadataValue('Extension', '.cshtml'))" />
<UpToDateCheckInput Condition="'$(RazorCompileOnBuild)'=='true'" Include="@(Content->WithMetadataValue('Extension', '.cshtml'))" Set="RazorViews" />
<!--
Add all .razor files to UpToDateCheckInput. Component compilation is not controlled by RazorCompileOnBuild,
@ -320,7 +320,7 @@ Copyright (c) .NET Foundation. All rights reserved.
if any of the project's outputs have changed.
-->
<UpToDateCheckBuilt Include="@(RazorIntermediateAssembly)"
Condition="'$(RazorCompileOnBuild)'=='true' AND '@(Content->WithMetadataValue('Extension', '.cshtml'))' != ''" />
Condition="'$(RazorCompileOnBuild)'=='true' AND '@(Content->WithMetadataValue('Extension', '.cshtml'))' != ''" Set="RazorViews" />
<!-- Set up watchers for dotnet-watch -->
<Watch Include="@(Content->WithMetadataValue('Extension', '.razor'))" />