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

Restore resolves to a different version than defined in packages.lock.json file #7667

Closed
jainaashish opened this issue Dec 28, 2018 · 1 comment · Fixed by NuGet/NuGet.Client#2583

Comments

@jainaashish
Copy link
Contributor

jainaashish commented Dec 28, 2018

Steps to repro:

  1. Create a new project and enable lock file feature
  2. Create a local feed with package package version 1.0.0
  3. Add a packageRef of packageA with version 1.0.*. This will resolve to version 1.0.1 and add that in to lock file.
  4. Create another version 1.0.1 of packageA in local feed and delete 1.0.0.
  5. Clean project assets file and global packages folder.
  6. Restore

This will resolve to packageA and version 1.0.0 which is different than what is defined in lock file.

Another scenario, is when project requested package version 1.0.* and lock file has 1.0.1 but the global packages folder has 1.0.2 version. Then also, it will resolve to 1.0.2.

@jainaashish
Copy link
Contributor Author

Merged to release-4.9.3 branch with commit 70f87565429e2dd987843bd51b0cac169bee135c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants