Skip to content

Transitive pinning with cpm and packages.lock.json #11927

Answered by zivkan
forrestab asked this question in Q&A
Discussion options

You must be logged in to vote

They serve different purposes, but there is some overlap.

With CPM and transitive pinning, you can ensure that transitive dependencies will be resolved to a specific version, which is something that lock files also do. However, CPM is designed to have a single place to define all those versions across an entire solution/repository, which lock files don't do.

lock files on the other hand, pinning versions so that can't change is one feature. But they also do content hash comparisons, so you get SHA256 "security" that the package the developer who first added the package to the project is the same as what's being used on all other machines, which protects you from a nuget feed hack (or http…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@forrestab
Comment options

Answer selected by forrestab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants