In short, the check for "did the input files change" should go above the check for "can this be incremental", or both checks should happen and the user should be notified of both conditions.
dotnet new
dotnet build
change program.cs (change the string it prints, whatever)
dotnet build --no-incremental
Project test (.NETCoreApp,Version=v1.0) will be compiled because inputs were modified
Project test (.NETCoreApp,Version=v1.0) will be compiled because project is not safe for incremental compilation. Use --build-profile flag for more information.
dotnet --info
output:
.NET Command Line Tools (1.0.0-rc2-002608)
Product Information:
Version: 1.0.0-rc2-002608
Commit Sha: 9a85205781
Runtime Environment:
OS Name: Windows
OS Version: 10.0.10586
OS Platform: Windows
RID: win10-x64
That warning message doesn't make sense anyways, does it? Isn't the default template project safe for incremental compilation?
It is. --no-incremental causes this to happen. See dotnet/sdk#5907
Just tested this on the Preview 4 tools (MSBuild-based) and the repro is not there. That is, the error is not there anymore and if I pass in --no-incremental
and turn on normal verbosity, I can see that the CoreCompile
task is running always (several retries).
I will go ahead and close this issue @billwert but please reopen if you see this repro or you think the closing was in error. Thanks!