Loading...

Last updated: Feb 13 2018

Area: Episerver Add-ons Applies to versions: Mail 10 & CMS 11

Installing/upgrading Episerver Mail 10 to CMS 11

This topic describes how to install/upgrade an Alloy sample site with Episerver Mail 8 and Episerver CMS 11.

Alloy MVC site

  1. Install CMS 7.5 and Episerver Mail through the Deployment Center.
  2. Use Visual Studio to open your recently created website and press Ctrl + Shift + S to save your solution.
  3. Change the project target framework to 4.6.1.
  4. Install:
    • EPiServer.CMS.UI
    • EPiServer.CMS.Core
    • EPiServer.Framework
    • EPiServer.ServiceLocation.StructureMap
    • Episerver.XForms
    • If you have installed Search on your site, install EPiServer.Search and EPiServer.Search.CMS.
  1. Remove the solution references to EPiServer.BaseLibrary and EPiServer.Implementation.
  2. Delete the following DLLs in the bin folder:
    • EPiServer.BaseLibrary.dll
    • EPiServer.Implementation.dll
    • EPiServer.WorkflowFoundation.dll
  1. Right-click on your project and select Project properties > Build. Set Treat warnings as error to None.
  2. Fix the obsoleted or missing functions/APIs.
    • In AlloyContentAreaRenderer.cs, change:
      public AlloyContentAreaRenderer(IContentRenderer contentRenderer, TemplateResolver templateResolver, IContentAreaItemAttributeAssembler attributeAssembler)
      
      : base(contentRenderer, templateResolver, attributeAssembler)
      to
      public AlloyContentAreaRenderer(IContentRenderer contentRenderer, TemplateResolver templateResolver, IContentAreaItemAttributeAssembler attributeAssembler, IContentRepository contentRepository, IContentAreaLoader contentAreaLoader)
      
      : base(contentRenderer, templateResolver, attributeAssembler, contentRepository, contentAreaLoader)
    • In ContactPage.cs, change:
      [EmailAddress] to [Business.EmailAddress]
    • In PropertyStringList:, remove function CreatePropertyControl().
    • Download ClonedContentProvider.cs and replace the existing file in your solution with this.
    • Download CategorizableExtensions.cs and replace the existing file in your solution with this.
    • Download DependencyResolverInitialization.cs and replace the existing file in your solution with this.
    • Download ServiceLocatorDependencyResolver.cs and add it to folder Initialization and include it in your project.
  1. Install EPiServer.Packaging.UI.
  2. In the Visual Studio Package Manager Console, run:
    Move-EPiServerProtectedModules
  3. Install EpiServer.Mail 10.x.x.
  4. If you have Microsoft.AspNet.Mvc version="5.2.3":
    • Check web.config in Views, and change all version in section group:
      sectionGroup name="system.web.webPages.razor" from Version=2.0.0.0 to Version=3.0.0.0.
      Example:
      <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>
  1. If you have Microsoft.AspNet.Mvc version="4.x.x" (Note: from CMS 11, MVC 5 is required!):
    • Check the web.config of the site, and update bindingRedirect of System.Web.Mvc.
      Example, change from:
      <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
      to
      <bindingRedirect oldVersion="0.0.0.0-4.0.0.1" newVersion="4.0.0.0"/>
  1. In EPiServerMail\MasterPages\Mail.Master, replace:
    <%= Page.DojoConfig(false, true) %> with <%= Page.ConfigureDojo(false, true, false) %>.
  2. If you have Search installed, change:
    return SearchSettings.Config.Active; to return SearchSettings.Options.Active;.

Alloy Web Forms site

  1. Install CMS 7.5 and Episerver Mail through the Deployment Center.
  2. Use Visual Studio to open your recently created website and press Ctrl + Shift + S to save your solution.
  3. Change the project target framework to 4.6.1.
  4. Install:
    • EPiServer.CMS.UI
    • EPiServer.CMS.Core
    • EPiServer.Framework
    • EPiServer.ServiceLocation.StructureMap
    • Episerver.XForms
    • If you installed your site with Search, install EPiServer.Search and EPiServer.Search.CMS.
  1. Remove the solution references to EPiServer.BaseLibrary and EPiServer.Implementation.
  2. Delete the following DLLs from the bin folder:
    • EPiServer.BaseLibrary.dll
    • EPiServer.Implementation.dll
    • EPiServer.WorkflowFoundation.dll
  1. Right-click on your project and select Project properties > Build. Set Treat warnings as error to None.
  2. Fix the obsoleted or missing functions/APIs:
    • In the PropertyStringList:, remove the function CreatePropertyControl().
    • Download the file ClonedContentProvider.cs and replace the existing file in your solution with this.
    • Download the file CategorizableExtensions.cs and replace the existing file in your solution with this.
    • Download the file PageList.ascx and replace the existing file in your solution with this.
  1. Install EPiServer.Packaging.UI.
  2. In the Visual Studio Package Manager Console, run:
    Move-EPiServerProtectedModules
  3. Install EpiServer.Mail 10.x.x.
  4. Change:
    • PermanentLinkMapStore to using EPiServer.Web.Internal;
    • return DataFactory.Instance.GetPage(pageLink, languageSelector); to return DataFactory.Instance.GetPage(pageLink, new LoaderOptions { new LanguageLoaderOption { Language = languageSelector.Language } });
  1. Add:
    • using EPiServer.Templates.Alloy.Helpers; to the top of the ProductPageTemplate.aspx.cs file
    • using EPiServer.Templates.Alloy.Helpers; to the top pf the MainNavigation.ascx.cs file
  1. Right-click on your project and select Project properties > Build Events. In Post-build event command line, add:
    "$(MSBuildBinPath)\msbuild.exe" "$(ProjectDir)[MSBuild]\Scripts.xml"

    "$(MSBuildBinPath)\msbuild.exe" "$(ProjectDir)[MSBuild]\Stylesheets.xml"

  2. In EPiServerMail\MasterPages\Mail.Master, replace:
    <%= Page.DojoConfig(false, true) %> with <%= Page.ConfigureDojo(false, true, false) %>.
  3. If you have Search installed, change:
    return SearchSettings.Config.Active; to return SearchSettings.Options.Active;.

Troubleshooting

  • Check that you have not removed EPiServer.Mail.Sources.EPiServerCommunitySearch.dll from the bin folder.
  • You must be a member of one of the MailAdminsMailEditors, or Administrators groups.
  • If your log is not working, search for ILog and change it to ILogger, and remove using LogManager = log4net.LogManager;. Also, change:
    Logger.DebugFormat to Logger.Debug
    Logger.ErrorFormat
     to Logger.Error

Do you have feedback on this documentation? Send an email to documentation@episerver.com. For development-related questions and discussions, refer to our Forums on https://world.episerver.com/forum/