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
105
votes
6 answers

How to connect to MySQL Database?

New to C# programming, I'd like to be able to access MySQL Databases. I know MySQL connector/NET and MySQL for Visual Studio are required for C# development. Do I need to install them into my app? Is it possible I can just release the connector…
user3282097
  • 1,059
  • 2
  • 8
  • 4
93
votes
4 answers

How to specify specific dependency version in nuspec?

I'm creating my first nuget package. I added a dependency with a version that is not the latest version. However, I don't want to update to the latest version of this dependency. Is it possible to instruct it to use the specific…
devlife
  • 15,275
  • 27
  • 77
  • 131
87
votes
8 answers

How can I make my managed NuGet package support C++/CLI projects?

I have made a NuGet package that works well when I use it from a C# project. It contains a DLL in the lib/net40 directory, and the DLL gets added as a reference. Now that NuGet supports C++, how do I actually modify my package so that the DLL can be…
Tor Hovland
  • 1,629
  • 2
  • 15
  • 23
84
votes
7 answers

Package is not found in the following primary source

I have a build pipeline set up to create Nuget packages and publish them to a feed in artifacts. I was able to use the feed successfully. However when I ran the pipeline again, causing the packages to publish again I am not able to update the…
Kirsten
  • 15,730
  • 41
  • 179
  • 318
80
votes
3 answers

Is there a way to download packages from nuget.org then do an offline installation into Visual Studio?

My visual studio is installed on a machine which doesn't have internet connection so I can't download and install packages from NuGet Manager in VS. So I am looking for a way to use another machine which has internet connection to download packages…
JatSing
  • 4,857
  • 16
  • 55
  • 65
77
votes
13 answers

An assembly specified in the application dependencies manifest (...) was not found

I upgraded Microsoft.AspNetCore from 2.0.3 to 2.0.5 and my WebAPI project, although running successfully locally, fails to start in production (IIS). Everything was fine in production until this upgrade. The error message produced in the log…
KSwift87
  • 1,843
  • 5
  • 23
  • 40
73
votes
2 answers

NuGet scripts to different directory

Nuget packages download Javascript files to ~/Scripts I prefer to keep my content organized in a ~/content folder, which contains ~/content/css ~/content/images ~/content/scripts ~/content/scripts/vendor (for packages/ downlaoded…
reach4thelasers
  • 26,181
  • 22
  • 92
  • 123
72
votes
21 answers

The EntityFramework package is not installed on project

I am having trouble getting the EF to install on my very simple project called 'Match' (just now learning MVC, better late than never). The general context here is that I created the Model class with only 2 fields and now I want to change the Model…
user1016313
  • 1,274
  • 2
  • 15
  • 26
67
votes
5 answers

Set content files to "copy local : always" in a nuget package

I generate a nuget package from a project with this command in the post-build event. the variable %conf% is set to the right configuration (debug or release) and %1 is the project name (e.g. "MyCompany.MyProject"). nuget pack -Prop…
Johnny5
  • 6,664
  • 3
  • 45
  • 78
65
votes
1 answer

What does PrivateAssets='All' mean?

When I build my .NET Core (NETStandard v2.0) project I am getting the following warning: ViewModels: [FodyPackageReference] Fody: The package reference for PropertyChanged.Fody does not contain PrivateAssets='All' The warning is in reference to…
Ryan Payne
  • 5,249
  • 4
  • 28
  • 69
64
votes
7 answers

Pain-free local development while also referencing NuGet packages

I am attempting to publish and consume versioned NuGet packages of class libraries while avoiding headaches for local development. Here is a sample Visual Studio solution layout: | Libraries | LibraryA | LibraryB | LibraryC | Applications |…
jmsb
  • 4,846
  • 5
  • 29
  • 38
63
votes
9 answers

Automating creating NuGet package as part of build process

I have an automated build process that I'd like to extend so I can build the libraries I am distributing via NuGet. Currently, running nuget.exe to create the packages is a manual operation. What is the best way to setup VS 2010 so that my NuGet…
SonOfPirate
  • 5,642
  • 3
  • 41
  • 97
61
votes
6 answers

Don't include dependencies from packages.config file when creating NuGet package

I am using Nuget to create packages. I would like to create a package which does not contain any dependencies (in the .nuspec) file to any other NuGet packages. My project does have NuGet package dependencies defined in its packages.config…
Jesse Webb
  • 43,135
  • 27
  • 106
  • 143
59
votes
8 answers

How to remove a specific version of a package on a TeamCity Nuget Feed?

Does anyone know to remove a specific version of a package on a TeamCity Nuget Feed?
matt_dev
  • 5,176
  • 5
  • 33
  • 44
58
votes
8 answers

NuGet Assembly outside lib folder

I'm going to bang out a couple of questions here...first, with NuGet is it possible to create a package from a few DLLs? There is no visual studio project, just the command line and a couple of pre-compiled DLL files. Second, assuming that is…
farina
  • 3,486
  • 6
  • 32
  • 44