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:
- In Windows Explorer, open the
%localappdata%\NuGet\Cachefolder.- 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:
- In the menu bar, click Tools » NuGet Package Manager » Package Manager Settings.
- In the left pane, expand NuGet Package Manager.
- Select Package Sources.
- Add a new source by clicking the plus (+) button.
- Configure NuGet.org repository in the following way:
- In Name, enter:
NuGet.org - In Source, enter:
https://api.nuget.org/v3/index.json
- In Name, enter:
- Add a new source by clicking the plus (+) button.
- Configure Sitefinity NuGet repository in the following way:
- In Name, enter:
Sitefinity NuGet - In Source, enter:
https://nuget.sitefinity.com/nuget
- In Name, enter:
- 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-Packagecommand with the-IncludePrereleaseflag.
In Visual Studio, perform the following:
-
In the menu bar, click Tools » NuGet Package Manager » Package Manager Console.
The Package Manager Console opens. -
In Package source, select All.
-
In Default project, select your project.
-
Install the package using the
Install-Packagecommand with the-IncludePrereleaseflag. For instance:
Install-Package Telerik.Sitefinity.All -IncludePrereleaseNOTE: If you want to install a specific version of the package, you must use
-Version <Version>and-IncludePrereleaseflags in the command. For example, enter:
Install-Package Telerik.Sitefinity.All -Version 15.3.8525 -IncludePrerelease -
Wait until NuGet finishes installing all Sitefinity CMS packages in your project.
-
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:
- In Visual Studio, navigate to Tools » NuGet Package Manager » Package Manager Console.
- 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.configfile, 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.