Search code examples
c#nugetnuget-packageproject-reference

Library reference vs. NuGet package


I have a C# project and I want to add a reference to it. I know how to do it but which one should I use - lib folder in the project or package installation via NuGet? It would be great to have the pros and cons for both with some explanation when the one is better than the other. My current opinion is that I should use NuGet whenever possible because I can see if there is an update for the library directly in VS. But I need more information on the topic...


Solution

  • If the reference is made by you, but managed by, say, a different team, then I'd create a share on the network, or make my own NuGet Server so that you can update your own application, and be independent of how the other team operates.

    You can set up a "NuGet Server" very easilly, just create an empty MVC application, and then add "Nuget server" directly from nuget hehe.

    A file share on your local network can also serve as a nuget source.

    I'm trying to come up with a good, valid reason for NOT wanting to use nuget or any other package managemer source, but I simply cannot. Those old-school "hard links" to references just do not resonate with me, maybe someone else can provide guidance on that.