安装包:无法找到“CommonServiceLocator.MefAdapter”包。

4

我想在我的Visual Studio Community 2015项目中包含CommonServiceLocator.MefAdapter

当我尝试安装包:https://www.nuget.org/packages/CommonServiceLocator.MefAdapter/1.0.0时,出现以下错误:

PM> Install-Package CommonServiceLocator.MefAdapter Install-Package : 找不到包 'CommonServiceLocator.MefAdapter' At line:1 char:17 + Install-Package <<<< CommonServiceLocator.MefAdapter + CategoryInfo : NotSpecified: (:) [Install-Package], Exception + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

3个回答

11

请检查您到NuGet服务器的路径是否正确。

可以通过以下方式完成:工具->选项->NuGet程序包管理器(使用搜索)。检查您的路径是否为https://api.nuget.org/v3/index.json

输入图像描述信息

我已经创建了一个项目,我可以在该项目中安装此软件包。


4

如果您在Nuget中注册了多个源,在Visual Studio 2015中您可能需要从软件包管理器控制台左上角的下拉菜单中选择正确的源。

Drop down


0

请检查您的NuGet软件包管理器,如果出现此问题,可能是因为它为空,因此请添加以下内容:

https://api.nuget.org/v3/index.json到源中,并将其命名为nuget.org

点击更新并检查是否有效。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接