Copied to clipboard

Flag this post as spam?

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


  • Thomas 12 posts 92 karma points
    7 days ago
    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 48 posts 139 karma points
    6 days ago
    Steffen Hornbæk Nielsen
    0

    Do you have multiple umbraco nuget packages installed?

  • Thomas 12 posts 92 karma points
    6 days ago
    Thomas
    0

    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 1810 posts 6223 karma points MVP c-trib
    6 days ago
    Huw Reddick
    0

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

  • Huw Reddick 1810 posts 6223 karma points MVP c-trib
    6 days ago
    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