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'
CodePudding user response:
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