What I have
I have Portable Class Library MyProj.Backend.Contracts.csproj
with following
project.json:
{
"supports": {
"net46.app": {},
"uwp.10.0.app": {},
"dnxcore50.app": {}
},
"dependencies": {
"Microsoft.NETCore": "5.0.0",
"Microsoft.NETCore.Portable.Compatibility": "1.0.0",
"NuSpec.ReferenceGenerator": "1.4.2"
},
"frameworks": {
"dotnet": {
"imports": "portable-net452+win81"
}
}
}
and nuspec:
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>MyProj.Backend.Contracts</id>
<version>1.0.0</version>
<dependencies>
<group targetFramework="dotnet">
<dependency id="System.Resources.ResourceManager" version="4.0.0" />
<dependency id="System.Runtime" version="4.0.20" />
</group>
</metadata>
</package>
Notice, that I've added NuSpec.ReferenceGenerator to my project, that added '' to my project json.
However, I'm still not able to pack my PCL library:
nuget pack MyProj.Backend.Contracts.csproj
Attempting to build package from 'MyProj.Backend.Contracts.csproj'.
Packing files from 'C:\Projects\MyProj\Backend\Contracts\Dev\bin\Contracts'.
Using ''MyProj.Backend.Contracts.csproj.nuspec' for metadata.
Value cannot be null or an empty string.
Parameter name: profileValue
What I need
How to modify my .nuspec so I can create package from my PCL library project?