0

I want to understand more about how NuGet works. Let's say I have solution with many projects in a solution. Now when I add a NuGet Package, it creates a Packages folder at the Solution Level. This is all fine.

Now lets say we push this code to Source Countrol, in the build server do we need to include the packages folder in the source control or Nuget will detect and create packages folder and install the DLLs ?

Just checking if my understanding is correct ?

SaiBand
  • 5,025
  • 15
  • 57
  • 76
  • 1
    This is an outdated way of adding packages. Try to convert your projects to use `PackageReference` tags. The packages are referenced from a cache location and whether or not to put them in source control becomes a non-issue. – madreflection Aug 28 '19 at 00:13

1 Answers1

1

You do not include the packages folder in the source control

Each project in your solution has a configuration file called packages.config, this file you must include in version control. Packages.config contains the dependencies of your project, you can download them again with the restore command.

Edvaldo Silva
  • 904
  • 2
  • 16
  • 29