Johan Björnfot
Jun 28, 2012
  6551
(4 votes)

EPiServer 7 Preview – API changes

During the partner days I hold a session about some of the changes that have been in the API:s in EPiServer 7 and how that affects you when you upgrade a CMS6R2 site. So here is the powerpoint for that presentation in swedish and here is a version in english.

It would be very appreciated if some of you actually tried to updated a CMS6R2 site and get back with feedback on any problems you run into. Then hopefully we can fix them before release and make the upgrade as smooth as possible.

Jun 28, 2012

Comments

Oskar Zetterberg
Oskar Zetterberg Jun 28, 2012 04:34 PM

Just installed the EPiServer 7 application files. Under the installation it removed all shared services and only reinstalled the scheduler service. This will be a problem when running CMS 6 sites on the same machine which I do.

Is this by design?

Stefan Forsberg
Stefan Forsberg Jun 28, 2012 07:16 PM

In a way, yes. See http://world.episerver.com/Documentation/Items/Installation-Instructions/EPiServer-CMS/Version-7/Installation-Instructions---EPiServer-7-Preview---CMS/#RunCMS6R2

Oskar Zetterberg
Oskar Zetterberg Jun 28, 2012 09:58 PM

Oh, that explains it. Better read the instructions next time, although click next click is more fun ;). Next up, upgrade.

Oskar Zetterberg
Oskar Zetterberg Jun 29, 2012 12:50 PM

Upgraded a site. Compile went well after some ambiguous namespace fixes.
Running it was another thing. Ran into this:

2012-06-29 12:01:42,002 WARN [20] EPiServer.Initialization.SearchInitialization.IndexAllOnce - Error during full search indexing of content and files.
EPiServer.Core.EPiServerException: LicenseException: Current version 7.0.449.1 is newer than required version 6.1.9999.
at EPiServer.Core.Licensing.ThrowLicenseError(String msg)
at EPiServer.Core.Licensing.Test()
at EPiServer.Core.ContentProvider.CheckLicense()
at EPiServer.Core.ContentProvider.LoadContentFromCacheOrRepository(ContentReference contentreference, ILanguageSelector selector)
at EPiServer.Core.ContentProvider.GetLanguageBranches(ContentReference contentLink)
at EPiServer.DataFactory.GetLanguageBranches[T](ContentReference contentLink)
at EPiServer.Core.SlimContentReader.Next()
at EPiServer.Core.ContentSearchHandler.IndexPublishedContent()
at EPiServer.Initialization.SearchInitialization.IndexAllOnce(ContentSearchHandler contentSearchHandler, VersioningFileSystemSearchHandler unifiedFileSearchHandler)
2012-06-29 12:01:42,059 ERROR [10] EPiServer.PlugIn.PlugInRuntime.Start - PlugInRuntime.Start failed on the Assembly EPiServer.PlugIn.PropertyDefinitionTypePlugInAttribute, EPiServer, Version=7.0.449.1, Culture=neutral, PublicKeyToken=8fe83dea738b45b7 and the method PropertyDefinitionTypePlugInAttribute
2012-06-29 12:01:42,064 ERROR [10] EPiServer.Framework.Initialization.InitializationEngine.InitializeModules - Initialize action failed for Initialize on class EPiServer.Initialization.PlugInInitialization, EPiServer, Version=7.0.449.1, Culture=neutral, PublicKeyToken=8fe83dea738b45b7
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.AmbiguousMatchException: Multiple custom attributes of the same type found.
at System.Attribute.GetCustomAttribute(MemberInfo element, Type attributeType, Boolean inherit)
at EPiServer.PlugIn.AssemblyTypeInfo.ListPlugInDescriptorsForSort(PlugInAttribute matchAttribute, ArrayList list)
at EPiServer.PlugIn.PlugInLocator.Search(PlugInAttribute matchAttribute)
at EPiServer.PlugIn.PropertyDefinitionTypePlugInAttribute.Start()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at EPiServer.PlugIn.PlugInRuntime.Start(Boolean reset)
at EPiServer.Initialization.PlugInInitialization.Initialize(InitializationEngine context)
at EPiServer.Framework.Initialization.ModuleNode.Execute(Action a, String key)
at EPiServer.Framework.Initialization.InitializationEngine.InitializeModules()

Jun 29, 2012 01:37 PM

It looks like you need a EPiServer 7 CMS license to get past that exception.

