NuGet-生成nuspec文件时出错
为项目运行NuGet-生成nuspec文件时出错,nuget,Nuget,为项目运行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
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" />
但是,我不想指定一个版本。我认为我不需要,请参阅文档:
这是怎么回事?我认为这只是一个警告,应该被忽略 它似乎只针对一个包发出警告,因此,尽管它似乎特别指出Newtonsoft.Json需要一个版本,但如果我对依赖项重新排序,它总是列表中调用警告的第一个(没有版本)