Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Shahzad Ahamad 51 posts 251 karma points
    Dec 21, 2018 @ 07:12
    Shahzad Ahamad
    0

    Issue while upgrading from Umbraco 7.4.3 to 7.5.14

    Hi Guys I am upgrading from umbraco 7.4.3 to 7.5.14 but it didn't go well

    I am getting below issue

    Could not load file or assembly 'AutoMapper, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

    Below is the stack trace

    [FileLoadException: Could not load file or assembly 'AutoMapper, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
    UmbracoAtlas.App_Start.NinjectWebCommon.Start() +0

    [TargetInvocationException: Exception has been thrown by the target of an invocation.] System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
    System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +87
    System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +101 WebActivatorEx.BaseActivationMethodAttribute.InvokeMethod() +73 WebActivatorEx.ActivationManager.RunActivationMethods(Boolean designerMode) +350 WebActivatorEx.ActivationManager.Run() +78

    [InvalidOperationException: The pre-application start initialization method Run on type WebActivatorEx.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invocation..]
    System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection1 methods, Func1 setHostingEnvironmentCultures) +615
    System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +141
    System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +102
    System.Web.Compilation.BuildManager.ExecutePreAppStart() +157
    System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +549

    [HttpException (0x80004005): The pre-application start initialization method Run on type WebActivatorEx.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invocation..]
    System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10075124 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +95 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

    Please find below the Assembly load trace

    Assembly Load Trace: The following information can be helpful to determine why the assembly 'AutoMapper, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null' could not be loaded.

    Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll Running under executable C:\Program Files (x86)\IIS Express\iisexpress.exe --- A detailed error log follows.

    === Pre-bind state information === LOG: DisplayName = AutoMapper, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null (Fully-specified) LOG: Appbase = file:///C:/Users/info/Desktop/EconomyEnergy/EconomyEnergy/ LOG: Initial PrivatePath = C:\Users\info\Desktop\EconomyEnergy\EconomyEnergy\bin Calling assembly : UmbracoAtlas, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. === LOG: This bind starts in default load context. LOG: Using application configuration file: C:\Users\info\Desktop\EconomyEnergy\EconomyEnergy\web.config LOG: Using host configuration file: C:\Users\info\Documents\IISExpress\config\aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind). LOG: Attempting download of new URL file:///C:/Users/info/AppData/Local/Temp/Temporary ASP.NET Files/vs/1042d899/bca35f3b/AutoMapper.DLL. LOG: Attempting download of new URL file:///C:/Users/info/AppData/Local/Temp/Temporary ASP.NET Files/vs/1042d899/bca35f3b/AutoMapper/AutoMapper.DLL. LOG: Attempting download of new URL file:///C:/Users/info/Desktop/EconomyEnergy/EconomyEnergy/bin/AutoMapper.DLL. WRN: Comparing the assembly name resulted in the mismatch: PUBLIC KEY TOKEN ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

    What i checked

    1. I checked the package.config, It is having correct version
    2. I checked the web.config, It is pointing to correct version and binding redirect has been used.
      1. I ran fuslogvw and found that partial information has been provided for the Automapper.dll, Is it umbraco issue?

    Any help would be appreciable.

    Thank you

  • Dennis Öhman 32 posts 177 karma points c-trib
    Dec 21, 2018 @ 10:28
    Dennis Öhman
    0

    If you right click on Automapper.dll in your bin folder (not inte visual studio) and check properties, what versionnumber is it?

    And what do your binding redirect say?

    Check your csproj reference path and run a clean on your project to see that it loads the correct assembly. =)

  • Shahzad Ahamad 51 posts 251 karma points
    Dec 21, 2018 @ 11:14
    Shahzad Ahamad
    0

    Hi Dennis,

    Please find below the details you asked

    File Version is of Automapper.dll is 3.3.1.0

    BindingRedirect

    <dependentAssembly>
            <assemblyIdentity name="AutoMapper" publicKeyToken="be96cd2c38ef1005" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-3.3.1.0" newVersion="3.3.1.0" />
    </dependentAssembly>
    

    csproj reference

    <Reference Include="AutoMapper, Version=3.3.1.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
          <HintPath>..\packages\AutoMapper.3.3.1\lib\net40\AutoMapper.dll</HintPath>
          <Private>True</Private>
          <Private>True</Private>
        </Reference>
        <Reference Include="AutoMapper.Net4, Version=3.3.1.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
          <HintPath>..\packages\AutoMapper.3.3.1\lib\net40\AutoMapper.Net4.dll</HintPath>
          <Private>True</Private>
        </Reference>
    

    File is available at the give path

Please Sign in or register to post replies

Write your reply to:

Draft