Make restore command check if dependencies and lock file are in sync
See original GitHub issueThis may be an issue in Paket.VisualStudio in fact so i’ll post in both and well see where it goes
Description
Open a project with changes on Paket.dependencies does not impact paket.lock The Idea should be : When you get the Latest source control version, open it and rebuild it (the solution). You should be using the “dependencies” version, even if it means updation paket.lock (see repro step)
Repro steps
Please provide the steps required to reproduce the problem
- Create a solution that use paket and where paket.dependencies have something like :
nuget MyLib 1.0
paket install
The paket.lock is created, Build your solution and the close Visual Studio
2. To simulation a change on SourceControl open your “paket.dependencies” and change it :
nuget MyLib 2.0
- Re open your solution in Visual Studio Try to rebuild all … You’ll see that “paket.lock” did not took the v2.0 of the lib but is still using 1.0 But paket.dependencies indicate v2.0
Expected behavior
Please provide a description of the behavior you expect.
Actual behavior
Known workarounds
Force “Install manually” when you open the solution (it’s a bit f*** up right ?)
Related information
- Operating system : Win10
- Release 3.1.9
- Lastest Vs Extension also
- .NET Framework 4.5.x
Issue Analytics
- State:
- Created 7 years ago
- Comments:40 (33 by maintainers)
Top GitHub Comments
@tebeco What nobody has said jet: You should really add the lockfile to your source control if it isn’t (and your report sounds like it isn’t). That way you get exactly the same version as the one running
paket update
orpaket install
. That’s really the way to use paket. There is never a reason to not have the lockfile added to your source control. Plus what @baronfel has already said. You cannot expect paket to do something differently when neitherpaket install
norpaket update
has been called. That’s exactly the advantage paket tries to deliver.This issue shows that throwing an error is probably the better default behavior (but imho its wrong because restore should not need to read
paket.dependencies
).yes sorry.
I changed ti to print a warning instead of failing the restore. I will continue to fix the out-of-date check. Sorry for causing so much trouble,