You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Terminate generated packages.lock.json with a newline #15168
dotnet restore with .NET SDK 11.0.100 writes a multiline packages.lock.json without a final newline. This causes the end-of-file-fixer Git hook to modify newly generated lockfiles. The resulting file restores correctly in locked mode, but a developer or bot regenerating the lock gets a recurring whitespace change.
Minimal reproduction in an empty scratch directory:
Actual output: b' }\n}'. Expected: the same formatted JSON with a final \n after the closing brace. Our current workaround is to run the hook to add the newline and stage the resulting lockfile, as in link-foundation/csharp-ai-driven-development-pipeline-template#127.
Could PackagesLockFileFormat.Write in NuGet.ProjectModel append a literal LF after its JSON writer flushes, with a test that verifies byte-stable output across platforms and parses it back in locked mode? That would let us regenerate and stage the lockfile in one step. The extra byte is valid JSON whitespace.
Activity