+1-888-365-2779
Try Now
More in this section

Forums / Sitefinity SDK / SDK Server Error: Could not load file or assembly

SDK Server Error: Could not load file or assembly

4 posts, 0 answered
  1. Ben
    Ben avatar
    3 posts
    Registered:
    28 Sep 2012
    02 Jan 2012
    Link to this post
    I just upgraded to the SDK 4.4 and am now getting this error.  
    I'm on Win7 64-bit, IE9 with Visual Web Developer 10 Express installed.

     

    Server Error in '/' Application.

    Could not load file or assembly 'Telerik.Sitefinity, Version=4.3.1885.0, Culture=neutral, PublicKeyToken=b28c218413bdf563' 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.IO.FileLoadException: Could not load file or assembly 'Telerik.Sitefinity, Version=4.3.1885.0, Culture=neutral, PublicKeyToken=b28c218413bdf563' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Assembly Load Trace: The following information can be helpful to determine why the assembly 'Telerik.Sitefinity, Version=4.3.1885.0, Culture=neutral, PublicKeyToken=b28c218413bdf563' could not be loaded.

    WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. 

    Stack Trace:

    [FileLoadException: Could not load file or assembly 'Telerik.Sitefinity, Version=4.3.1885.0, Culture=neutral, PublicKeyToken=b28c218413bdf563' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)] System.Signature.GetSignature(SignatureStruct& signature, Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType) +0 System.Signature..ctor(IRuntimeMethodInfo methodHandle, RuntimeType declaringType) +53 System.Reflection.RuntimeMethodInfo.get_ReturnType() +33 System.Web.HttpApplicationFactory.ReflectOnMethodInfoIfItLooksLikeEventHandler(MethodInfo m) +28 System.Web.HttpApplicationFactory.ReflectOnApplicationType() +108 System.Web.HttpApplicationFactory.CompileApplication() +145 System.Web.HttpApplicationFactory.Init() +154 System.Web.HttpApplicationFactory.EnsureInited() +76 System.Web.HttpApplicationFactory.SetupFileChangeNotifications() +67 System.Web.Compilation.BuildManager.CompileGlobalAsax() +57 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +265 [HttpException (0x80004005): Could not load file or assembly 'Telerik.Sitefinity, Version=4.3.1885.0, Culture=neutral, PublicKeyToken=b28c218413bdf563' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)] System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +62 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +421 System.Web.Compilation.BuildManager.CallAppInitializeMethod() +31 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +691 [HttpException (0x80004005): Could not load file or assembly 'Telerik.Sitefinity, Version=4.3.1885.0, Culture=neutral, PublicKeyToken=b28c218413bdf563' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9036040 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97 System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +258 


    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225
  2. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    03 Jan 2012
    Link to this post
    Hi Ben,

    The error you get is coming from the fact that you are referencing an assembly which is an older version. Please make sure that the custom modules ( if you have such in separate projects )  as well as your main project are using the assemblies from the newest version of the SDK. The easiest way to fix the issue is to remove all old references and use the new ones.

    All the best,
    Victor Velev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. Bill
    Bill avatar
    1 posts
    Registered:
    09 Nov 2011
    04 Sep 2013 in reply to Ben
    Link to this post
    Ben,

    I am presently encountering the same issue.  We are upgrading a site from 4.3 to 5.0 and we get the same error you did.  Do you remember what the resolution was?

    Thanks,

    Bill
  4. Kaloyan
    Kaloyan avatar
    272 posts
    Registered:
    30 Sep 2016
    06 Sep 2013
    Link to this post
    Hi Bill,

    In order to resolve this problem you can use the approach which Victor suggested. The other approach available is to perform a binding redirect. In order to achieve this I would suggest to check the following article:

    Avoid Version errors with Assembly Binding

    Regards,
    Kaloyan
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

4 posts, 0 answered