-
Notifications
You must be signed in to change notification settings - Fork 262
Description
NuGet Product Used
dotnet.exe
Product Version
.NET 10p6, but likely quite old
Worked before?
No response
Impact
It's more difficult to complete my work
Repro Steps & Context
While debugging a new DevKit feature to allow specific restores of solution/projects, users reported that the solution would never show that projects were up to date. After some investigation, the root cause of the problem is pretty simple, I think: inconsistent casing of file/project paths in the dgspec.json that NuGet restore uses as its cache-key-generator -

Background: restore tracks a ton of inputs itself outside of the MSBuild incrementality model, so to enable short-circuiting/early-exit behaviors they generate a tree representing all the inputs for a project and use the hash of that structure to check if things are up to date. if the contents of that file materially change between runs of Restore, then the impacted projects will never be up to date.
In order to prevent this additional work, NuGet should normalize paths before writing them to the dgspec, so that the generated hashes are more likely to remain consistent.