Upgrading Episerver Relate sites to CMS 10
- Use Deployment Center to create a Relate website (if you do not have the running site).
- Use Visual Studio to open the recently created website, and press Ctrl + Shift + S to save the solution.
- Change the target framework to 4.5.2.
- Install the following packages from the NuGet feed:
- Remove solution references to:
- EPiServer.BaseLibrary
- EPiServer.Implementation
- Delete these DLL files in the bin folder:
- EPiServer.BaseLibrary.dll
- EPiServer.Implementation.dll
- EPiServer.WorkflowFoundation.dll
- Build the solution. Fix the obsoleted and missing functions/APIs with these hints:
- Change
PermanentContentLinkMap pplm = PermanentLinkMapStore.Find(pageEntity.PageGuid) as PermanentContentLinkMap;
to
PermanentLinkMap pplm = ServiceLocator.Current.GetInstance<IPermanentLinkMapper>().Find(pageEntity.PageGuid);
- Change
AccessControlList: Exists()
to
Contains()
- StripHtmlFilterRules was moved to Internal namespace, add this:
using EPiServer.HtmlParsing.Internal;
- Change
EPiServer.Web.PermanentLinkMapStore.TryToMapped
to
Web.Routing.UrlResolver.Current.TryToPermanent(responseItem.Uri.ToString(), out mappedUrl)
- Change
RouteTable.Routes.GetVirtualPathForNonContent
to
var currentLanguage = Globalization.ContentLanguage.PreferredCulture.Name;
var virtualPath = UrlResolver.Current.GetVirtualPathForNonContent(entry, currentLanguage, null);
- Temporarily ignore this function: VersioningFileSystemSearchHandler; comment it and replace with return 0;.
- Change
Configuration.Settings.Instance.SiteDisplayName
to
EPiServer.Web.SiteDefinition.Current.Name
- Compile error in Templates\RelatePlus\InitializationModules\CmsIntegrationModule.cs; replace it with file Relate_Patch_For_CMS10.zip. Download the zip file here.
- Open the Package Manager Console, and run update-epidatabase cmlet, or add updateDatabaseSchema="true" attribute to the episerver.framework tag in EPiServerFramework.config. (To view EPiServerFramework.config, click show all files in the Solution Explorer.)
- Press Ctrl + F5 to browse the website.
- Open the Package Manager Console, and run Convert-EPiDatabaseToUtc.
To convert the database to UTC, see the Episerver CMS Developer Guide topic Storing UTC date and time in the database.
- Open RelatePlus.Master, make any change (for example, insert a blank line) and save to disable template caching.
- Redo step 11 for ClubMasterPage.Master and SearchRelatePlus.Master.
- Rebuild the project.
- Copy IMAP4.Net.dll and Parse.Net.dll (included in the zip file you downloaded in step 7) to the bin folder.
- Press Ctrl + F5 to browse website.
- Open the web.config file, and change bindingRedirect of System.Web.Mvc:
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.1" newVersion="4.0.0.0" />
</dependentAssembly>
Last updated: Dec 13, 2016