Oskar Zetterberg
Oskar Zetterberg Jun 29, 2012 02:58 PM

The license error was just a warning. The other errors was fixed when I recompiled and replaced obsolete attributes on all custom properties in an external library.

Now I am stuck with another error:
[MissingMethodException: Method not found: 'Boolean EPiServer.DataAbstraction.PageType.op_Equality(EPiServer.DataAbstraction.PageType, EPiServer.DataAbstraction.PageType)'.]
PageTypeBuilder.Abstractions.PageTypeRepository.Load(Guid guid) +0
PageTypeBuilder.Synchronization.PageTypeLocator.GetExistingPageType(PageTypeDefinition definition) +286
PageTypeBuilder.Synchronization.PageTypeSynchronizer.b__0(PageTypeDefinition definition) +24
System.Linq.WhereListIterator`1.MoveNext() +165
PageTypeBuilder.Synchronization.PageTypeSynchronizer.CreateNonExistingPageTypes(IEnumerable`1 pageTypeDefinitions) +140
PageTypeBuilder.Synchronization.PageTypeSynchronizer.SynchronizePageTypes() +134
PageTypeBuilder.Initializer.Initialize(InitializationEngine context) +164
EPiServer.Framework.Initialization.ModuleNode.Execute(Action a, String key) +64
EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +751
EPiServer.Framework.Initialization.InitializationEngine.Initialize(HostType hostType) +162
EPiServer.Framework.Initialization.InitializationModule.Initialize(HostType hostType) +308
EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +75
EPiServer.Global..ctor() +103

Edit: Above problem fixed with a small rewrite of PTB. All working good now.

Arild Henrichsen
Arild Henrichsen Aug 10, 2012 11:17 AM

@Oskar: Could you give some more details on your last comment about "small rewrite of PTB"?

Jon Haakon Ariansen
Jon Haakon Ariansen Oct 7, 2012 12:50 AM

I have recently done a upgrade from Episerver CMS 6 R2 to Episerver CMS 7. When I tried to run the page first time after compilation I got an error on Episerver.WebDav saying that it was the wrong assembly version - 6.1.379.0. I checked the bin catalog and found that all episerver assemblies was from previous version meaning that assembiles was not copied into the bin folder in the upgrade.
I copied the files from Episerver folder in Program Files and tried to load the page again. Then I got the following error:

Unable to load one or more of the requested types. The following information may be a subset of the Type/LoaderException information present - inspect with debugger for complete view.
Check assemblies [EPiServer.Legacy4, Version=6.1.379.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7] and/or types [EPiServer.Enterprise.Transfer.EPi4.AutoCorrectionPageDefinitionEventArgs,
EPiServer.Enterprise.Transfer.EPi4.AutoCorrectionPropertyEventArgs,
EPiServer.Enterprise.Transfer.EPi4.DataImporter,
EPiServer.Enterprise.Transfer.EPi4.DynamicPropertyValueTransfer,
EPiServer.Enterprise.Transfer.EPi4.PageTransfer,
EPiServer.Enterprise.Transfer.EPi4.PageTypeTransfer,
EPiServer.Enterprise.Transfer.EPi4.PropertyCategoryTransform,
EPiServer.Enterprise.Transfer.EPi4.PropertyLongStringTransform,
EPiServer.Enterprise.Transfer.EPi4.PropertyPageReferenceTransform,
EPiServer.Enterprise.Transfer.EPi4.PropertyStringTransformer,
EPiServer.Enterprise.Transfer.EPi4.PropertyUriTransform,
EPiServer.Enterprise.Transfer.EPi4.PropertyXFormTransformer,
EPiServer.Enterprise.Transfer.EPi4.SetUp,
EPiServer.PageTreeLoader,
EPiServer.PageTreeReader,
EPiServer.PageTreeXml,
EPiServer.SpecializedProperties.PropertyStringReadOnly,
EPiServer.SystemControls.ValidationSummary,
EPiServer.WebControls.CategoryTemplateContainer,
EPiServer.WebControls.CategoryTree]. Information from LoaderExceptions property [Method 'get_TransferContext' in type 'EPiServer.Enterprise.Transfer.EPi4.NativeFileTransferEPi4' from assembly 'EPiServer.Legacy4, Version=6.1.379.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' does not have an implementation.,
Method 'OpenWrite' in type 'EPiServer.Enterprise.Transfer.EPi4.NativeFileTransferObject' from assembly 'EPiServer.Legacy4, Version=6.1.379.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' does not have an implementation.].

