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.
- 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.
- From the
bin folder of the project, delete Telerik.Sitefinity.UI.MVC.dll
- Update the
web.config file of SitefinityWebApp project.
Perform the following:
- Update the
<host> section inside <system.web.webPages.razor> in the following way:
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
- Update the
<sectionGroup> section inside <configSections> in the following way:
<sectionGroup name="system.web.webPages.razor"
type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host"
type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
requirePermission="false"/>
<section name="pages"
type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
requirePermission="false"/>
</sectionGroup>
- Inside
<system.web>, update the target framework from 4.0 to 4.5 :
<compilation targetFramework="4.5"/>
- Add the following binding redirects inside
<assemblyBinding>:
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
- Inside
<system.webServer>, add the following:
<staticContent>
<remove fileExtension=".woff" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
</staticContent>
- Save and close the
web.config.
- In the Package Manager Console, install the desired version of
Telerik.Sitefinity.All using the following command: Install-Package Telerik.Sitefinity.All –Version 8.1.5800.0
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.