我在VS中的Windows上创建了一个项目。在Mac OS X上克隆并使用JetBrains Rider EAP打开后,我无法恢复Nuget包。
我无法安装或升级任何软件包。骑手为每个包裹抛出以下错误:
ReSharperHostException
A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. One or more errors occurred. Package 'Newtonsoft.Json.8.0.3' already exists in project 'MovieLensMongo'
--- EXCEPTION #1/5 [PackageAlreadyInstalledException]
Message = “Package 'Newtonsoft.Json.8.0.3' already exists in project 'MovieLensMongo'”
ExceptionPath.1 = Root.InnerException.InnerException.InnerException.InnerException
ExceptionPath.2 = Root.InnerException.InnerExceptions.#0.InnerException.InnerException
ExceptionPath.3 = Root.InnerException.InnerException.InnerExceptions.#0.InnerException
ExceptionPath.4 = Root.InnerException.InnerExceptions.#0.InnerExceptions.#0.InnerException
ClassName = NuGet.PackageManagement.PackageAlreadyInstalledException
HResult = COR_E_EXCEPTION=80131500
--- Outer ---
当我创建一个新项目时,我不会遇到任何这些错误。我可以毫无问题地安装或升级新软件包。
有人有类似的问题吗?
在Rider版本RS-144.5342(Windows)上,NuGet窗口的"选项"选项卡上现在有一个"恢复"按钮。
好的,我发现了问题。
目前Rider不支持恢复NuGet包(https://www.jetbrains.com/rider/documentation/rider_survival_guide.html#using-nuget):
Rider在构建之前还不支持包还原--现在可以从命令行使用nuget.exe还原。此功能将随着EAP的进展而添加