Stack:

Exception Details: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. The following information may be a subset of the Type/LoaderException information present - inspect with debugger for complete view.
Check assemblies [EPiServer.Legacy4, Version=6.1.379.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7] and/or types [EPiServer.Enterprise.Transfer.EPi4.AutoCorrectionPageDefinitionEventArgs,
EPiServer.Enterprise.Transfer.EPi4.AutoCorrectionPropertyEventArgs,
EPiServer.Enterprise.Transfer.EPi4.DataImporter,
EPiServer.Enterprise.Transfer.EPi4.DynamicPropertyValueTransfer,
EPiServer.Enterprise.Transfer.EPi4.PageTransfer,
EPiServer.Enterprise.Transfer.EPi4.PageTypeTransfer,
EPiServer.Enterprise.Transfer.EPi4.PropertyCategoryTransform,
EPiServer.Enterprise.Transfer.EPi4.PropertyLongStringTransform,
EPiServer.Enterprise.Transfer.EPi4.PropertyPageReferenceTransform,
EPiServer.Enterprise.Transfer.EPi4.PropertyStringTransformer,
EPiServer.Enterprise.Transfer.EPi4.PropertyUriTransform,
EPiServer.Enterprise.Transfer.EPi4.PropertyXFormTransformer,
EPiServer.Enterprise.Transfer.EPi4.SetUp,
EPiServer.PageTreeLoader,
EPiServer.PageTreeReader,
EPiServer.PageTreeXml,
EPiServer.SpecializedProperties.PropertyStringReadOnly,
EPiServer.SystemControls.ValidationSummary,
EPiServer.WebControls.CategoryTemplateContainer,
EPiServer.WebControls.CategoryTree]. Information from LoaderExceptions property [Method 'get_TransferContext' in type 'EPiServer.Enterprise.Transfer.EPi4.NativeFileTransferEPi4' from assembly 'EPiServer.Legacy4, Version=6.1.379.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' does not have an implementation.,
Method 'OpenWrite' in type 'EPiServer.Enterprise.Transfer.EPi4.NativeFileTransferObject' from assembly 'EPiServer.Legacy4, Version=6.1.379.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' does not have an implementation.].

I notice that Episerver.Legacy4 in my bin folder has both file and Product version 6.1.379.0. Chaning the version in web.config doesn't work eigther. I get the error that Episerver Legacy4 version 6.1.379.1 is missing.

Alastair Green
Alastair Green Feb 21, 2013 01:11 PM

@Jon Haakon Ariansen

I'm getting the same issue. Did you manage to resolve this?

Jun 6, 2013 01:02 PM

@Jon Haakon Ariansen

I'm also getting the same issue. Did you manage to resolve this one?

Jun 28, 2013 12:00 PM

I'm also getting the same issue. Did you manage to resolve this? Or does anyone else know what to do?

Shoma Gujjar
Shoma Gujjar Oct 31, 2013 04:02 PM

I am still getting the Episerver.Legacy4. Did anyone manage to resolve it?

Abhishek Salgaonkar
Abhishek Salgaonkar Jul 22, 2014 04:20 PM

Just remove the Episerver.Legacy4 dll from bin . Then it should work.

Please login to comment.
Latest blogs
Preview multiple Visitor Groups directly while browsing your Optimizely site

Visitor groups are great - it's an easy way to add personalization towards market segments to your site. But it does come with it's own set of...

Allan Thraen | Sep 26, 2022 | Syndicated blog

The Report Center is finally back in Optimizely CMS 12

With Episerver.CMS.UI 12.12.0 the Report Center is finally re-introduced in the core product.

Tomas Hensrud Gulla | Sep 26, 2022 | Syndicated blog

Dynamic Route in ASP.NET Core When MapDynamicControllerRoute Does Not Work

Background Creating one of the add-on for Optimizely I had to deal with challenge to register dynamically route for the API controller. Dynamic rou...

valdis | Sep 25, 2022 | Syndicated blog

404 Error on Static Assets Within an Optimizely plugin

Background With the move to CMS 12 and .NET 5/6, developers are now able to build Plugins and Extensions using Razor Class Libraries (RCL).  These...

Mark Stott | Sep 23, 2022