Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NU1004 should contain more actionable information #7696

Closed
nkolev92 opened this issue Jan 15, 2019 · 1 comment · Fixed by NuGet/NuGet.Client#3844
Closed

NU1004 should contain more actionable information #7696

nkolev92 opened this issue Jan 15, 2019 · 1 comment · Fixed by NuGet/NuGet.Client#3844

Comments

@nkolev92
Copy link
Member

nkolev92 commented Jan 15, 2019

Currently the message when a lock file is inconsistent with the project is the following:

2019-01-15T05:13:49.0324738Z ##[error]src\NuGet.Clients\NuGet.PackageManagement.PowerShellCmdlets\NuGet.PackageManagement.PowerShellCmdlets.csproj(0,0): Error NU1004: The packages lock file is inconsistent with the project dependencies so restore can't be run in locked mode. Please disable RestoreLockedMode MSBuild property or pass explicit --force-evaluate flag to run restore to update the lock file.

Ideally this message contains information about what NuGet thinks changed.
Couple of different options causing NU1004.

  • PackageReference add/remove
  • PackageReference update
  • ProjectReference add/remove
  • ProjectReference transitive packages add/remove/update
  • TFM change.

The reason for this is that I'm seeing lots of failures in https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=2331449, but it doesn't necessarily tell us what's wrong.

//cc @jainaashish @anangaur

@nkolev92
Copy link
Member Author

A lot of work has gone in dev-nkolev92-betterNU1004Messages. At the minimum it contains a good start.

@nkolev92 nkolev92 removed their assignment Nov 17, 2020
@kartheekp-ms kartheekp-ms self-assigned this Nov 30, 2020
@kartheekp-ms kartheekp-ms added this to the Sprint 180 - 2020.11.30 milestone Nov 30, 2020
@nkolev92 nkolev92 added the Priority:2 Issues for the current backlog. label Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants