November Happy Hour will be moved to Thursday December 5th.

EpiServer CMS6 framework trying to load assembly 'EPiServer, Version=5.1.422.4

Vote:
 

Hi

We are facing a strange error in one of the CMS 6 development environments. The EPiServer Framework attempts to load the 5.1.422 assemby, but i don't have any references to this assembly in the entire code. I don't even have this version installed.

Environment information:

- Windows 7 64 bit

- CMS 6.0.530.0

- .NET runtime v2.0.50727

We have another similar machine which works fine (the only difference as we can see is that this machine runs Windows 7 32-bit). I have verified that all paths in the episerver.config-file are pointing to c:\Program Files x86\. Are there other things I need to do to be able to mix between 32- and 64-bits environments?


Detailed error message:

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 [] and/or types []. Information from LoaderExceptions property [Could not load file or assembly 'EPiServer, Version=5.1.422.4, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)].

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.<br> Check assemblies [] and/or types []. Information from LoaderExceptions property [Could not load file or assembly 'EPiServer, Version=5.1.422.4, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)].

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.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 [] and/or types []. Information from LoaderExceptions property [Could not load file or assembly 'EPiServer, Version=5.1.422.4, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)].

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:

[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 [] and/or types []. Information from LoaderExceptions property [Could not load file or assembly 'EPiServer, Version=5.1.422.4, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)].]
   EPiServer.Framework.Initialization.InitializationModule.StaticInitialization(HostType hostType) +372
   EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +53
   EPiServer.Global..ctor() +76
   Computas.Global..ctor() +41
   ASP.global_asax..ctor() +9

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +146
   System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +298
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +79
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +10363067
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +258
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +382

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


Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927


Any help is appreciated!

Regards

Håvard

assembly 'EPiServer, Version=5.1.422.4
#39763
Jun 01, 2010 12:35
Vote:
 

Hi, most probably you have a DLL in the bin folder that is refering to EPiServer 5.1.422.4. If its working on one machine and not the other you have one of three options:

  1. This problematic DLL is only there on one of the machines, compare the BIN-folders.
  2. One of the machines have EPiServer 5.1.422.4 in the GAC (c:\windows\assembly) which allows the DLL to load.
  3. One of the machines has assemblyRedirect's in web.config that redirects up versions starting with 5.1.422.4 to version 6.

Hope that helps in your troubleshooting.

#39771
Jun 01, 2010 13:17
Vote:
 

Thank you for your help!

I think I've solved the problem now. I removed the web.config file and replaced it with a copy from the other machine, and it suddenly started working. I suspect the first version was corrupt, because it was the same file. I cannot find another explanation..

Hopefully this error won't appear again :)

#39782
Jun 01, 2010 16:58
Vote:
 

Great, assembly loading problems are always difficult to troubleshoot.

#39785
Jun 01, 2010 17:51
Vote:
 

I have the same problem. It occured when I downloaded the latest version (via tfs) to a new computer. (The old is formatted and long gone).

At first I got "cant load assembly system.web.mvc" and when I registered it this new message showed:

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 [EPiCode.Extensions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] and/or types [EPiCode.Extensions.PropertyXhtmlStringExtensions,
EPiCode.Extensions.ControlExtensions,
EPiCode.Extensions.Helper.HtmlHelper,
EPiCode.Extensions.Helper.TagRenderMode,
EPiCode.Extensions.Helper.TagBuilder,
EPiCode.Extensions.ObjectExtensions,
EPiCode.Extensions.CategoryExtensions,
EPiCode.Extensions.LinkItemCollectionExtensions,
EPiCode.Extensions.PageReferenceExtensions,
EPiCode.Extensions.ControlExtensions+<FindChildControls>d__0`1]. Information from LoaderExceptions property [Could not load file or assembly 'EPiServer, Version=5.2.375.236, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040),
Could not load file or assembly 'EPiServer, Version=5.2.375.236, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)].

I use EPiServer CMS 6. Nothing has changed (from the old computer where all worked as a charm) but still I get this message.
There's nothing in the webconfig and all the dll's are the correct version.


Any help is appreciated!

Regards
Sandra

#42119
Aug 09, 2010 14:49
Vote:
 

it sounds like you are missing an assambley reference in your web.config file our in this case make sure you have all the dll-files in your bin folder. The EPiCode.Extension is not an EPiServer specific file but is a open source project from epicode. https://www.coderesort.com/p/epicode/wiki/Extensions

Check if you have an old version compiled against cms5!? I think they have a new on epicode.

Regards

/Eric

#42132
Edited, Aug 09, 2010 21:13
Vote:
 

Thank you for your quick reply!

Even if I remove epicode from the project (reference, dll and such) the error message still remains. And to be honest I'm not really sure what the use for it is in the project. I got the project from an old colleague who doesn't work here anymore. 

I have started a new EPi-project and started to transfer all my old files to the new one because I am under a strict deadline.
I just can't figure out why the project worked before on my old computer but not now anymore. I uploaded everything in Team Foundation Server and saved my local folder wich was up to date.

If I search all the files in the project for epicode or the EPi-version 5 I get nothing...

 

Regards 
Sandra

#42139
Aug 10, 2010 9:01
Vote:
 

I guess version 5.2 was installed on your previous computer?

Might be that EPiCode.Extensions read that dll from c:\windows\assembly somehow. And if you have a clean computer now, that dll is no longer in windows assembly.

As Eric Petterson says, you could always download the latest EPiCode.Extensions, which probably is compiled against EPi6, and add that to the project instead of the old one.

Good luck. /Erik

#42148
Aug 10, 2010 11:45
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.