在 Mono Returns 中使用 NuGet 打包项目未实现错误

Packing Project with NuGet in Mono Returns Not Implemented Error

我正在尝试使用 Mono (4.2.1) 和 NuGet (2.8.5.0) 打包一个项目。 nuget pack Project.csproj 的完整详细输出是

Attempting to build package from 'Project.csproj'.
The method or operation is not implemented.

nuget pack project.csproj 当前不支持 Mono。请参考相应的Bugzilla entry.

使用项目文件 (.csproj) 生成 NuGet 包使用了 MSBuild 中未在 Mono 中实现的部分。相反,您需要创建一个 .nuspec 文件并使用 nuget pack YourNuspec.nuspec 生成带有 Mono 的 NuGet 包。

这现在已在 nuget 中修复,更多信息可以在这张票中找到: https://github.com/NuGet/Home/issues/1946

运行 以下内容更新 nuget,它将起作用

Mac

sudo nuget update -self

Windows

nuget.exe update -self