自更新NuGet后出现错误 Ubuntu 16.04

4
我正在使用Ubuntu 16.04来构建和部署dotnet core应用程序。现在我需要更新NuGet,因为一些包需要更高的NuGet版本。
当从存储库安装(使用sudo apt-get install nuget)时,NuGet的版本是:2.8.7.0
然后我使用nuget的自更新功能进行更新:'sudo uget update -self'。此操作的输出:
user@UbuntuFresh:~$ sudo nuget update -self
Checking for updates from https://www.nuget.org/api/v2/.
Currently running NuGet.exe 2.8.7.
Updating NuGet.exe to 3.5.0.
Update successful.

但是现在我尝试启动NuGet时,出现了以下错误:
user@UbuntuFresh:~$ nuget
Could not load file or assembly or one of its dependencies.
  Could not load file or assembly or one of its dependencies.
  Could not load file or assembly or one of its dependencies.
  Could not load file or assembly or one of its dependencies.

有没有任何想法可以找出我所缺少的东西?我可以重现这个问题(构建机是VirtualBox),在另一个虚拟机中,自更新成功了并且nuget仍然可以工作。

非常感谢!

1个回答

5

在进一步调查后,我偶然发现了解决方案。除此之外,我还需要安装mono-complete软件包(似乎在那之前不是必须的)。以下命令解决了这个问题:

sudo apt-get install mono-complete

谢谢。问题已解决。 - Stephen Chung
虽然这解决了问题,但我不禁想知道NuGet团队是否知道这个问题? 在我看来,“nuget update -self”应该至少写出一个警告,或者更好的是,表明需要mono才能运行最新版本的错误。 - CtC

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接