Sitefinity CMS NuGet packages

Overview

NuGet is the package manager for .NET (including .NET Core) that is open source. It provides a central repository and toolset that you use to create, share, and consume reusable code packages, simplifying dependency management in your projects.

Visual Studio has a built-in support for NuGet. For information about managing NuGet packages using the Package Manager Console in Visual Studio, see Microsoft documentation » Manage packages with the Package Manager Console.

To download and use the latest Sitefinity NuGet packages, visit NuGet.org.
To download and use certain legacy, third-party and proprietary packages that are not available on NuGet.org, visit Sitefinity NuGet repository.

Use Sitefinity NuGet packages

PREREQUISITES:

  • The NuGet cache files are cleaned up:
    1. In Windows Explorer, open the %localappdata%\NuGet\Cache folder.
    2. Select all files and delete them.
  • The package source for using the latest Sitefinity NuGet packages is configured in the following way:
    • Name: NuGet.org
    • Source: https://api.nuget.org/v3/index.json

Install NuGet packages

  1. In Visual Studio, navigate to Tools » NuGet Package Manager » Package Manager Console.
  2. Use the Install-Package command to install the package with added -IncludePrerelease  flag. For instance: Install-Package Telerik.Sitefinity.All -IncludePrerelease
  3. Wait for the command to finish and close the window.
  4. Build your solution.

All assemblies references are added to the project references.

Update NuGet packages

Each class library in a Sitefinity project has:

  • a number of NuGet packages installed
  • packages.config file

The packages.config file lists details regarding the ID and version of each NuGet package in the project. Upon building the project, each NuGet package is restored to the version specified in the packages.config file.

When a new version of Sitefinity is available, you can update the NuGet packages installed in your project to their newer versions.

To update the NuGet packages:

  1. In Visual Studio, navigate to Tools » NuGet Package Manager » Package Manager Console.
  2. Run the following command for each class library: Update-Package <PackageName> -Version <Version> -Source https://api.nuget.org/v3/index.json -IncludePrerelease

EXAMPLE: Update-Package Telerik.Sitefinity.All -Version 15.3.8525 -Source https://api.nuget.org/v3/index.json -IncludePrerelease

NOTE: If you are upgrading your Sitefinity CMS to a newer version, which requires additional changes to the web.config file, refer to Upgrade Sitefinity CMS.

For more information about creating a Sitefinity CMS project using NuGet packages, see Install Sitefinity.

For more information about upgrading your Sitefinity CMS website using NuGet packages, see Upgrade Sitefinity CMS.

Configure Sitefinity NuGet repository

NOTE: All the latest Sitefinity CMS NuGet packages are hosted on NuGet.org.
If your scenario involves using legacy, third-party or proprietary packages that are hosted only on Sitefinity NuGet repository, we recommend that you configure it as a package source (for backward compatibility reasons) as described below.
For more information, see Migration from Sitefinity NuGet to NuGet.org.

To add the Sitefinity NuGet repository as a package source in Visual Studio, perform the following:

  1. In Visual Studio, navigate to Tools » Options » NuGet Package Manager » Package Sources.
  2. To add a new package source, click the plus (+) button.
  3. In the respective input field, enter the following data:
    • Name: Sitefinity NuGet
    • Source: https://nuget.sitefinity.com/nuget
  4. To save your changes, click OK.

NOTE: To ensure full access to all necessary NuGet packages when installing or upgrading Sitefinity CMS, in the Package Manager Console, use the All option from the Package source dropdown.

Want to learn more?
Enhance your Sitefinity skills by enrolling in free training sessions. Become Sitefinity certified through Progress Education Community to strengthen your professional credentials.