Try our conversational search powered by Generative AI!

How to resolve MissingMethodException after update to EPiServer 8?

Vote:
 

Hi!

I've upgraded EPiServer 7.5 [7.5.394.2] to 8 [8.0.0] via Visual Studio 2015 and Nuget.

After trying to browse the site after a successful build I get the following error:

[InitializationException: While loading .NET types from "EPiServer.Scheduler" the following error(s) was reported:

     - System.MissingMethodException: Method not found: 'Void EPiServer.Framework.IInitializableModule.Preload(System.String[])'.

]
   EPiServer.Framework.Initialization.InitializationExceptionHelper.ThrowFriendlyTypeScannerException(IEnumerable`1 reflectionExceptions, IEnumerable`1 addonsWithErrors) +114
   EPiServer.Framework.Initialization.InitializationModule.Initialize(HostType hostType) +1374
   EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +103
   EPiServer.Global..ctor() +108
   Elmia.Global..ctor() +43
   ASP.global_asax..ctor() in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\8724ee91\94ddd343\App_global.asax.0.cs:0

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +138
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +105
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1481
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +191
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +27
   System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +82
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +300
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +343

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +579
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +112
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +712

In the breaking changes section for EPiServer 8 it says:

Unless you have an explicit interface implementation, no change is required since the method has never been called.
Preload has never been called and was created to be used in the future. It was removed to fix code.

I noticed I had implemented two empty Preload methods so I removed them. However, it didn't make the error go away.

Any advice on how to proceed?

#163442
Edited, Oct 20, 2016 15:12
Vote:
 

Do you have maybe some old dll files laying around? Maybe some postbuild scripts that copies files from somewhere?

#163444
Oct 20, 2016 15:31
Vote:
 

Thanks! You were correct. I had some old DLL-files in my main bin-folder:

EPiServer.Scheduler.dll

EPiServer.Scheduler.WKTL.dll

Guess those files were never removed properly.

#163448
Oct 20, 2016 15:44
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.