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 sources for using Sitefinity NuGet packages are configured in the following way:
    • NuGet.org repository:
      • Name: NuGet.org
      • Source: https://api.nuget.org/v3/index.json
    • Sitefinity NuGet repository:
      • Name: Sitefinity NuGet
      • Source: https://nuget.sitefinity.com/nuget

Configure Sitefinity NuGet package sources

All the latest Sitefinity NuGet packages are uploaded to NuGet.org. There are certain third-party, legacy and proprietary packages that are not available on NuGet.org but are hosted on Sitefinity NuGet repository. Therefore, we recommend configuring and using both repositories as package sources.

In Visual Studio, perform the following:

  1. In the menu bar, click Tools » NuGet Package Manager » Package Manager Settings.
  2. In the left pane, expand NuGet Package Manager.
  3. Select Package Sources.
  4. Add a new source by clicking the plus (+) button.
  5. Configure NuGet.org repository in the following way:
    • In Name, enter: NuGet.org
    • In Source, enter: https://api.nuget.org/v3/index.json
  6. Add a new source by clicking the plus (+) button.
  7. Configure Sitefinity NuGet repository in the following way:
    • In Name, enter: Sitefinity NuGet
    • In Source, enter: https://nuget.sitefinity.com/nuget
  8. To save your changes, click OK.

Install NuGet packages

IMPORTANT: When installing Sitefinity CMS via NuGet packages, you must use the Package Manager Console, select the All option from the Package source dropdown, and use the Install-Package command with the -IncludePrerelease flag.

In Visual Studio, perform the following:

  1. In the menu bar, click Tools » NuGet Package Manager » Package Manager Console.
    The Package Manager Console opens.

  2. In Package source, select All.

  3. In Default project, select your project.

  4. Install the package using the Install-Package command with the -IncludePrerelease flag. For instance:
    Install-Package Telerik.Sitefinity.All -IncludePrerelease

    NOTE: If you want to install a specific version of the package, you must use -Version <Version> and -IncludePrerelease flags in the command. For example, enter:
    Install-Package Telerik.Sitefinity.All -Version 15.3.8525 -IncludePrerelease

  5. Wait until NuGet finishes installing all Sitefinity CMS packages in your project.

  6. 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.

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.