简体   繁体   English

在 Visual Studio 中为 ASP.NET MVC 使用 package 管理器控制台安装 Package 时面临问题

[英]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.

相关问题 ASP.NET MVC Package 管理器控制台错误 - ASP.NET MVC Package Manager Console Error Asp.Net核心程序包管理器控制台。 安装NuGet库而不创建库/脚本文件夹 - Asp.Net Core Package Manager Console. Installing NuGet library not creating a library/script folder 在 Visual Studio 中使用 DTE 的包管理器控制台自动化 - Package Manager Console Automation using DTE in Visual Studio Visual Studio Professional 2012错误:此项目引用ASP.NET MVC项目中缺少的NuGet包 - Visual Studio Professional 2012 error: This project references NuGet package(s) that are missing in ASP.NET MVC project 在不安装visual studio的情况下发布asp.net mvc5 - publish asp.net mvc5 without installing visual studio 当我在 package 管理器控制台中的 Visual Studio 2013 中安装实体框架时 - When I am installing Entity Framework in Visual Studio 2013 in the package manager console 在扩展中以编程方式访问visual studio的powershell控制台(包管理器控制台) - Access the powershell console (package manager console) of visual studio programmatically in an extension 如何使用NuGet软件包管理器控制台在Visual Studio 2012 Pro上安装OpenPop.NET? - How can i install OpenPop.NET on my visual studio 2012 pro using the NuGet package manager console? Package Manager Console Visual Studio 2019 返回新行 - Package Manager Console Visual Studio 2019 Returns New Line 从visual studio命令提示符运行nuget包管理器控制台 - Run nuget package manager console from visual studio command prompt
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM