Copied to clipboard

Flag this post as spam?

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


  • Thomas 23 posts 143 karma points
    Jun 06, 2024 @ 14:35
    Thomas
    0

    "The call is ambiguous between" error at AddBackOffice() in Startup.cs after updating to Umbraco 14

    Hi,

    After updating to Umbraco 14, I'm getting the following error:

    The call is ambiguous between the following methods or properties:

    'Umbraco.Extensions.UmbracoBuilderExtensions.AddBackOffice(Umbraco.Cms.Core.DependencyInjection.IUmbracoBuilder, System.Action

    and

    'Umbraco.Extensions.UmbracoBuilderExtensions.AddBackOffice(Umbraco.Cms.Core.DependencyInjection.IUmbracoBuilder, System.Action

    As you can see here, the 2 are exactly the same:

    enter image description here

    enter image description here

    Anyone have any ideas what the issue could be?

  • Steffen Hornbæk Nielsen 54 posts 165 karma points
    Jun 07, 2024 @ 08:27
    Steffen Hornbæk Nielsen
    0

    Do you have multiple umbraco nuget packages installed?

  • Thomas 23 posts 143 karma points
    Jun 07, 2024 @ 10:20
    Thomas
    100

    I figured it out. Apparently, it was the NuGet package Umbraco.ExaminePDF that was causing it. It was installing a seperate version of Umbraco.Cms.BackOffice. Hopefully it gets updated soon, since I'm using ExaminePDF in my project.

  • Huw Reddick 1929 posts 6717 karma points MVP 2x c-trib
    Jun 07, 2024 @ 10:38
    Huw Reddick
    0

    very few packages are currently ready for Umbraco 14 due to the backoffice change.

  • Huw Reddick 1929 posts 6717 karma points MVP 2x c-trib
    Jun 07, 2024 @ 10:37
    Huw Reddick
    0

    Umbraco 14 does not use startup.cs just program.cs which OOB looks like

    WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
    
    builder.CreateUmbracoBuilder()
        .AddBackOffice()
        .AddWebsite()
        .AddDeliveryApi()
        .AddComposers()
        .Build();
    
    WebApplication app = builder.Build();
    
    await app.BootUmbracoAsync();
    
    
    app.UseUmbraco()
        .WithMiddleware(u =>
        {
            u.UseBackOffice();
            u.UseWebsite();
        })
        .WithEndpoints(u =>
        {
            u.UseBackOfficeEndpoints();
            u.UseWebsiteEndpoints();
        });
    
    await app.RunAsync();
    
Please Sign in or register to post replies

Write your reply to:

Draft