Please confirm assumption on "centralPackageVersions" #13240
Unanswered
georg-eckert-zeiss
asked this question in
Q&A
Replies: 1 comment
-
The "wiki" is an early design spec, and we don't maintain design specs after new features modify the original spec's design, or even if the implementation discovered difficulties and therefore the design changed slightly. Only use learn.microsoft.com/nuget as a reference. As the docs say, you have to opt into transitive pinning. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
according to the NuGet wiki adding a package version to
Directory.Packages.props
enforces the same package version in the whole solution - even when not explicitly referenced in a project (lets assume it is not referenced anywhere in a project's explicit dependency tree - only via transitive dependencies).ProjectA > PackageA (explicit) > PackageB v1.0.0 (transitive)
ProjectB > PackageC (explicit) > PackageB v1.4.0 (transitive)
Directory.Packages.props: PackageB v2.0.0
So the one actually used will be PackageB v2.0.0 - although not explicitly referenced in my solution. Right?
Is this what this means in the Microsofts docs?
So when I look into my
project.assets.json
in a built project and the tree resolves to PackageB v1.4.0 but the sectioncentralPackageVersions
looks like the following, version 2.0.0 will be used in the end, right?Best regards,
Georg
Beta Was this translation helpful? Give feedback.
All reactions