Copied to clipboard

Flag this post as spam?

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


  • Shuchita 41 posts 150 karma points
    Mar 14, 2023 @ 05:34
    Shuchita
    0

    Upgrade Umbraco 7 to Umbraco 8, Autofac is not working.

    Hi Support,

    I have upgraded Umbraco 7 latest version project to Umbraco 8.18.5 (latest). Now I am getting issue with Dependency Container builder e.g.:

    Boot failed: Umbraco cannot run. See Umbraco's log file for more details.
    -> Umbraco.Core.Exceptions. BootFailed Exception: Boot failed.
    -> System.Invalid Operation Exception: Build() or Update() can only be called once on a ContainerBuilder.
    at Autofac.ContainerBuilder.Build(IComponentRegistry componentRegistry, Boolean exclude DefaultModules)
    at Autofac.ContainerBuilder. Build(ContainerBuild Options options)
    

    I think Umbraco 8 will not support Autofac because Umbraco 8 is using .Net Framework 4.7.2 and Autofac does not support 4.7.2 Framework.

    Is there any alternate for Autofac in Umbraco 8? Also I have checked LightInject is using Umbraco 8, so Is that alternate option for Umbraco 8?

    Thank you.

  • Søren Kottal 702 posts 4497 karma points MVP 5x c-trib
    Mar 14, 2023 @ 07:47
    Søren Kottal
    0

    Hi Shuchita

    Umbraco 8 is already bundled with Lightinject so that could be a good option.

    Any reason you are not upgrading to at least 10 (the latest LTS)?

  • Shuchita 41 posts 150 karma points
    Mar 14, 2023 @ 08:26
    Shuchita
    0

    Thanks Søren Kottal for the quick reply.

    I will try to update dependency with LightInject.

    Also, I will upgrade to Umbraco 10 later. Currently there are so many dependency for .Net Framework, that's why I am upgrading to Umbraco 8.

Please Sign in or register to post replies

Write your reply to:

Draft