AjaiJA
AjaiJA

Reputation: 67

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?

PM> Install-Package Microsoft.AspNet.MVC

Install-Package : Unable to find package 'Microsoft.AspNet.MVC' at source ''.
At line:1 char:1

  • Install-Package Microsoft.AspNet.MVC
  • CategoryInfo : NotSpecified: (:) [Install-Package], Exception
  • FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

In output window, it shows these messages:

[Package source] Unable to load the service index for source https://packagesource.

An error occurred while sending the request.
The remote name could not be resolved: 'packagesource'

Upvotes: 0

Views: 385

Answers (1)

Hiren Patel
Hiren Patel

Reputation: 1157

Please add the package source from the option.

Tool -> Option -> Nuget Package Manager

Add new source and add name as you want and in source for add https://api.nuget.org/v3/index.json. and save it.

enter image description here

Upvotes: 1

Related Questions