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
18
votes
1 answer

dotnet pack project references

I quite like separating functionality across a few assemblies, for example a facade to a data provider, contracts for the data provider and the data provider implementation itself... to my mind, it makes it easy to unit test the individual…
Jay
  • 9,561
  • 7
  • 51
  • 72
18
votes
4 answers

System.Net.Http NuGet package 4.3.0 reference generates System.IO.FileLoadException on System.Diagnostics.DiagnosticSource ver 4.0.0.0 reference

Description of the problem: A shared library "shared.dll" project references System.Net.Http NuGet package 4.3.0. The application that references "shared.dll" fails with System.IO.FileLoadException Could not load file or assembly…
18
votes
1 answer

TeamCity Nuget Installer step fails saying Failed to find NuGet executable

I have created a TeamCity buils step using Nuget Installer, but when I run the steps I get the error : Updating sources: server side checkout [15:35:44][Updating sources] Repository sources transferred: 112.73 KB total [15:35:44][Updating sources]…
UNG
  • 673
  • 1
  • 6
  • 17
18
votes
2 answers

How to create NuGet package that includes XML intellisense data

This link How do I create an XML Intellisense file for my DLL? explains how to build your dlls so that an XML file is included containing all your documentation headers so that they are available in those IntelliSense popups. In my company we…
David
  • 15,750
  • 22
  • 90
  • 150
17
votes
4 answers

Can NuGet edit a config file or only add to it?

I've been working on a NuGet package for my company and one of the requirements is being able to update some of our config files. I know it's possible to add to a config file, but is it possible to edit one? Example:
Darcy
  • 5,228
  • 12
  • 53
  • 79
17
votes
3 answers

NuGet - install.ps1 does not get called

I'm trying to create my first NuGet package. I don't know why my install.ps1 script does not get called. This is directory structure --Package | - MyPackage.nuspec - tools | - Install.ps1 - some_xml_file I build package using this command…
Piotr Perak
  • 10,718
  • 9
  • 49
  • 86
17
votes
2 answers

Packing source code with Nuget

I've successfully created a Nuget package which contains the compiled DLL and uncompiled content such as images, styles, etc. Controllers, helpers, resources and other code has been compiled. This package is useful for distribution when only the…
mare
  • 13,033
  • 24
  • 102
  • 191
17
votes
2 answers

NuGet official package source: Should I be worried about the safety of the packages?

According to this page: No central approval process for adding packages. When you upload a package to the NuGet Package Gallery (which doesn’t exist yet), you won’t have to wait around for days or weeks waiting for someone to review it and approve…
user593358
17
votes
1 answer

Installing nuget package from GitHub

The command: Install-Package curve25519-uwp installs version 1.0.3 of this package (https://www.nuget.org/packages/curve25519-uwp/) On GitHub there is a version 1.0.4 that fixes a specific error I am facing. Can anyone explain how to get that…
Tony
  • 1,394
  • 5
  • 22
  • 48
17
votes
1 answer

How to package a multi-architecture .NET library that targets the Universal Windows Platform?

How do I package a Universal Windows Platform library written in C# that offers only architecture-dependent builds? For the sake of illustration, let's say that I have some architecture-specific code conditionally compiled in for each architecture…
Sander
  • 25,685
  • 3
  • 53
  • 85
17
votes
2 answers

Ignoring Dependencies in Nuget Package

I have a package which has 5 dependencies -- one of which is MVC3. While installing this package, I want to ignore the dependency on MVC3 alone. Is there a way I can do that? In the Nuget Package Manager Console, there's an option to ignore…
Sammy
  • 798
  • 2
  • 8
  • 23
17
votes
3 answers

declaring nuget packages that depend on each other in one solution

We have solution with a lot of projects and a more or less complex dependency graph between those projects. Now each of those projects should become its own nuget package and the dependency graph of the nuget packages should mirror the on of the…
bitbonk
  • 48,890
  • 37
  • 186
  • 278
17
votes
2 answers

Is there a nuget.exe command-line equivalent of Uninstall-Package?

I'm working on a NuGet package that installs a bunch of content - views, scripts, CSS files - into a web application, and trying to improve the change-compile-test cycle. I have two projects - the framework itself ("Package") and the demo web app…
Dylan Beattie
  • 53,688
  • 35
  • 128
  • 197
17
votes
3 answers

Configure NuGet package to add a build event when installed

Does anyone know if it's possible to add something to a nuspec file so that when a package is installed via NuGet a pre or post build event to a project?
Trevor Pilley
  • 16,156
  • 5
  • 44
  • 60
16
votes
2 answers

Failed to install ClosedXML dependency

I need to install ClosedXML dependency to build a C# project with .net framework 4.7.2 but when trying to install I always get the same error: "Cannot resolve dependency 'SixLabors.Fonts'. Sources used: 'nuget.org', 'Microsoft Visual Studio Offline…