Copied to clipboard

Flag this post as spam?

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


This forum is in read only mode, you can no longer reply
  • Robert Foster 459 posts 1820 karma points MVP 3x admin c-trib
    Feb 04, 2014 @ 08:18
    Robert Foster
    0

    Support for Umbraco 7.0.3?

    HI,

    I tried to install this on Umbraco 7.0.3 (using NuGet) but when running the site I was confronted with the following error:

    System.TypeInitializationException: The type initializer for 'ImageProcessor.Web.HttpModules.ImageProcessingModule' threw an exception. ---> System.Exception: Could not load file or assembly 'Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

    Fusion Log:

    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].

     

    Multiple times in the backend.  Probably not specifically an ImageProcessor issue - could be a framework specific issue, but just wondering whether you've tested this on Umbraco 7 yet?

     

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Feb 04, 2014 @ 09:55
    Jeavon Leopold
    1

    Hi Robert,

    I have used it with Umbraco 7 without issue. I think what might of happened is that your visual studio solution is targeting .net framework v4 when it needs to be targeting .net framework v4.5 as this makes the Nuget package install different dependencies. If this is the case, you should remove the Nuget package, change the solution to v4.5 then reinstall the package.

    Jeavon

  • Robert Foster 459 posts 1820 karma points MVP 3x admin c-trib
    Feb 04, 2014 @ 10:56
    Robert Foster
    0

    Yup, thought about that - it's definitely targeting v4.5...

    Will have to play around it some more...

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Feb 04, 2014 @ 11:08
    Jeavon Leopold
    0

    Ok, check if you have the Microsoft.Bcl and Microsoft.Bcl.Async Nuget packages. I think Microsoft.Threading.Tasks comes in those. But as you can see here, there are only ImageProcessor dependencies if you are using framework v4.0.

  • Robert Foster 459 posts 1820 karma points MVP 3x admin c-trib
    Feb 04, 2014 @ 11:16
    Robert Foster
    0

    Yeah, not using the v4.0 framework; never did. 

    Noticed that the url above mentions that both of these libraries are required, but for some reason didn't get installed when I installed ImageProcessor through Nuget. Never mind, problem solved [for now]

  • James Jackson-South 489 posts 1747 karma points c-trib
    Feb 04, 2014 @ 16:24
    James Jackson-South
    1

    As Jeavon said they're only required for the NET4 build as it states that on the Nuget site.

    I've just checked the deployed package and I'm definitely only targeting those binaries as a dependency for the NET4 version.

    The problem could be one of three things:

    1. Nuget is incorrectly determining the correct framework because it's been whack recently.
    2. I've messed up somewhere with this release.
    3. Something else has messed up the configuration making Nuget think you have NET4 installed.

    Things to do

    Check the binary in your bin folder. The NET4.5 version of v3.0.1.0 is 43.5kb in size. If you can open it in reflector or equivalent it will give you a target runtime description as [assembly: TargetFramework(".NETFramework,Version=v4.5", FrameworkDisplayName=".NET Framework 4.5")].

    The NET4 version is slightly larger at 44kb.

    Once you have the correct binary referenced the problem will go away.

    Things to note

    Async await behaviour defaults to undefined in ASP.NET unless you specifically ensure that the runtime is not running in quirks mode. I have missed the setting in the web.config transform to force that in NET4.5. You will want to make it asynchronous.

    Setting the following value will ensure behaviour is asynchronous.

    <httpRuntime targetFramework="4.5" />
    

    Further info on that http://blogs.msdn.com/b/webdev/archive/2012/11/19/all-about-httpruntime-targetframework.aspx

    Hopefully this will help you get to the bottom of the problem. Thanks for choosing to use ImageProcessor as a solution.

Please Sign in or register to post replies

Write your reply to:

Draft