我的拥有
我拥有可移植类库MyProj.Backend.Contracts.csproj
,其中包含以下内容:
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"
}
}
}
以及 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>
请注意,我已将NuSpec.ReferenceGenerator添加到我的项目中,这会将''添加到我的项目json中。
然而,我仍然无法打包我的PCL库:
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
我需要什么
如何修改我的 .nuspec 文件以便从我的 PCL 库项目创建包?