I have a NuGet .nuspec that looks like this:
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
<metadata>
<id>XXXXXXXXX</id>
<version>1.0.0-alpha</version>
<authors>XXXXXXXXX</authors>
<owners>XXXXXXXXXXX</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>XXXXXXXXXXXXXXXXXXX</description>
<copyright>XXXXX</copyright>
<dependencies>
<group>
<dependency id="Dependency1" version="1.0.0" />
</group>
<group targetFramework=".NETFramework3.5">
<dependency id="Dependency2" version="3.9.71" />
</group>
<group targetFramework=".NETFramework4.0">
<dependency id="Dependency3" version="4.0.30" />
<dependency id="Dependency4" version="4.0.30" />
<dependency id="Dependency5" version="4.0.30" />
<dependency id="Dependency6" version="4.0.30" />
</group>
</dependencies>
</metadata>
<files>
<file src=".XXX.Net35\bin\Release\XXX.dll" target="lib\net35" />
</files>
</package>
When I package the NuGet package with the nuspec via:
nuget pack XXXXXX.nuspec
Everything is good, the dependency groups are all there. If I package with the csproj like:
nuget pack XXXXXX.csproj
The dependencies are all lumped into one target rather than in groups. I really want the functionality of using the $id$ and $version$ variables with the ability to do dependency groups based on target framework.
Anyone know of a solution?