4
votes

I like to include CommonServiceLocator.MefAdapter in my Visual Studio Community 2015 project. When I try to install the package: https://www.nuget.org/packages/CommonServiceLocator.MefAdapter/1.0.0

I get the error:

PM> Install-Package CommonServiceLocator.MefAdapter Install-Package : Unable to find package 'CommonServiceLocator.MefAdapter' At line:1 char:17 + Install-Package <<<< CommonServiceLocator.MefAdapter + CategoryInfo : NotSpecified: (:) [Install-Package], Exception + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

3

3 Answers

11
votes

Check out that your path to NuGet server is correct.

You can do it in this way: Tools->Options->NuGet Package Manager(use search). Check that your path is https://api.nuget.org/v3/index.json

enter image description here

I had created a project and I could install this package there.

4
votes

If you have more than one source registered for Nuget, in Visual Studio 2015 you may need to select the correct source from the dropdown in the top left corner of the Package Manager Console.

Drop down

0
votes

check your NuGet package manager if this is happening probably it is empty hence add this

https://api.nuget.org/v3/index.json in source and name it nuget.org

hit update and check if it works.