Upgrade a project that uses NuGet packages
If you are using NuGet packages, available in the Sitefinity CMS Nuget repository, to avoid issues, you must use the following procedure, instead of using the Project Manager.
IMPORTANT: Before you begin, make sure that your project is not located in a folder that has any special characters in the name, such as ~\Program Files (x86)
.
If you have NuGet packages installed in your project, to upgrade it, perform the following:
- Backup your project and its database.
- Uninstall
Telerik.Sitefinity.All
package.
IMPORTANT: Perform this step, only if you are upgrading from a Sitefinity CMS version 9.1 or below to a Sitefinity CMS version 9.2 or above. This step is required when you change the .NET framework from 4.0 to 4.5.
If you have Telerik.Sitefinity.All
package installed, remove the package and all its dependencies:
- Open your project in Visual Studio
- Open the context menu of your solution, click Manage NuGet Packages...
- In the list of installed packages, find
Telerik.Sitefinity.All
, click Uninstall, and press ENTER
to close the dialog.
- Set the target framework version of your project to .Net Framework 4.5.
Perform the following:
- Open your project in Visual Studio.
- In the context menu of SitefinityWebApp, click Properties.
- On Application tab, in Target framework dropdown box, select .NET Framework 4.5
- Save the changes to your project
- Reinstall all packages:
- In Visual Studio, navigate to Tools » Library Package Manager » Package Manager Console.
- Execute the following command: Update-Package -Reinstall
NOTE: You do this, because the changing the target framework requires re-installation of all packages. After you have removed all Sitefinity CMS related packages in Step 2, you perform this step to re-install all other packages that you may have installed on your system.
- If your project is Sitefinity CMS 8.0 or below, from the
bin
folder of the project, delete Telerik.Sitefinity.UI.MVC.dll
, else skip this step.
- If your project is Sitefinity CMS 8.0 or below, update the
web.config
file of SitefinityWebApp project, else skip this step.
Perform the following web.config transformations:
- Save and close the
web.config
.
- If your project is Sitefinity CMS 8.0 or below, open folder
Properties
, located in your project's folder and edit the AssemblyInfo.cs
file, else skip this step.
Add the following assemblies:
- [assembly: Telerik.Sitefinity.Frontend.Mvc.Infrastructure.Controllers.Attributes.ControllerContainer]
- [assembly: Telerik.Sitefinity.Frontend.Mvc.Infrastructure.Controllers.Attributes.ResourcePackage]
- In the Package Manager Console, install the desired version of
Telerik.Sitefinity.All
using the following command: Install-Package Telerik.Sitefinity.All –Version xx.x.xxxx.x
NOTE: The BCL dependency used by Sitefinity CMS to integrate Azure search in previous versions is also removed. As a result, you can safely remove the Tools folder under the root of your SitefinityWebApp project.
- Build your solution.