25

I want to use Nuget to download a package VS 2015 for Node.js project, however, it is grey out as shown below:

How to resolve it?

enter image description here

william007
  • 17,375
  • 25
  • 118
  • 194

8 Answers8

58

This happened to me when I was running something in debug mode. Make sure you are not debugging any part of your solution or VS will not let you do anything with nuget packages.

Steven Banks
  • 863
  • 7
  • 7
13

Same thing happened to me in VS2015. Just clear your solution once and restart your Visual Studio. It'll work. Up till now VS 2015 has been showing lots of problems.Hope for better updates.

Prayas Tiwari
  • 141
  • 1
  • 4
4

It appears that you have to have a project that supports nuget or all the nuget options will be greyed out. I have two solutions I bounce back and forth between...one has only a SQL Server project - and nuget options are disabled. The other solution has all sorts of stuff and nuget stuff is enabled. Just to be sure, I added a class library to the SQL Server solution, and sure enough, nuget lit up.

Clay
  • 4,999
  • 1
  • 28
  • 45
  • 1
    `It appears that you have to have a project that is nugettable or all the nuget options are greyed out` What do you mean?????? – TheCrazyProgrammer Apr 27 '17 at 03:10
  • 1
    I mean that some projects don't support nuget. For example, SQL Server projects in VS 2015. – Clay Apr 27 '17 at 11:46
  • @TheCrazyProgrammer, I edited the answer to try to clarify :-) – Clay Apr 27 '17 at 11:47
  • did not work. im using vs 2017. was there the other day. I downloaded Pomelo – Mike Jun 29 '17 at 23:43
  • 2
    This answer helped me find a solution both 2017 and 2019. For me the blank project did not allow use but the template given in the tutorial "ASP.NET Core Web Application" did. However, my default install didn't come with this so I had to add the workload as well. Probably obvious the workload was needed for non-new VS users but on install I figured it'd come with something besides blank template (I believe 2015 did) so passing that along in case it helps anyone. +1 from me, thanks. – joedragons Nov 08 '19 at 22:20
2

Just for extending the community. It happened to me during Rebuild process (debug mode), I had too many projects (legacy project) in one solution (VS 2019), when I hit the Rebuild Solution it took to long to do the work and I didn't attend to it. after build completion, Manage Nuget Packages menu was enabled as always.

If you have to Manage Nuget Packages right before building your project, all you need to do is to stop building and ta-da, your intended menu item is available again.

0

I've just came across the same thing. For me the solution hadn't been saved yet. The resolution for me was to save the solution first and then the option was available for me.

Gareth
  • 5,140
  • 5
  • 42
  • 73
0

This problem can be solved by visual community edition 2019 In the Tools>extensions >manage extensions> SEARCH FOR NuGET PACKAGE and install the NuGet package manager. Now you can see the Nuget Package restore and manage Nuget package manager.

MWM
  • 1
  • 1
0

This happens mysteriously in VS 2019. I don't have an answer other than brute force -- close and reopen VS 2019. The options are then available.

I'm doing a console app to follow along with a Pluralsight course on EF Core 5. I got up to the point where adding a reference to Microsoft.EntityFrameworkCore.Tools needed to happen to find the options were greyed out.

Turned off debugging -- the app was still running, didn't fix it. After waiting few moments to see if it would happen on its own, I closed and reopened VS 2019.

Then I could access the NuGet options.

user1585204
  • 827
  • 1
  • 10
  • 14
0

You need to select the relevant project in the Solution Explorer for the option to be clickable.

starball
  • 20,030
  • 7
  • 43
  • 238
cyclingLinguist
  • 334
  • 1
  • 5
  • 16