简体   繁体   中英

Install-Package : Unable to find package 'CommonServiceLocator.MefAdapter

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

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

在此处输入图片说明

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

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.

落下

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM