Unable to pack a NuGet package using dotnet CLI and nuspec file

好久不见. 提交于 2019-12-06 05:53:25

I had same problem and solved it by adding <NuspecProperties>to csproj as suggested here: https://github.com/NuGet/Home/issues/6636

<NuspecFile>package.nuspec</NuspecFile>
<NuspecProperties>$(NuspecProperties);configuration=$(Configuration)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);version=$(Version)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);id=$(PackageId)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);author=$(Authors)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);PackageProjectUrl=$(PackageProjectUrl)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);Description=$(Description)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);PackageReleaseNotes=$(PackageReleaseNotes)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);Copyright=$(Copyright)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);PackageTags=$(PackageTags)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);RepositoryType=$(RepositoryType)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);RepositoryUrl=$(RepositoryUrl)</NuspecProperties>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!