Copied to clipboard

Flag this post as spam?

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


  • Paul 184 posts 646 karma points
    May 23, 2017 @ 15:15
    Paul
    0

    Issue when installing package on Umb 7.5

    Hi David,

    I keep getting the following when trying to install the package on Umbraco 7.5

    > Install-Package : Could not install package 'EventCalendar.Core 3.2.4'. You are trying to install this package into a project 
    that targets '.NETFramework,Version=v4.5.1', but the package does not contain any assembly references or content files that 
    are compatible with that framework. For more information, contact the package author.
    At line:1 char:1
    + Install-Package EventCalendar.Umbraco
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
        + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
    

    The Visual Studio project is set to target framework 4.5.1

    Any ideas on why it's not installing?

  • Paul 184 posts 646 karma points
    May 23, 2017 @ 15:23
    Paul
    0

    Error at runtime is:

    Could not load file or assembly 'log4net, Version=1.2.11.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)
    

    Assembly Load Trace:

    === Pre-bind state information ===
    LOG: DisplayName = log4net, Version=1.2.11.0, Culture=neutral, PublicKeyToken=null
     (Fully-specified)
    LOG: Appbase = file:///D:/TFS/MySite-Dev/Source/UmbracoBoilerPlate/
    LOG: Initial PrivatePath = D:\TFS\MySite-Dev\Source\UmbracoBoilerPlate\bin
    Calling assembly : Umbraco.Web.UI, Version=1.0.6185.24092, Culture=neutral, PublicKeyToken=null.
    ===
    LOG: This bind starts in default load context.
    LOG: Using application configuration file: D:\TFS\MySite-Dev\Source\UmbracoBoilerPlate\web.config
    LOG: Using host configuration file: \\csu-w-file\home\csu\paul\My Documents\IISExpress\config\aspnet.config
    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\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/paul/AppData/Local/Temp/Temporary ASP.NET Files/root/5df42c6a/e58a8ef/log4net.DLL.
    LOG: Attempting download of new URL file:///C:/Users/paul/AppData/Local/Temp/Temporary ASP.NET Files/root/5df42c6a/e58a8ef/log4net/log4net.DLL.
    LOG: Attempting download of new URL file:///D:/TFS/MySite-Dev/Source/UmbracoBoilerPlate/bin/log4net.DLL.
    WRN: Comparing the assembly name resulted in the mismatch: PUBLIC KEY TOKEN
    ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
    

    Stack trace:

        [FileLoadException: Could not load file or assembly 'log4net, Version=1.2.11.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)]
       Umbraco.Core.Logging.Logger..ctor() +0
       Umbraco.Core.Logging.Logger.CreateWithDefaultLog4NetConfiguration() +58
       Umbraco.Core.CoreBootManager.InitializeLoggerResolver() +114
       Umbraco.Core.CoreBootManager.Initialize() +180
       Umbraco.Web.WebBootManager.Initialize() +133
       Umbraco.Core.UmbracoApplicationBase.StartApplication(Object sender, EventArgs e) +405
       Umbraco.Core.UmbracoApplicationBase.Application_Start(Object sender, EventArgs e) +77
    
    [HttpException (0x80004005): Could not load file or assembly 'log4net, Version=1.2.11.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)]
       System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +529
       System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +169
       System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +169
       System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +396
       System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +333
    
    [HttpException (0x80004005): Could not load file or assembly 'log4net, Version=1.2.11.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)]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +525
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +124
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +700
    
  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    May 23, 2017 @ 16:01
    David Brendel
    0

    Hi Paul,

    the package was compiled against net 4.5.2 Nuget doesn't allow installation into a different/lower net version.

    Have you tried to install the normal umbraco package?

    Regards David

  • Paul 184 posts 646 karma points
    May 24, 2017 @ 08:59
    Paul
    0

    Hi David,

    I've updated my solution to be targeting .Net 4.6. I uninstalled the package then re-installed it. The package now installs via Nuget without issue, however I'm still getting:

    Could not load file or assembly 'log4net, Version=1.2.11.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
    

    Along with the same stack trace as above.

    The thing I don't understand is why it's looking for log4net 1.2.11.0 when the package installs log4net 2.0.3 (aka 1.2.13.0). Even if I try to manually install log4net 1.2.11.0 (aka log4net 2.0.0) when building my site the package is automatically uninstalled and then replaced with log4net 2.0.3 ?

    Any help you can give is appreciated.

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    May 24, 2017 @ 09:18
    David Brendel
    0

    Hi Paul,

    will try to reproduce and find a fix this week. Can't they what happens here with the log4net stuff. Seems really strange.

    Regards David

  • Paul 184 posts 646 karma points
    May 24, 2017 @ 11:01
    Paul
    0

    Ok I found the reason for the log4net error.

    Details here: https://our.umbraco.org/forum/developers/extending-umbraco/45996-log4net-public-token-issues-could-not-load-file-or-assembly In summary, Event Calendar needs to be added via the back office, rather than Nuget unless you want some fun and games with log4net.

    Having got everything installed and the site loading the Event Calendar in the back office loads without the left hand panel.

    The trees.config has this in; is it correct?<add initialize="true" sortOrder="0" alias="ecTree" application="eventCalendar" title="Calendar" iconClosed="icon-folder" iconOpen="icon-folder-open" type="EventCalendarBelle.Trees.ECCalendarTreeController, EventCalendarBelle" /> ?

  • Paul 184 posts 646 karma points
    May 24, 2017 @ 13:39
    Paul
    0

    Ok, all sorted now. The above code in the trees.config wasn't overwritten when the package installed. I thought I'd removed everything, but not so, spotting the above referred to EventCalendarBelle suggested it wasn't right. Removing that line from the trees.config then reinstalling has got it working.

    Trees.config should have this:

    <add initialize="true" sortOrder="0" alias="ecTree" application="eventCalendar" title="Calendar" iconClosed="icon-folder" iconOpen="icon-folder-open" type="EventCalendar.Umbraco.Trees.EventCalendarTreeController, EventCalendar.Umbraco" />
    

    Phew !

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    May 24, 2017 @ 13:41
    David Brendel
    0

    Hi Paul,

    glad you figured it out and sorry for letting you jump through hoops. Nevertheless I will have a look at the log4net issue.

    Regards David

Please Sign in or register to post replies

Write your reply to:

Draft