Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

TypeLoadException after upgrade to Episerver 11

Vote:
 

After upgrading Episerver to 11.3.2, I get the following TypeLoadException:

Server Error in '/' Application.
Could not load type 'EPiServer.PlugIn.GuiPlugInAttribute' from assembly 'EPiServer, Version=11.3.2.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.TypeLoadException: Could not load type 'EPiServer.PlugIn.GuiPlugInAttribute' from assembly 'EPiServer, Version=11.3.2.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'.

Source Error: 


[No relevant source lines]

Source File: c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\28edaa5b\7a59bc51\App_global.asax.mjdpz7zo.0.cs    Line: 0 

Stack Trace: 


[TypeLoadException: Could not load type 'EPiServer.PlugIn.GuiPlugInAttribute' from assembly 'EPiServer, Version=11.3.2.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'.]
   EPiServer.Framework.Initialization.InitializationModule.EngineExecute(HostType hostType, Action`1 engineAction) +1390
   EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +225
   EPiServer.Global..ctor() +103
   XXX.Global..ctor() +37
   ASP.global_asax..ctor() in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\28edaa5b\7a59bc51\App_global.asax.mjdpz7zo.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) +142
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +105
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1515
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +186
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +27
   System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +80
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +310
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +369

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

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2558.0

I have upgraded all add-ons to be compliant with Episerver 11.

Has anyone else any experience on fixing this error?

Thanks!

#187331
Edited, Jan 19, 2018 12:46
Vote:
 

This is likely an assembly was built with an older version still references to the old assembly. As you said you upgraded all add-ons, did you try to clean bin folder and rebuild?

#187334
Jan 19, 2018 12:54
Vote:
 

Yes, I have tried to clean and rebeuild. I have even deleted the bin folder, but still no luck.

#187337
Jan 19, 2018 13:07
Vote:
 

Hey, 

Did you try to delete the temporary files from (you will need to stop the application to do it):

c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\
#187380
Jan 22, 2018 10:30
Vote:
 

I found out that I had some directly refrenced assemblies to some dlls that was again dependant on an old Episerver version somewhere in one of my csproj files. After removing that reference, the error dissappered.

#187396
Jan 22, 2018 14:36
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.