Open innominateAtWork opened 1 month ago
Similarly adding a File3.txt also does not cause rebuild
Team triage: @JaynieBai! Could you please try to repro and collect binlogs for this issue?
@AR-May I repro this issue locally. Here is the log when delete the File1.txt. there is no File1.txt shown in the binlog. CentralNode_dotnet_PID=24032_x64_BuildManager_Default.binlog.txt
But when delete the File1.txt and save the other files in the project folder. The date modified is updated. It will rebuild the project and output different result.
Similarly adding a File3.txt also does not cause rebuild
Can't repro this one
Thank you @JaynieBai!
@rainersigwald the incremental build scenario is broken when one tries to delete from EmbeddedResources
, but no other change is present. It seems like the CoreCompile target is skipped due to all outputs being newer than all inputs, which is true, but not correct. The only change since the previous build is deleted File1.txt and it is absent from inputs as well, so this change does not trigger the re-compilation of assembly.
It looks like copying a file does not trigger a rebuild, but creating a new file does.
> dotnet run
MyApp.File1.txt = A
MyApp.File2.txt = B
> cp File2.txt File3.txt
> dotnet run
MyApp.File1.txt = A
MyApp.File2.txt = B
> echo C > File4.txt
> dotnet run
MyApp.File1.txt = A
MyApp.File2.txt = B
MyApp.File3.txt = B
MyApp.File4.txt = C
Ah that makes sense and we should fix it by bringing back https://github.com/dotnet/msbuild/pull/6780.
Issue Description
dotnet build
does not detect deleted EmbeddedResources.Steps to Reproduce
dotnet run
it outputs all files included as EmbeddedResources in MyApp.csproj and their contentdotnet run
the project rebuilds and includes the updated textdotnet run
the project does NOT rebuild the run looks identical to the prior runExpected Behavior
MyApp rebuilds because an EmbeddedResources has been deleted.
Actual Behavior
MyApp does NOT rebuild.
Analysis
No response
Versions & Configurations
MSBuild version 17.11.3+0c8610977 for .NET 17.11.3.35201