Copied to clipboard

Flag this post as spam?

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


  • Amigo 243 posts 568 karma points
    Aug 12, 2023 @ 11:11
    Amigo
    0

    Error when updating 12.0.1 to 12.1.0

    I get this errror when trying to upgrade 12.0.1 to 12.1.0. Any ideas what could be wrong?

    An error occurred while starting the application. AggregateException: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: Umbraco.Cms.Persistence.EFCore.Migrations.IMigrationProvider Lifetime: Singleton ImplementationType: Umbraco.Cms.Persistence.EFCore.SqlServer.SqlServerMigrationProvider': Unable to resolve service for type 'Microsoft.EntityFrameworkCore.IDbContextFactory1[Umbraco.Cms.Persistence.EFCore.UmbracoDbContext]' while attempting to activate 'Umbraco.Cms.Persistence.EFCore.SqlServer.SqlServerMigrationProvider'.) (Error while validating the service descriptor 'ServiceType: Umbraco.Cms.Persistence.EFCore.Migrations.IMigrationProvider Lifetime: Singleton ImplementationType: Umbraco.Cms.Persistence.EFCore.Sqlite.SqliteMigrationProvider': Unable to resolve service for type 'Microsoft.EntityFrameworkCore.IDbContextFactory1[Umbraco.Cms.Persistence.EFCore.UmbracoDbContext]' while attempting to activate 'Umbraco.Cms.Persistence.EFCore.Sqlite.SqliteMigrationProvider'.) (Error while validating the service descriptor 'ServiceType: Umbraco.Cms.Infrastructure.Migrations.IEFCoreMigrationExecutor Lifetime: Singleton ImplementationType: Umbraco.Cms.Persistence.EFCore.EfCoreMigrationExecutor': Unable to resolve service for type 'Microsoft.EntityFrameworkCore.IDbContextFactory1[Umbraco.Cms.Persistence.EFCore.UmbracoDbContext]' while attempting to activate 'Umbraco.Cms.Persistence.EFCore.SqlServer.SqlServerMigrationProvider'.) (Error while validating the service descriptor 'ServiceType: Umbraco.Cms.Core.Events.INotificationAsyncHandler1[Umbraco.Cms.Infrastructure.Migrations.Notifications.DatabaseSchemaAndDataCreatedNotification] Lifetime: Transient ImplementationType: Umbraco.Cms.Persistence.EFCore.Composition.EFCoreCreateTablesNotificationHandler': Unable to resolve service for type 'Microsoft.EntityFrameworkCore.IDbContextFactory1[Umbraco.Cms.Persistence.EFCore.UmbracoDbContext]' while attempting to activate 'Umbraco.Cms.Persistence.EFCore.SqlServer.SqlServerMigrationProvider'.) (Error while validating the service descriptor 'ServiceType: Umbraco.Cms.Core.Events.INotificationAsyncHandler1[Umbraco.Cms.Core.Notifications.UnattendedInstallNotification] Lifetime: Transient ImplementationType: Umbraco.Cms.Persistence.EFCore.Composition.EFCoreCreateTablesNotificationHandler': Unable to resolve service for type 'Microsoft.EntityFrameworkCore.IDbContextFactory`1[Umbraco.Cms.Persistence.EFCore.UmbracoDbContext]' while attempting to activate 'Umbraco.Cms.Persistence.EFCore.SqlServer.SqlServerMigrationProvider'.) Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection

  • Mark Jarvis 5 posts 116 karma points
    Aug 13, 2023 @ 04:19
    Mark Jarvis
    100

    I ran into this issue as well after upgrading from 12.0.1 to the 12.1.0. I was able to resolve the issue by updating the services builder in Startup.cs adding DeliveryApi to the services as follows:

    public void ConfigureServices(IServiceCollection services)
        {
            services.AddUmbraco(_env, _config)
                .AddBackOffice()
                .AddWebsite()
                .AddDeliveryApi()
                .AddComposers()
                .Build();
        }
    

    Once you update the file start your project, the site will be in maintenance mode. Login to the backoffice and it will ask to update the database. Have it perform the update, restart the application and you should be back in business.

    Hope that helps!

  • Amigo 243 posts 568 karma points
    Aug 13, 2023 @ 10:37
    Amigo
    0

    Cool, will try that ;-)

  • Lucas Bisgaard 19 posts 128 karma points c-trib
    Aug 13, 2023 @ 19:25
    Lucas Bisgaard
    1

    Hello Amigo,

    Umbraco are on it https://github.com/umbraco/Umbraco-CMS/issues/14658 here is also a temp, fix for the issue :)

Please Sign in or register to post replies

Write your reply to:

Draft