Nono.MA

FEBRUARY 15, 2023

Here's how to add NuGet packages from a local source to your Visual Studio project.

  • Create a new project or open an existing one.
  • Create a folder in your computer that will be a "repository" of local NuGet packages. (Let's name it local-nugets).
  • In Visual Studio, go to Tools > Options > NuGet Package Manager > Package Sources.
  • Click the Add button (the green cross) to create a new Package Source.
  • In the bottom inputs, choose a custom name for this new Package Source and then click the three dots (...) to browse and select the folder you previously created -- local-nugets in my case -- and then click on Update.
  • Now include your NuGet package inside your local-nugets folder, and everything left is to install the package as follows.
  • Go to Project > Manage NuGet Packages > Browse.
  • Select your new Package source which should be listed.
  • Click it and select Install.
  • You're all done installing the package. Just add the corresponding headers to your C# file to include the NuGet package in your project.

Want to see older publications? Visit the archive.

Listen to Getting Simple .