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
153
votes
14 answers

Setting up a common nuget packages folder for all solutions when some projects are included in multiple solutions

I have been using NuGet to retrieve packages from external and internal package sources, which is very convenient. But I have realized that the packages are by default stored per solution, which is very frustrating when some projects with NuGet…
Mats Isaksson
  • 1,939
  • 2
  • 14
  • 18
153
votes
7 answers

How to download a Nuget package without nuget.exe or Visual Studio extension?

How can I download a NuGet package? I don't have the NuGet Visual Studio extension or the command line program nuget.exe. How can I download the .nupack file from the web? As I understand I will be able to extract the .dll files from it (with 7-zip)…
Colonel Panic
  • 132,665
  • 89
  • 401
  • 465
151
votes
15 answers

remove nuget package restore from solution

I added the recent nuget package restore feature to a solution using 'Enable NuGet Package Restore': http://docs.nuget.org/docs/workflows/using-nuget-without-committing-packages However it broke my build server and I didn't have the time to fix it,…
Wiebe Tijsma
  • 10,173
  • 5
  • 52
  • 68
145
votes
8 answers

nuget 'packages' element is not declared warning

not a showstopper but when using nuget in a project, it creates a packages.config file with this shape ... your packages this gives a warning in VS The 'packages' element is not…
roundcrisis
  • 17,276
  • 14
  • 60
  • 92
145
votes
10 answers

Add native files from NuGet package to project output directory

I'm trying to create NuGet package for a .Net assembly which does pinvoke to a native win32 dll. I need to pack both the assembly and the native dll with the assembly added to the project references (no problem at this part) and the native dll…
AlonFStackoverflow
  • 1,481
  • 2
  • 10
  • 5
139
votes
3 answers

.net Core 2.0 - Package was restored using .NetFramework 4.6.1 instead of target framework .netCore 2.0. The package may not be fully compatible

I have a .net core 2.0 console app. I'm trying to read files from TFS using the following: How to get a file from TFS directly into memory (i.e., don't want to read from file system into memory)? I head over to nuget and install…
BLAZORLOVER
  • 1,971
  • 2
  • 17
  • 27
135
votes
4 answers

Can I publish a private NuGet package?

I have an assembly that I have made which is very specific to my team at my company. I want to be able to use NuGet to make this assembly avaiable to other projects that my team and similar teams at my company are working on. However, the assembly…
stevebot
  • 23,275
  • 29
  • 119
  • 181
134
votes
6 answers

Extracting Nupkg files using command line

Firstly, I do not want to use Visual Studio at all when dealing with the certain .nupkg files. I know there is a tool called NuGet Package Explorer and this can export nupkg files to a certain file location using a gui, but I'm looking to setup a…
Lewis
  • 2,373
  • 2
  • 22
  • 30
130
votes
2 answers

Where can I find a NuGet package for upgrading to System.Web.Http v5.0.0.0?

Just upgraded an ASP.NET MVC4 project to use Unity.WebApi version 5.0.0.0 and it requires System.Web.Http v 5.0.0.0 as per the following error: Assembly 'Unity.WebApi, Version=5.1.0.0, Culture=neutral, PublicKeyToken=43da31bc42a85347' uses…
Klaus Nji
  • 18,107
  • 29
  • 105
  • 185
129
votes
16 answers

NuGet behind a proxy

I figure out that NuGet allows proxy settings configuration since 1.4 version (June 2011). But, I can't find any command line example. I'm trying to run some build and NuGet can't connect. How do I configure the proxy settings on the command line?
Ricardo
  • 1,549
  • 2
  • 12
  • 11
128
votes
5 answers

Packing NuGet projects compiled in release mode?

Is there some way to make a NuGet package using code compiled in release mode? Or is there some reason I should only publish (make available locally, in this case) packages compiled in debug mode? Every time I call nuget pack from my project…
patridge
  • 26,385
  • 18
  • 89
  • 135
128
votes
6 answers

EF Code First: How do I see 'EntityValidationErrors' property from the nuget package console?

I'm at a loss for this: I've defined my classes for a entity framework (4.1.3) code first approach. Everything was fine (I was creating the tables etc.) until I started to Seed. Now when I do the Add-Migration "remigrate" ; Update-Database; I get…
jeremy
  • 1,595
  • 2
  • 13
  • 15
127
votes
11 answers

View NuGet package dependency hierarchy

Is there a way, either textual or graphical, to view the hierarchy of dependencies between NuGet packages?
Neil Barnwell
  • 41,080
  • 29
  • 148
  • 220
127
votes
3 answers

How do you include Xml Docs for a class library in a NuGet package?

I am creating a NuGet package for a C# class library, and I would like to include generated Xml Documentation with the library. This is my nuspec file: MyLibrary
John Nelson
  • 5,041
  • 6
  • 27
  • 34
123
votes
12 answers

NuGet auto package restore does not work with MSBuild

I'm trying to build a solution with packages content missing (except repositories.config inside) with MSBuild 12.0. I expect it to auto restore all missing packages before building but this is not the case - MsBuild reports tons of errors: "are…
UserControl
  • 14,766
  • 20
  • 100
  • 187