As you know, much of Telerik's success is based the fact that we enable developers to be more productive. Why not be more productive in the process of including Telerik products in your solution? This is what we have done by allowing customers the option of deploying Telerik NuGet packages of their purchased/licensed products to their very own private NuGet feed. This NuGet functionality is now provided in addition to the customary ways of setting up projects through the installation of the tools, whether that be via the Control Panel, or manually installed. This blog post will be focused on licensed customer products, some freely available Telerik products are already available on the public NuGet feed here.
What is NuGet?
We've all been there - setting up development machines for a new or existing project. A large checklist in-hand, ensuring each piece of software required to build and run the project is installed and is of the correct version. It is by far one of the most tedious and cumbersome processes you will encounter when you are trying to get started on a project.
One tool in particular has been making headway in making this exceptionally less painful - that would be NuGet. NuGet (also called the Library Package Manager) is an extension to Visual Studio that provides an easy-to-use interface for adding third-party components (called packages) and their dependencies to your project. It does this by consuming a public OData feed of packages available for installation. Most packages exposed on this public feed are open source components and freely contributed community packages. NuGet also provides ways for companies to host their own NuGet feed - clearly outlined on their website and in this blog post. The benefits of hosting a private feed in a company include the ability to govern the components used in company projects. Administrators of the feed can essentially white-list approved components and their versions by making only those approved versions available in their NuGet feed, and in doing so, keeping a lid on the technology sprawl in the organization. Within Visual Studio, NuGet also provides an easy to use interface to update from older versions of a component in a project once they have been made available in the feed. A private NuGet feed provides development teams with a one-stop shop for including new components in a project as well as updating existing ones from one central location, all without leaving the comforts of Visual Studio. No longer is a developer required to manually seek out and install new products or keep in synchronization with product versions across a project team – this is all managed at a project level with the assistance of the company NuGet feed and the Library Package Manager extension in Visual Studio (NuGet Package Manager).
Telerik and NuGet
Telerik has spent the time to provide you with pre-made NuGet packages of the latest released versions for some of your favorite purchased products. Currently packages made available are for the following products:
Companies can now benefit from having their Telerik products available in their NuGet feed as well as complete control over the timing of when to make updates available. Using the private NuGet feed is also a real time-saver when adding people to projects, developers will no longer be required to manually install the products to use them, and when the time comes to update to a newer version, the ability to update is provided directly in Visual Studio through the easy to use Library Package Manager interface.
The overall process to making your Telerik RadControl purchases available in a private NuGet feed are as follows:
Setting up your own NuGet feed
If you already have an internal NuGet server hosting your feed, you can skip this section.
In the NuGet dialog, ensure that you have Online selected. In the upper right corner, use the search box to search for NuGet.Server. Once found, click on the item in the list, and click its Install button.
Accept any license agreements during the install process. Once the installation is complete, click the close button.
Next you will need to create a physical folder where you would like to store your private NuGet packages. Make note of the path of the folder. In my case, I created a folder with the following path “C:\PrivateNuGetPackages”. Open the Web.config, scroll to the bottom of the file, and find the packagesPath key and enter your path there.
Next we will remove the following extraneous entry from the Web.config:
Next modify the remaining compilation tag, and set its debug property to false.
The NuGet server is now ready to build and deploy. For now though, we’ll just work locally – when you do go to deploy the server, it deploys just as any other web application. First build the project, then right-click your project and select “View in Browser”. You should then see a screen similar to the following to verify everything is working:
Now we will need to add our feed to our packages sources in Visual Studio. From the Repository URLs section of the server screen (above), select and copy the URL of the package source (the first url). Open Visual Studio and go to the TOOLS menu, and hover over the Library Package Manager item, then select Package Manager Settings.
Select the Package Sources item on the left, and click the + button to add a new feed. Name this feed whatever you’d like, I named mine “Company NuGet Feed” and paste the repository URL into the Source text box, click the Update button then click OK.
Visual Studio is now ready to pull packages from your new private NuGet feed! Let’s start adding some NuGet packages to our feed.
Downloading Telerik NuGet Packages
To download Telerik NuGet packages, simply log into Your Account at http://www.telerik.com. Next, click on the Manage Products menu item, and select your current Telerik subscription(s). On the right-hand side of the page, you should see a large blue button to download the installer and other resources, click on this button.
Now all the products you own will be displayed to you. Click the "Browse all product files" link for the product you are interested in downloading the NuGet package for.
Scroll down to the "Other Setup Files" section of the download page, and you will see a zip file named "NuGet installation". Download this zip file and extract its contents to your NuGet server packages folder, the same folder that you specified for the packagesPath value in the Web.config.
In summary, having a private NuGet feed in your company is extremely beneficial, it allows full governance of products and their versions utilized in company projects. Using NuGet in projects saves teams time from downloading and installing the products on an individual basis, and should a new version be made available, projects can be easily updated using the Library Package Manager directly in Visual Studio. Telerik products and NuGet Package Manager is definitely a win-win combination.
Watch this video to see how to create a private feed, download a Telerik NuGet Package and add your new feed to Visual Studio as was outlined in this blog post:
Subscribe to be the first to get our expert-written articles and tutorials for developers!