How to use Telerik Private NuGet Package in Visual Studio 2022 and .NET 7 Project

Introduction

NuGet is the most useful and essential tool for modern software development platforms via which developers can create, share, and consume reusable code. Those useful or reusable common codes are compiled as DLLs and published as packages with code-related files and other information, including the version number. Additionally, NuGet is a package manager for the software development platform that simplifies the process of adding and managing libraries and dependencies in your projects.

As a developer, we all know that using available free, open-source, and paid packages is common in software development. So it is important for developers to know how to use the packages in the solution. Most software uses free, open-source, and common packages; however, sometimes, we need to use private and paid packages. So this article provides you insight into how to configure and use private packages in your Dotnet project using Visual Studio 2022 with an example of a Telerik private package. When we use private, paid, and licensed packages that are needed in our project, then we need to configure them and install it. Setting and using private packages are different than the free online packages that we use in almost all projects.

If you are new to the NuGet package, you can refer to my previous articles on the NuGet package:

Now let’s jump into the below steps to use the private NuGet package.

Step 1. Open Visual Studio and then go to Tools-> NuGet Package Manager ->Setting. Provide the name for the package and set the feed URL to https://nuget.telerik.com/v3/index.json, as illustrated below. Then click on OK.

Visual Studio

Step 2. Close Visual Studio and then create a project in .NET 7 or load your existing project in Visual Studio 2022, where you need to install a private package.

Step 3. Right-click on the project and then go to Manage NuGet packages, as shown below.

Manager NuGet

Step 4. In the upper right corner of the NuGet Package Manager window, just select the Telerik package Source in the package sources dropdown option that we have just created in Step 1.

NuGet Package Manager

Step 5. Then you can choose Online or Browse the lists of packages.

Step 6. Once you change the source for the package to Telerik, then you have to provide your credentials. Windows Authentication dialog box will appear where you need to provide your user and password.

Enter your credentials and click on OK.

Credentials

After that, all the packages that are licensed to your account will be available in the Visual Studio NuGet Package Manager.

You can then install it if it is not already installed in your project. If your project already contains those packages and you just started working on the project containing private NuGet packages, then first, you just need to follow the above steps. Then all packages will start working without throwing any errors related to licenses in your local development environment.

Conclusion

Hence, in this article, we have learned to use private NuGet packages. I hope you find it helpful to configure and use private packages in your .NET 7 project using Visual Studio 2022. Furthermore, similar way, we can set up and use other private NuGet packages such as Grail and so on.

More articles on the NuGet package can be found here:

Reference


Recommended Free Ebook
Similar Articles