Copied to clipboard

Flag this post as spam?

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


  • Lars Rathje 4 posts 83 karma points
    Mar 01, 2024 @ 09:38
    Lars Rathje
    0

    Microsoft.icu.icu4c.runtime fails in latest version

    Hi. After self-install on azure of umbraco cms updated to latest release, I see the microsoft.icu.icu4c.runtime is version 68.xx and nuget says the latest stable version is 72.xx. But when I update the icu it makes the install fail. It can't even load. I think there is a bug and it happens in this umbraco code section: private static nint LoadLibrary(string library, bool failOnLoadFailure) { if (!NativeLibrary.TryLoad(library, typeof(object).Assembly, DllImportSearchPath.ApplicationDirectory | DllImportSearchPath.System32, out var handle) && failOnLoadFailure) { Environment.FailFast("Failed to load app-local ICU: " + library); } return handle; }. Error message in debug mode is this: System.ExecutionEngineException HResult=0x80131506 Message=Exception of type 'System.ExecutionEngineException' was thrown. Please investigate - best regards Lars

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Mar 01, 2024 @ 13:07
    Huw Reddick
    0

    you shouldn't update it, roll it back to it's previous version.

  • Lars Rathje 4 posts 83 karma points
    Mar 01, 2024 @ 13:31
    Lars Rathje
    0

    Yes, I have of course done so. But it can lead to others - as me - that spend a lot of time on finding the course. It would be nice to always be compatible with the latest nuget packages. This error has been here for a while in many releases, so I hope by raising it, it can be solved..

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Mar 01, 2024 @ 13:38
    Huw Reddick
    100

    a quick search on the forums would have found you the answer :). Updating nuget packages is not always the best thing to do regardless of whether it is Umbraco or not.

    If you see it as an issue then I would suggest raising it on GitHub rather than on the forums which are just a community based help forum.

  • Lars Rathje 4 posts 83 karma points
    Mar 01, 2024 @ 14:57
    Lars Rathje
    0

    Sorry - my bad. This is my first post here and I didn't know it was limited to non-umbraco employees..

  • Ivo van der Bruggen 7 posts 129 karma points
    Mar 01, 2024 @ 14:58
    Ivo van der Bruggen
    1

    I have had this issue before, for me the fix was looking in your csproj, it should have some reference to ICU.68xxxx. Replace that with the version number you updated to and it should work fine.

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Mar 01, 2024 @ 21:02
    Jeavon Leopold
    3

    If you update Microsoft.ICU.ICU4C.Runtime using NuGet you will manually need to edit the RuntimeHostConfigurationOption inside your csproj to match the version number.

    A better method is to manually edit your csproj and replace both the PackageReference and RuntimeHostConfigurationOption as below. Then you will be up to date.

          <ItemGroup>
        <!-- Opt-in to app-local ICU to ensure consistent globalization APIs across different platforms -->
        <PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="72.1.0.3" />
        <RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="72.1.0.3" Condition="$(RuntimeIdentifier.StartsWith('linux')) or $(RuntimeIdentifier.StartsWith('win')) or ('$(RuntimeIdentifier)' == '' and !$([MSBuild]::IsOSPlatform('osx')))" />
      </ItemGroup>
    
  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Mar 01, 2024 @ 21:18
    Huw Reddick
    0

    Great tip, thanks for the info

  • Nijaz Hameed 37 posts 172 karma points
    Jun 11, 2024 @ 20:28
    Nijaz Hameed
    0

    Thanks @ Jeavon Leopold, you are right, updating the version on system.globalization.appLocalIcu makes the error go away 😀

Please Sign in or register to post replies

Write your reply to:

Draft