Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to open the NuGet Package Manager Console

When I try to open the NuGet Package Manager Console I get the following error. 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:

.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.

like image 796
Coder Absolute Avatar asked Jan 19 '18 03:01

Coder Absolute


People also ask

How do I open NuGet Package Manager console?

To open the Package Manager Console in Visual Studio, select Tools > NuGet Package Manager > Package Manager Console from the top menu. The console is a Visual Studio window that you can arrange and position as you like. For more information, see Customize window layouts in Visual Studio.

How use NuGet Package Manager console?

From Visual Studio, select Tools > NuGet Package Manager > Package Manager Console. After the Package Manager Console pane opens, verify that the Default project drop-down list shows the project in which you want to install the package. If you have a single project in the solution, it's preselected.

How do I enable manage NuGet packages in Visual Studio?

To find and install a NuGet package with Visual Studio, follow these steps: Load a project in Solution Explorer, and then select Project > Manage NuGet Packages. The NuGet Package Manager window opens. Select the Browse tab to display packages by popularity from the currently selected source (see Package sources).

How do I reinstall NuGet package manager?

Switch to the Browse tab, search for the package name, select it, then select Install). For all packages, delete the package folder, then run nuget install . For a single package, delete the package folder and use nuget install <id> to reinstall the same one.


2 Answers

I had the same issue and I fixed it by creating the requested folder.

Hope this works for you too.

like image 109
Jonathan ANTOINE Avatar answered Oct 19 '22 07:10

Jonathan ANTOINE


Start PowerShell as Administrator and run the following command:

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

Then restart Visual Studio and everything should work.

like image 19
Ogglas Avatar answered Oct 19 '22 07:10

Ogglas