NuGet - 生成 nuspec 文件时出错

NuGet - Error when generating nuspec file

当我 运行 nuget.exe pack 一个项目时,我得到以下错误:

EXEC : warning : 1 issue(s) found with package 'Company.LibName'.

  Issue: Specify version of dependencies.
  Description: The version of dependency 'Newtonsoft.Json' is not specified.
  Solution: Specifiy the version of dependency and rebuild your package.

(留言中确实有错别字)

.nuspec 文件中的违规行是下面的最后一行:

<dependencies>
  <group targetFramework="net45">
    <dependency id="Newtonsoft.Json" />

但是,我不想指定版本。而且我认为我不需要,请参阅文档:

https://docs.nuget.org/create/nuspec-reference#specifying-dependencies-in-version-2.0-and-above

怎么回事?

我认为这只是一个警告,可以忽略。

它似乎只对一个包发出警告,所以虽然它似乎已经挑出 Newtonsoft.Json 需要一个版本,但如果我重新排序依赖项,它总是列表中的第一个(没有版本)调用警告。