nuget检索包元数据 [英] nuget retrieving package metadata

查看:359
本文介绍了nuget检索包元数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在检索包元数据时发生错误 源代码为'nuget.org'的'bootstrap.3.3.5'. ===================

An error occurred while retrieving package metadata for 'bootstrap.3.3.5' from source 'nuget.org'. ========== Finished ==========

缺陷疑难解答网站nuget.org可能崩溃的地方,或者问题是否是本地的.我在Windows上使用Visual Basic.该缺陷在他希望下载实体框架包时开始出现,但他不接受来自官方网站包的下载内容.

Where the defect wonder Is site nuget.org may crash or whether the problem is local. I am using Visual Basic on Windows. The defect begins when he wishes to download entity framework package, but he does not accept the download nuget from the official website Package.

对正在发生的事情有解释吗?

Is there an interpretation of what is happening?

表示当我使用Visual Basic设计站点并通过asp.net Web应用程序处理数据库时,通过Visual Basic中的附加nuget安装软件包时,我遇到了上一张图片中的错误,并且知道自己到页面 https://www.nuget.org 询问是否安装NuGet. exe不接受下载意图是计算机中的问题还是向所有人公开.

meaning that when I use Visual Basic to design sites and dealing with databases through asp.net web application when I INSTALL a package through the attached nuget within Visual Basic, I was having errors that in the previous picture and knowing that I go to the page https://www.nuget.org asked Install NuGet . exe does not accept the download intent Is the problem in the computer or is it public to everyone.

检索包元数据时发生错误

An error occurred while retrieving package metadata for

我注意到Visual Studio 2015的适用于Visual Studio的NuGet软件包管理已更新至版本3.1.60724.766(从当前的3.0.60624.657),因此我下载并安装了它.同样的错误.

I noticed there was a update for Visual Studio 2015 NuGet Package Manage for Visual Studio to version 3.1.60724.766 (from current 3.0.60624.657), so I downloaded and installed it. Same errors.

修复

在Visual Studio 2015中.

In Visual Studio 2015.

工具菜单-> NuGet软件包管理器->软件包管理器设置

Tools Menu -> NuGet Package Manager -> Package Manager Settings

点击包来源

点击+标记

添加以下内容:

名称:类似NuGet v2

Name: something like NuGet v2

来源:https://www.nuget.org/api/v2/

取消勾选当前的nuget.org,使其看起来像: 看起来像

Untick the current nuget.org so it should look like: look like

现在您应该能够安装NuGet软件包

And now you should be able to install NuGet packages

&&

每个软件包均由其所有者许可给您. Microsoft对第三方程序包概不负责,也不向第三方程序包授予任何许可证.某些软件包可能包含依赖项,这些依赖关系由其他许可证控制.遵循软件包的源(提要)URL来确定任何依赖项.

Each package is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies.

Package Manager控制台主机版本3.0.0.0

Package Manager Console Host Version 3.0.0.0

键入获取帮助NuGet"以查看所有可用的NuGet命令.

Type 'get-help NuGet' to see all available NuGet commands.

PM>获取帮助NuGet 话题 about_NuGet

PM> get-help NuGet TOPIC about_NuGet

简短说明 提供有关NuGet软件包管理器命令的信息.

SHORT DESCRIPTION Provides information about NuGet Package Manager commands.

详细说明 本主题描述了NuGet软件包管理器命令. NuGet是一个集成软件包 用于向.NET项目添加库和工具的管理工具.

LONG DESCRIPTION This topic describes the NuGet Package Manager commands. NuGet is an integrated package management tool for adding libraries and tools to .NET projects.

The following NuGet cmdlets are included.

    Cmdlet                  Description
    ------------------      ----------------------------------------------
    Find-Package            Get the set of packages available from the package source, 
                            based on the package Id/keyword. This is a new command that
                            will replace Get-Package -ListAvailable.

    Get-Package             Gets the set of installed packages. With -Updates switch, 
                            gets the set of package updates available from the package source.

    Install-Package         Installs a package and its dependencies into the project.

    Uninstall-Package       Uninstalls a package. If other packages depend on this package, 
                            the command will fail unless the –Force option is specified.

    Update-Package          Updates a package and its dependencies to a newer version.

    Sync-Package            Get the version of installed package from specified/default project
                            and sync the version to the rest of projects in the solution.

    Add-BindingRedirect     Examines all assemblies within the output path for a project
                            and adds binding redirects to the application (or web) 
                            configuration file where necessary.

    Get-Project             Returns a reference to the DTE (Development Tools Environment) 
                            for the specified project. If none is specifed, returns the 
                            default project selected in the Package Manager Console.

    Open-PackagePage        Open the browser pointing to ProjectUrl, LicenseUrl or 
                            ReportAbuseUrl of the specified package.

    Register-TabExpansion   Registers a tab expansion for the parameters of a command.

也请参阅 在线文档:http://g o.m icrosoft. com/fwlink/?链接ID = 206619 查找包 获取包装 安装包 卸载包 更新包 同步包 Add-BindingRedirect 获取项目 打开包装页面 Register-TabExpansion PM>

SEE ALSO Online documentation: ht tp://g o .m icrosoft . com / fwlink /? LinkID=206619 Find-Package Get-Package Install-Package Uninstall-Package Update-Package Sync-Package Add-BindingRedirect Get-Project Open-PackagePage Register-TabExpansion PM>

所有这一切仍然无法正常服务

All this and still the service does not work

推荐答案

这需要两个步骤(第二个步骤是可选的,但我始终喜欢干净的解决方案)

It requires two steps (second is maybe optional, but I always like clean solution)

  1. 在资源管理器中打开项目所在的文件夹. 使用记事本打开packages.config. 查找并删除提及损坏的软件包名称的行.

  1. In Explorer open folder where your project resides. Open packages.config using Notepad. Find and remove the line that mentions corrupted package name.

打开解决方案所在的文件夹. 打开子文件夹包". 查找包含损坏的软件包的文件夹并将其删除.

Open folder where your solution resides. Open subfolder "packages". Find folder with corrupted package and remove it.

注意:如果删除错误的程序包,只需在Visual Studio选项"中启用NuGet还原,并在启用后右键单击解决方案,然后选择还原丢失的NuGet程序包"

Note: If you delete wrong package, just enable NuGet restore in Visual studio "Options", and while enabled, right-click solution and select "Restore missing NuGet packages"

这篇关于nuget检索包元数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