Reputation: 11867
I have a .NET 461 project that references a NuGet targeting .NET Standard 1.6.
As i've understood by this answer, referecing this NuGet will cause my .NET 461 projects packages.config to look like the following:
<packages>
...
<package id="NETStandard.Library" version="1.6.1" targetFramework="net46" />
...
</packages>
Actually, it looks more like this (there's like atleast 10 more that I haven't included here for simplicity):
<packages>
...
<package id="NETStandard.Library" version="1.6.1" targetFramework="net46" />
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net46" />
<package id="System.AppContext" version="4.3.0" targetFramework="net46" />
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net46" />
...
</packages>
Is it NETStandard.Library
that automagically references all these? I cannot find any information about this.
Upvotes: 0
Views: 75
Reputation: 239636
One of the recent improvements where packages we're moved from being referenced in packages.config
to being referenced in project files was that they could implement a change wherein only your direct project dependencies are included in the file. Packages that those dependencies rely upon do not appear in the project file.
However, your snippet suggests that you're still using a packages.config
file - in which case all dependencies in the transitive closure get included in the file, unfortunately, for backwards compatibility reasons.
Which specific packages you directly referenced (and which of those caused a particular package to appear in the packages.config due to a dependency) aren't recorded in this file.
Upvotes: 2