简体   繁体   English

无法打开 NuGet 包管理器控制台

[英]Unable to open the NuGet Package Manager Console

When I try to open the NuGet Package Manager Console I get the following error.当我尝试打开NuGet 包管理器控制台时,出现以下错误。 Am not sure what is preventing the Package Manager Console to open.不确定是什么阻止了包管理器控制台打开。

Each package is licensed to you by its owner. NuGet is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies.

Package Manager Console Host Version 4.5.0.4685

Type 'get-help NuGet' to see all available NuGet commands.

Unable to find fallback package folder 'C:\Program Files (x86)\Microsoft SDKs\NuGetPackagesFallback\'.

Here is an additional information from I retrieved from dotnet --info :这是我从dotnet --info检索到的附加信息:

.NET Command Line Tools (2.1.2)

Product Information:
 Version:            2.1.2
 Commit SHA-1 hash:  5695315371

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.15063
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.1.2\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.3
  Build    : a9190d4a75f4a982ae4b4fa8d1a24526566c69df

After having tried searching for the solution am posting here.在尝试搜索解决方案后,我在此处发布。

Start PowerShell as Administrator and run the following command:管理员身份启动 PowerShell 并运行以下命令:

mkdir "C:\Program Files (x86)\Microsoft SDKs\NuGetPackagesFallback"

Then restart Visual Studio and everything should work.然后重新启动 Visual Studio,一切正常。

I had the same issue and I fixed it by creating the requested folder.我遇到了同样的问题,我通过创建请求的文件夹来修复它。

Hope this works for you too.希望这对你也有用。

当您尝试构建包含需要安装的新 Nuget 包的项目时,请确保您已连接到 Internet。

In my case, I had a duplicate package in my package.config file.就我而言,我的 package.config 文件中有一个重复的包。 After removing it, everything worked.删除后,一切正常。

我的问题是,它在其他显示器上打开。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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