I've created a nuget package which has 2 assemblies. One targeting .Net Framework 4.0 and another targeting .Net Standard 1.6.
This seems to work without any problems. However, the version targeting .NET Standard requires a couple of extra dependencies to function so I added these as dependencies in the nuspec file and rebuilt.
The dependencies show up as expected in the NuGet Package Manager but when I reference the package from a .Net Core or .Net Standard Application, it does not add references for the dependencies. The package seems to install fine, with no errors in the log.
This is the relevant part of my nuspec file:
<dependencies>
<group targetFramework="netstandard1.3">
<dependency id="System.Collections.Specialized" version="4.0.1.0" />
<dependency id="System.Threading.Tasks.Parallel" version="4.3.0.0" />
</group>
<group targetFramework="netcoreapp1.0">
<dependency id="System.Collections.Specialized" version="4.0.1.0" />
<dependency id="System.Threading.Tasks.Parallel" version="4.3.0.0" />
</group>
</dependencies>
What am I missing here?
Edit:
A little more info:
I tried removing the grouping from the config above and just had the dependencies listed with no grouping, then I tried installing the package on a regular ASP.NET project.
When you install the package via Package Manager, a window pops up listing the packages that are being installed and in this case, it lists my package plus the dependencies. All good.
However, when I install the same package on a .NETCoreApp or .NETStandard project, only my package appears in the list.
Edit 2:
I've been discussing this with the very helpful people at NuGet support and discovered that if we use the same package, added to a .NET Core app in Visual Studio 2017 then it works fine, it's only in VS 2015 that the problem occurs.
They've asked me to raise an issue on github.
