Questions tagged [nuget]

NuGet is a free, open source developer focused package management system for the .NET platform.

NuGet is a free open source developer focused package management system for the .NET platform intent on simplifying the process of incorporating third party libraries into a .NET application during development. NuGet is a member of the ASP.NET Gallery in the Outercurve Foundation.

Get started on nuget.org and find documentation on docs.nuget.org

To see NuGet in action, watch this video from MvcConf 2 and this one from DevDays 2011 Netherlands.

11613 questions
926
votes
8 answers

Download old version of package with NuGet

Is there a way to download a previous version of a package with NuGet, not the latest one?
ryudice
  • 36,476
  • 32
  • 115
  • 163
785
votes
17 answers

How do I get NuGet to install/update all the packages in the packages.config?

I have a solution with multiple projects in it. Most of the third party references are missing, yet there are packages.config file for each project. How do I get NuGet to install/update all the packages needed? Does this need to be done via command…
Samuel Goldenbaum
  • 18,391
  • 17
  • 66
  • 104
605
votes
10 answers

How do I install a NuGet package .nupkg file locally?

I have some .nupkg files from a C# book. How can I install them?
Tom
  • 15,781
  • 14
  • 69
  • 111
599
votes
12 answers

How can I clear the NuGet package cache using the command line?

I can clear my development computer's NuGet package cache using Visual Studio menu Tools → Options → NuGet Package Manager → General: Clear Package Cache button. I would like to do this on the command line. Unfortunately, I can not find a related…
g.pickardou
  • 32,346
  • 36
  • 123
  • 268
523
votes
41 answers

Assets file project.assets.json not found. Run a NuGet package restore

I'm trying to use nopCommerce(Which is written in .NET Core) but when I want to run the project I face 52 Errors telling me Run a nuget package restore Assets file ~\obj\project.assets.json' not found. Run a NuGet package restore to generate this…
NeverTrust
  • 5,487
  • 2
  • 13
  • 16
422
votes
23 answers

This project references NuGet package(s) that are missing on this computer

I have an ASP.NET MVC5 application that worked yesterday and now I am getting this error when I try to build: This project references NuGet package(s) that are missing on this computer. I have the two options checked that allow nuget to…
Austin Harris
  • 5,150
  • 6
  • 26
  • 39
401
votes
5 answers

How can I install an older version of a package via NuGet?

I want to install an older version of a package (Newtonsoft.Json). But NuGet rolls back: PM> Install-Package Newtonsoft.Json -Version 4.0.5 Successfully installed 'Newtonsoft.Json 4.0.5'. Install failed. Rolling back... Install-Package : Already…
Nebide Yildiz
  • 4,031
  • 2
  • 15
  • 12
354
votes
12 answers

Get TFS to ignore my packages folder

I'm trying to get TFS (2013) to ignore my packages folder. I passionately don't want it source controlled as I'm using NuGet and it's great! I've tried cloaking (doesn't seem to work), I've tried adding .tfignore files - nothing is ignored. Why…
Matt
  • 5,573
  • 4
  • 33
  • 37
337
votes
37 answers

NuGet Packages are missing

I searched this problem but none of the solutions worked. I have Visual Studio Professional 2015 installed and I am using TFS. My NuGet version is 3.1.6. This problem is happening only in my C# Web API/MVC project. I am getting the below…
Ques Tion
  • 3,365
  • 2
  • 11
  • 10
323
votes
19 answers

Is it possible to change the location of packages for NuGet?

I have the following convention for most of my projects: /src /Solution.sln /SolutionFolder /Project1 /Project2 /etc.. /lib /Moq moq.dll license.txt /Yui-Compressor …
TheCloudlessSky
  • 18,608
  • 15
  • 75
  • 116
320
votes
36 answers

System.MissingMethodException: Method not found?

Previous working asp.net webforms app now throws this error: System.MissingMethodException: Method not found The DoThis method is on the same class and it should work. I have a generic handler as such: public class MyHandler: IHttpHandler { …
user603007
  • 11,416
  • 39
  • 104
  • 168
305
votes
25 answers

How do I enable NuGet Package Restore in Visual Studio?

There's a similar post on stack but it doesn't help with my issue possibly because I am using Visual Studio 2015. How do I get the "Enable NuGet Package Restore" option to appear in VS2015? I chose File > New Project and created an empty ASP.NET Web…
Dan Beaulieu
  • 19,406
  • 19
  • 101
  • 135
295
votes
2 answers

Getting "project" nuget configuration is invalid error

I'm getting "[project] nuget configuration is invalid" error. I received an error like this before and used the 'Update Nuget package manager' solution mentioned here: Unable to Install Any Package in Visual Studio 2015 I've also tried the other…
Ash
  • 5,786
  • 5
  • 22
  • 42
260
votes
10 answers

How can you find unused NuGet packages in solution?

How can you find the unused NuGet packages in a solution? I've got a number of solutions where there are a lot of installed packages, and a large number of them are flagged as having updates. However, I'm concerned there may be breaking changes, so…
SteveC
  • 15,808
  • 23
  • 102
  • 173
245
votes
55 answers

Nuget connection attempt failed "Unable to load the service index for source"

While trying to connect to Nuget, I'm getting the error below, and then I am unable to connect: [nuget.org] Unable to load the service index for source https://api.nuget.org/v3/index.json. An error occurred while sending the request. Unable to…
DarthVader
  • 52,984
  • 76
  • 209
  • 300
1
2 3
99 100