Project-system: Up to date check looks for all files in the project root, not at their own paths

Created on 16 Aug 2017  路  4Comments  路  Source: dotnet/project-system

Repro: https://github.com/gulbanana/repro-netcore-up2date-subdir

Problem: subdirectory\TextFile1.txt is PreserveNewest, so it should be up to date after a build. However, logging reports otherwise:

1>FastUpToDate: Latest write timestamp on input is 16/08/2017 11:20:10 AM on 'C:\code\repro-netcore-up2date-subdir\ClassLibrary1\ClassLibrary1.csproj'. (ClassLibrary1)
1>FastUpToDate: Earliest write timestamp on output is 16/08/2017 11:20:15 AM on 'C:\code\repro-netcore-up2date-subdir\ClassLibrary1\obj\Debug\netcoreapp2.0\ClassLibrary1.pdb'. (ClassLibrary1)
1>FastUpToDate: Checking PreserveNewest file 'C:\code\repro-netcore-up2date-subdir\ClassLibrary1\subdirectory\TextFile1.txt': (ClassLibrary1)
1>FastUpToDate:     Write 16/08/2017 11:14:25 AM: 'C:\code\repro-netcore-up2date-subdir\ClassLibrary1\subdirectory\TextFile1.txt'. (ClassLibrary1)
1>FastUpToDate:     Output file 'bin\Debug\netcoreapp2.0\TextFile1.txt' does not exist. (ClassLibrary1)
1>FastUpToDate: Project is not up to date. (ClassLibrary1)

bin\Debug\netcoreapp2.0\subdirectory\TextFile1.txt exists, but something is looking at bin\Debug\netcoreapp2.0\TextFile1.txt instead and concluding that the file needs to be recreated.

Bug Feature-Up-to-date

All 4 comments

this seems to happen for Content items but not for None items

Have a fix for this.

This is because we're not rooting the output path correctly.

This has been resolved and will be fixed in the next update of Visual Studio 15.4.

Was this page helpful?
0 / 5 - 0 ratings