[英]Facing issue while installing Package using package Manager console in Visual Studio for ASP.NET MVC
While installing any package from Visual Studio using the Package Manager Console, I get an error - how to resolve it?在使用 Package 管理器控制台从 Visual Studio 安装任何 package 时,我收到错误 - 如何解决?
PM> Install-Package Microsoft.AspNet.MVC
Install-Package: Unable to find package 'Microsoft.AspNet.MVC' at source ''.
安装包:无法在源 '' 中找到 package 'Microsoft.AspNet.MVC'。
At line:1 char:1在行:1 字符:1
- Install-Package Microsoft.AspNet.MVC
安装包 Microsoft.AspNet.MVC
- CategoryInfo: NotSpecified: (:) [Install-Package], Exception
CategoryInfo:未指定:(:) [Install-Package],异常
- FullyQualifiedErrorId: NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
FullyQualifiedErrorId:NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
In output window, it shows these messages:在 output window 中,它显示以下消息:
[Package source] Unable to load the service index for source https://packagesource.
【包源】无法加载源https://packagesource的服务索引。
An error occurred while sending the request.
发送请求时出错。
The remote name could not be resolved: 'packagesource'无法解析远程名称:'packagesource'
Please add the package source from the option.请从选项中添加 package 源。
Tool -> Option -> Nuget Package Manager工具 -> 选项 -> Nuget Package 管理器
Add new source and add name as you want and in source for add https://api.nuget.org/v3/index.json .添加新源并根据需要添加名称,并在源中添加https://api.nuget.org/v3/index.json 。 and save it.
并保存它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.