加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c# – 无法安装nuget包unity 2

发布时间:2020-12-15 22:03:02 所属栏目:百科 来源:网络整理
导读:我需要将我的应用程序从4.5降级到3.5并且我安装了unity 3.现在我无法从nuget安装unity 2.1,因为这个错误: PM Install-Package Unity -Version 2.1.505.2The source at nuget.org [https://www.nuget.org/api/v2/] is unreachable. Falling back to NuGet Lo
我需要将我的应用程序从4.5降级到3.5并且我安装了unity 3.现在我无法从nuget安装unity 2.1,因为这个错误:

PM> Install-Package Unity -Version 2.1.505.2
The source at nuget.org [https://www.nuget.org/api/v2/] is unreachable. Falling back to NuGet Local Cache at C:UsersvoskresenskiyAppDataLocalNuGetCache
Install-Package : Unable to find version '2.1.505.2' of package 'Unity'.
At line:1 char:16
+ Install-Package <<<<  Unity -Version 2.1.505.2
    + CategoryInfo          : NotSpecified: (:) [Install-Package],InvalidOperationException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

我究竟做错了什么?我会感激任何帮助

解决方法

看起来您的互联网连接已关闭或Nuget Org暂时无法访问,并且所需的Unity版本在缓存中无法使用.

在this接受:

Though NuGet packages are typically consumed from a remote gallery
such as the NuGet gallery using a network connection,there are many
scenarios where the client is not connected. Without a network
connection,the NuGet client was not able to successfully install
packages – even when those packages were already on the client’s
machine in the local NuGet cache. NuGet 2.8 adds automatic cache
fallback to the package manager console. For example,when
disconnecting the network adapter and installing jQuery,the console
shows the following:

PM> Install-Package jquery The source at nuget.org
[https://www.nuget.org/api/v2/] is unreachable. Falling back to NuGet
Local Cache at C:UsersmeAppDataLocalNuGetCache Installing
‘jQuery 2.0.3’. Successfully installed ‘jQuery 2.0.3’. Adding ‘jQuery
2.0.3’ to WebApplication18. Successfully added ‘jQuery 2.0.3’ to WebApplication18.

编辑:

在测试相同的命令后,我可以确认它工作正常,使用相同的版本,我可以使用nuget安装它,检查nuget的设置,并确保nuget.org检查为包源.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读