如何在 Mono 中安装 NuGet 包

How to install NuGet package in Mono

我已经在我的 Raspberry Pi 3 上安装了 Mono(3.2.8 版)来执行将文本文件上传到 SharePoint 的 C# 程序。 该程序使用名为 Microsoft.SharePointOnline.CSOM.

的 NuGet 包

我可以在我的 Windows PC 上执行该程序,但我不知道如何在 Mono 中安装该程序包以在那里执行它。

有人能帮帮我吗?

restore command (NuGet CLI)

Downloads and installs any packages missing from the packages folder.

或者

install command (NuGet CLI)

Downloads and installs a package into a project, defaulting to the current folder, using specified package sources.

示例:

nuget restore mySolution.sln
nuget install Microsoft.SharePointOnline.CSOM

Mono 环境的最新版本带有 msbuild 可以恢复解决方案的依赖性(带有 /r/restore 标志):

$ msbuild solution.sln /restore

我在系统中使用了这个,其中命令whereis nuget returns什么都没有(也就是说nuget没有安装)