# Setup a Local NuGet Package Feed

## Environment

| Version | Product           | Author                                                                          |
| ------- | ----------------- | ------------------------------------------------------------------------------- |
| N/A     | Telerik Reporting | [Desislava Yordanova](https://www.telerik.com/blogs/author/desislava-yordanova) |

## Description

In some environments, particularly corporate settings, direct access to **nuget.org** or the **Telerik NuGet Feed** may be restricted, hindering the addition of necessary NuGet packages required by Telerik Reporting.
This article shows how to add an external NuGet package to a Telerik Reporting project in a restricted environment. It also shows the process for including dependencies from local NuGet sources.

## Solution

To set up a Local NuGet package feed, follow these steps:

1. First, you need to log in using your [Telerik licensed account](https://www.telerik.com/account/) and navigate to the Downloads section of the Telerik Reporting product. This way you will be able to download the packages:

   ![Download NuGet Packages from Telerik Account](https://www.telerik.com/products/reporting/documentation/assets/3db1ebbe23e5b956574bba4eea3f8ce4/download-nuget-packages.png)

2. Prepare a Local Folder for NuGet Packages: Create a local folder to store the downloaded `.nupkg` files along with any other dependencies you need. This folder will act as your local NuGet repository.

3. Configure NuGet Package Sources: Add your local folder as a NuGet package source. This allows your project to use the local repository for package restoration and installation.
   * Open your NuGet package manager settings.
   * Click on the **Options** button to manage package sources.
     ![Open the Package Manager](https://www.telerik.com/products/reporting/documentation/assets/5bf1acfb257fe3ac46cbf8a22db74d52/open-package-manager.png)
   * Add a new package source by pointing the Source to your local folder containing the `.nupkg` files.
     ![Setup Local Source](https://www.telerik.com/products/reporting/documentation/assets/1d3f05f32e74afb8b730ebd9b4348f87/setup-local-source.png)

4. Install the Packages: Now, you can select and install the desired packages from your local folder through the NuGet package manager.

   ![Select Local Package Source](https://www.telerik.com/products/reporting/documentation/assets/970bb0628c46d071e37f8349015313f2/select-local-package-source.png)

Alternatively, you can update the `NuGet.Config` file ensuring that the file includes the local folder as a package source. Here is an example configuration:

```XML
<packageSources>
  <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
  <add key="_TELERIK" value="https://nuget.telerik.com/v3/index.json" />
  <add key="NuGet Local Folder" value="/var/myofflinepackages/" />
</packageSources>
```

Remember to place all necessary dependencies in your local NuGet folder, avoiding the local NuGet cache to prevent accidental deletion.

## See Also

* [Restoring NuGet Packages in Your CI Workflow](https://www.telerik.com/products/reporting/documentation/getting-started/installation/restoring-nugets-in-ci)
* [Adding the Private Telerik NuGet Feed](https://www.telerik.com/products/reporting/documentation/getting-started/installation/installing-with-nuget)
