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

Errors from lock file enforcement should show up in Error List Window #7429

Closed
v-luzh opened this issue Oct 23, 2018 · 4 comments
Closed

Errors from lock file enforcement should show up in Error List Window #7429

v-luzh opened this issue Oct 23, 2018 · 4 comments

Comments

@v-luzh
Copy link

v-luzh commented Oct 23, 2018

Details about Problem

NuGet version: NuGet Client Release-4.9.0-preview5\4.9.0.5627
VS Version: D15.9\28219.56
OS Version: Windows 10 RS4_Release 17134.1.180410-1804

Detailed repro steps

  1. Create a C# Console Application (.NET Core) project via VS.
  2. Install a few ‘PackageReference’ packages into the project.
  3. Set MSBuild property “RestorePackagesWithLockFile” to true in csproj file.
  4. Do a restore.
  5. Check it should have generated ‘packages.lock.json’ file alongside *.csproj file.
  6. Set the msbuild property “RestoreLockedMode” to “true”.
  7. Install another package.
  8. It should still work fine and update ‘packages.lock.json’ file.
  9. Manually add a new PackageReference item into csproj file.
  10. Perform restore.

Expected

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 --reevaluate flag to run restore to update the lock file” should show in Error List window.

Actual

Nothing shows in Error List window as below screenshot.
bug7429

Note

It just repro on C# Console Application (.NET Core) when restoring through PM UI.

@jainaashish
Copy link
Contributor

is the error there in obj\project.assets.json file?

@v-luzh
Copy link
Author

v-luzh commented Oct 24, 2018

This error is not in obj\project.assets.json file.

@v-luzh
Copy link
Author

v-luzh commented Oct 31, 2018

No error show when restoring through command "dotnet restore" on D16.0 28230.56 + NuGet Client Dev 5.0.0.5638.

@v-luzh
Copy link
Author

v-luzh commented Dec 4, 2018

This issue is fixed on D16.0 28327.66 + NuGet Client Dev\5.0.0.5703.

@jainaashish jainaashish added this to the 5.0 milestone Dec 4, 2018
@jainaashish jainaashish self-assigned this Dec 4, 2018
@rrelyea rrelyea changed the title [Test Failure][Repeatable Restore] No error show in Error List window when adding new PackageReference item into csproj file after enabling “RestoreLockedMode” Errors from lock file enforcement should show up in Error List Window Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants