Uppgrading to #Episerver CMS 11 causing errors and how to solve them

Big changes under the hood this time, mostly classes being moved out to new binaries, meaning many add ons / dependencies needs to be updated.

icon of user profile

Published 22nd November 2017
Episerver CMS 11.1

Beware AddOn developers, your addon must be updated

The CMS Core team is now targeting .NET 4.6.1 in order to be compliant with NetStandard 2.0, therefor has moved a lot of ASPNET related to new Nuget Packages, mainly EPiServer.CMS.AspNet + EpiServer.Framework.AspNet + EPiServer.ServiceLocation.StructureMap. Check hole list: http://world.episerver.com/documentation/upgrading/Episerver-CMS/cms-11/new-nuget-packages/

At the time writing Episerver addons like Episerver Find, Forms, Commerce, ImageVault are not released/compatible.

Related Errors:

App_Code.0.cs: error CS1519: Invalid token ‘,’ in class, struct, or interface member declaration

If you are using the obsolete Subscription system, this API has been moved to EPiServer.CMS.AspNet

And when site uses a custom profile whose properties are defined under system.web, profile, properties in the config file. The type of one of the properties SubscriptionInfo is specified in the “Namespace.ClassName, AssemblyName” format. This Error is hard to find, and it shows up on runtime init.

Eg Change in web.config

  <profile><properties><add name="SubscriptionInfo" type="EPiServer.Personalization.SubscriptionInfo, EPiServer " />

to

    <profile><properties><add name="SubscriptionInfo" type="EPiServer.Personalization.SubscriptionInfo, EPiServer.Cms.AspNet" />

TypeLoadException: Could not load type EPiServer.Web.Routing.IContentRouteHelper from assembly EPiServer, Version=11.1.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7.

Check the stack trace what is causing this, probably it is an add on, or a dependency that still point at the old CMS 9,10 DLLs. These addons has to be upgraded.

Check Nuget feed if they are update already, if not, contact the author on the project site, or why not help out upgrading, and commit a pull request.

Meanwhile, while trying, you can Either remove these addons, or remove by not scanning them:

  <episerver.framework>
    <scanAssembly>
      <add assembly="*" />
      <remove assembly="Gosso.EPiServerAddOn.QuickNavExtension" />
    </scanAssembly>

TinyMCE new paths for packages and addons

Since tinyMCE now is an addon package, the path to addon files has changed. So if you have some custom plugins and reference to for example tiny_mce_popup.js, change path!

Old paths was suppose to be under /Util/Editor/tinymce/

example: Util/Editor/tinymce/plugins/tiny_mce_popup.js

New paths
/EPiServer/EPiServer.Cms.TinyMce/1.0.0/ClientResources/

Example: /EPiServer/EPiServer.Cms.TinyMce/1.0.0/ClientResources/tinymce/tiny_mce_popup.js

Upgrade of TinyMCE

Could not load type ‘EPiServer.Editor.TinyMCE.TinyMCEPluginNonVisualAttribute’ from assembly ‘EPiServer.Cms.TinyMce.

Solution: Remove  TinyMCEPluginButton registration in your cs code. Replace with TinyMceInitialization Registration: check this

XhtmlString formating error in views

@Model.CurrentPage.MainBody is not HTML formated anymore

@Html.Raw(Model.CurrentPage.MainBody) works better

But pls use @Html.DisplayFor(x => Model.CurrentPage.MainBody) then blocks will be rendered if droped in Editor.

XhtmlString is not raw formated anymore if you use a property directly in the views, you need to use Html.Raw or DisplayFor / PropertyFor

License error episerver 11

You need a new license, some have experienced license error message when upgrading to Episerver version 10.6+.

https://world.episerver.com/blogs/filip-gondek/dates/2018/8/license-error-on-site/

Could not load file or assembly ‘StructureMap.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified.E

Error is due to you using signed “StructureMap.Web” that is not in use anymore.

Solution:

  1. Remove the referens “StructureMap.Web”
  2. browse new reference in path “..\packages\structuremap.web.4.0.0.315\lib\net40\StructureMap.Web.dll” instead of “..\packages\structuremap.web-signed.3.1.6.191\lib\net40\StructureMap.Web.dll”

 

 

 

This blog post will be updated …

 Resources
SEO terms
  • Upgrading Episerver CMS 11
  • Undantagsinformation: System.TypeLoadException: Det gick inte att läsa in typen EPiServer.Web.Routing.IContentRouteHelper från sammansättningen EPiServer, Version=11.1.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7.
  • Error: window.tinyMCEPopup.getWindowArg missing
  • HTML on Properties not formated Episerver 11
  • Det går inte att läsa in filen eller sammansättningen StructureMap.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null eller ett av dess beroenden. Det går inte att hitta filen.
  • Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly “StructureMap.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e60ad81abae3c223, processorArchitecture=MSIL”. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.