Add a way to associate inputs and outputs in FastUpToDate
See original GitHub issueVisual Studio Version: 16.4 Preview 2.0
Summary:
Linked ASP.NET Core issue: https://github.com/aspnet/AspNetCore/issues/13204
ASP.NET Core projects produce two compiled outputs: .cs
files (et al) produce an App.dll
, .cshtml
files produce an App.Views.dll
. When a cshtml file changes, App.dll
remains unchanged, but a newer App.Views.dll
needs to be compiled.
To allow a build to occur when cshtml files change, ASP.NET Core projects (via the Microsoft.NET.Sdk.Razor
SDK), add cshtml files to UpToCheckInput
. Fast UpToDateCheck is now aware of these files and rebuild when these files change. However doing so also leaves FastUpToDateCheck in an incosistent state - the input .cshtml
file is always newer than the output MyApp.dll
and consequently fast up to date check is broken until a user touches a cs file.
Feature request:
The feature request was to have a way to associate inputs and outputs in FUTD. By default, everything would be associated with the default UpToDateCheckBuilt
. However, Inputs would have a way to state that they specifically affect certain outputs. When FUTD runs, it correlates these and uses this to perform the dirty check.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:22 (20 by maintainers)
@rainersigwald thanks for the fix. Thankfully the horror will be contained within a local test project.
@pranavkm once the PR is up you’ll be able to F5 this repo to get the change into the
Exp
hive for further testing.I asked @panopticoncentral about the difference between
UpToDateCheckOutput
andUpToDateCheckBuilt
and the conclusion was that it’s historical. As part of the PR I’m preparing I’ll update our docs to improve our guidance on these features. I’ll be sure to include that information too, and suspect we can effectively deprecateUpToDateCheckOutput
.It’s getting lucky 😦 (microsoft/msbuild#2835 for context)
@drewnoakes use something like this instead:
(I know the
String.Copy
thing there is a horror: microsoft/msbuild#1155)