Questions tagged [nuget-package]

NuGet is a Visual Studio extension that makes it easy to install and update open source libraries and tools in Visual Studio.

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.

3630 questions
43
votes
4 answers

Updating nuget packages in all projects in a solution

I have a .net solution (say A) with multiple projects(say B,C,D). I want to update all nuget packages for all projects in the solution. I know I can update nuget packages using command line but passing in the path to packages.config nuget update…
KnightFox
  • 3,132
  • 4
  • 20
  • 35
42
votes
5 answers

How do I use OpenCover and ReportGenerator to view Unit Test Coverage Results?

I'm a noob to using both OpenCover and ReportGenerator and I'm struggling a bit in understanding how to get them working. I'm using VS.NET 2012 'Professional' which means I don't have access to the built in unit test coverage tooling. I also have…
atconway
  • 20,624
  • 30
  • 159
  • 229
41
votes
11 answers

Unauthorized nuget package from Visual Studio Team Services using asp.net core rc2

I am unable to install/restore nuget packages from a Visual Studio Team Services feed in an asp.net core web application (RC2). I receive the following: error: Response status code does not indicate success: 401 (Unauthorized). I am running…
41
votes
15 answers

An error occurred while trying to restore packages. Please try again

I am trying to restore the missing nuget packages and it keeps giving me this Error: An error occurred while trying to restore packages. Please try again. Any experience solving this? How can I find out what exactly is causing the error?
user3311522
  • 1,638
  • 3
  • 19
  • 33
41
votes
3 answers

Can NuGet add a .cs file to the destination project?

I want to create a NuGet package that adds a .cs file (a base class the package consumer is encouraged to later modify) to the root of the destination project during installation. Is that possible? Everything I've found so far says "no, you can only…
lance
  • 16,092
  • 19
  • 77
  • 136
40
votes
5 answers

Reinstalling NuGet packages with NuGet installed as VS Extension

I would like to be able to install all of the NuGet packages in the packages.config, as per The NuGet docs. NuGet is installed as a VS Extension, and I can't seem to find nuget.exe. Is it possible to run: nuget i packages.config -o…
AlexWilson
  • 1,179
  • 1
  • 9
  • 16
40
votes
11 answers

Package requires NuGet client version '2.12'

I am trying to install 'WindowsAzure.Storage 8.0.1' in visual studio 2012, but getting the error package requires NuGet client version '2.12' or above, but the current NuGet version is '2.8.60318.667'. on running command "Install-Package…
40
votes
3 answers

CMake and MsVS-NuGet

I'm currently developing a desktop application, using the C++ REST SDK (codename Casablanca), Qt5 and some other libraries. For the project setup, I use CMake. How to get CMake to install NuGet Packages? I now have to install it each time manually,…
Mr.Manhattan
  • 5,315
  • 3
  • 22
  • 34
38
votes
2 answers

NuGet add external reference

I have a .nuspec file for my project, which references a third-party DLL that the project including my package needs to reference.
Carl Bussema
  • 1,684
  • 2
  • 17
  • 35
36
votes
1 answer

List all the nuget packages with "dependencies recursively" for a given project/Solution for .NET Core project in VS2017

I want to list down all the nuget packages along with its dependencies recursively. Project is in VS2017 and .NET Core. I tried with Get-Package -ProjectName "Your.Project.Name" it displays all the nuget packages in project. I want all the…
Pavan
  • 1,023
  • 2
  • 12
  • 25
36
votes
7 answers

Enable NuGet Package Restore on Visual Studio 2013

I'm following this easy tutorial to start coding with the Google+ API in C#. However, I've been stuck for hours on Step 3, where the first substeps are: In Visual Studio, click Project > Enable NuGet Package Restore > answer Yes in the…
34
votes
6 answers

How do you add additional files to a NuGet package in Visual Studio 2017?

I recently moved to Visual Studio 2017 Community Edition. It has 2 nice new features: You don't need to explicitly include your source files in the csproj. It does this automatically. It can build NuGet packages directly. I want to package up my…
Nikki Locke
  • 2,759
  • 6
  • 29
  • 53
33
votes
5 answers

Cannot find type definition file for 'jquery'

I just ran an update in NuGet to update my my packages. Afterwards, I can no longer compile and I receive the above error. The jquery definition file is in my project. But for some reason, the bootstrap definition file can no longer find it. It's…
33
votes
7 answers

How to add an icon to a nuget package?

We are hosting our own nuget server through Teamcity. Is there any other way to add an icon to a .nuspec file other than specifying a web url (http://....)? Or is there a place in Teamcity that these icons could be hosted?
Michael
  • 3,350
  • 2
  • 21
  • 35
33
votes
2 answers

Git submodules vs Nuget packages

Our team has experimented with git submodules for some core CRUD functionality shared by most of our products. We have also successfully used Nuget packages (self-hosted now) for some common utilities. Our core functionality changes often enough…
Jason Watts
  • 3,800
  • 29
  • 33