我试图通过NuGet.exe从一个项目(*.csproj)创建和发布NuGet包,但是出现了以下警告:
替换标记“description”没有值。
我该如何消除这个警告?
nuget pack your-project.csproj
。-Build
让NuGet进行构建。
当使用nuget.exe打包*.csproj文件时,请确保在目标项目的Properties\AssemblyInfo.cs文件中定义了程序集描述。
[assembly: AssemblyDescription("Here goes the NuSpec $description$ token.")]
请查看NuGet文档中有关令牌化NuGet清单的更多信息:http://docs.nuget.org/docs/reference/nuspec-reference#Replacement_Tokens
$description$ 这个值在 AssemblyInfo.cs 的 AssemblyDescription 中得到替换。 然而,在创建包之前需要构建项目。为了让 NuGet 为你自动构建项目,你可以使用 -build 标志。
path:\to\project\nuget.exe [project.csproj] -build
nuget pack projectName.csproj