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
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:
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.
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.IDbContextFactory
1[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.IDbContextFactory
1[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.INotificationAsyncHandler
1[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.INotificationAsyncHandler
1[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(ICollectionI 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:
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!
Cool, will try that ;-)
Hello Amigo,
Umbraco are on it https://github.com/umbraco/Umbraco-CMS/issues/14658 here is also a temp, fix for the issue :)
is working on a reply...