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
- 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
- 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
- You're all done installing the package. Just add the corresponding headers to your C# file to include the NuGet package in your project.