Open Closed

Unable to run DbMigrator for 7.0.0-rc.2, fresh download #4116


User avatar
0
afatima@asb.bh created
  • ABP Framework version: v7.0.0-rc.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace: Unhandled exception. Autofac.Core.DependencyResolutionException
  • Steps to reproduce the issue:"

Updated to dotnet 7, created a fresh download from abp.suite using the command please note dotnet tools (Volo.Abp.Cli), abp, and Visual Studio are updated to 7

abp new SchoolAut0mater -t microservice-pro -u angular --output-folder "$(PWD)" -csf --preview

then run the below command

.\etc\docker\up.ps1

.\etc\dev-cert\create-certificate.ps1

.\build /graphBuild

CD '\shared\SchoolAut0mater.DbMigrator' && dotnet run

got error

... ... [16:27:33 INF] Initialized all ABP modules. [16:27:33 INF] Migrating Host side... [16:27:33 INF] Migrating SaasService database... [16:27:34 INF] Migrating AdministrationService database... [16:27:34 INF] Migrating IdentityService database... [16:27:35 INF] Migrating ProductService database... Unhandled exception. Autofac.Core.DependencyResolutionException: An exception was thrown while activating Volo.Abp.Auditing.AuditingManager -> Volo.Abp.Auditing.AuditingHelper -> Volo.Abp.AuditLogging.AuditingStore -> Volo.Abp.AuditLogging.AuditLogInfoToAuditLogConverter -> Volo.Abp.AspNetCore.ExceptionHandling.DefaultExceptionToErrorInfoConverter -> Volo.Abp.Localization.AbpStringLocalizerFactory -> Volo.Abp.LanguageManagement.External.ExternalLocalizationStore. ---> Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(Microsoft.Extensions.Options.IOptions1[Volo.Abp.Localization.AbpLocalizationOptions], Volo.Abp.LanguageManagement.External.ILocalizationResourceRecordRepository, Volo.Abp.LanguageManagement.External.IExternalLocalizationStoreCache)' on type 'ExternalLocalizationStore'. ---> System.MissingMethodException: Method not found: 'Volo.Abp.Localization.LocalizationResource Volo.Abp.Localization.LocalizationResourceExtensions.AddBaseTypes(Volo.Abp.Localization.LocalizationResource, System.Type[])'. at SchoolAut0mater.ProductService.ProductServiceDomainSharedModule.<>c.<ConfigureServices>b__1_1(AbpLocalizationOptions options) at Microsoft.Extensions.Options.ConfigureNamedOptions1.Configure(String name, TOptions options) at Microsoft.Extensions.Options.OptionsFactory1.Create(String name) at Microsoft.Extensions.Options.UnnamedOptionsManager1.get_Value() at Volo.Abp.LanguageManagement.External.ExternalLocalizationStore..ctor(IOptions1 localizationOptions, ILocalizationResourceRecordRepository localizationResourceRecordRepository, IExternalLocalizationStoreCache cache) at lambda_method55(Closure, Object[]) at Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate() --- End of inner exception stack trace --- at Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate() at Autofac.Core.Activators.Reflection.ReflectionActivator.<>c__DisplayClass12_0.<UseSingleConstructorActivation>b__0(ResolveRequestContext ctxt, Action1 next) at Autofac.Core.Resolving.Middleware.DelegateMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt) at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt) at Autofac.Builder.RegistrationBuilder3.<>c__DisplayClass41_0.<PropertiesAutowired>b__0(ResolveRequestContext ctxt, Action1 next) at Autofac.Core.Resolving.Middleware.DelegateMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt) at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action1 next) --- End of inner exception stack trace --- at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt) at Autofac.Core.Pipeline.ResolvePipeline.Invoke(ResolveRequestContext ctxt) at Autofac.Core.Resolving.Middleware.RegistrationPipelineInvokeMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt) at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt) at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt) at Autofac.Core.Pipeline.ResolvePipeline.Invoke(ResolveRequestContext ctxt) at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request) at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest request) at Autofac.Core.Resolving.ResolveOperation.Execute(ResolveRequest request) at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(ResolveRequest request) at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable1 parameters, Object& instance) at Autofac.ResolutionExtensions.ResolveOptionalService(IComponentContext context, Service service, IEnumerable1 parameters) at Autofac.ResolutionExtensions.ResolveOptional(IComponentContext context, Type serviceType, IEnumerable1 parameters) at Autofac.ResolutionExtensions.ResolveOptional(IComponentContext context, Type serviceType) at Autofac.Extensions.DependencyInjection.AutofacServiceProvider.GetService(Type serviceType) at Volo.Abp.DependencyInjection.CachedServiceProviderBase.<>c__DisplayClass7_0.<GetService>b__1() at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy1.CreateValue() at Volo.Abp.DependencyInjection.CachedServiceProviderBase.GetService(Type serviceType) at Volo.Abp.DependencyInjection.AbpLazyServiceProvider.LazyGetRequiredService(Type serviceType) at Volo.Abp.DependencyInjection.AbpLazyServiceProvider.LazyGetRequiredServiceT at Volo.Abp.EntityFrameworkCore.AbpDbContext1.get_AuditingManager() at Volo.Abp.EntityFrameworkCore.AbpDbContext1.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Volo.Abp.Uow.UnitOfWork.SaveChangesAsync(CancellationToken cancellationToken) at Volo.Abp.Uow.UnitOfWork.CompleteAsync(CancellationToken cancellationToken) at SchoolAut0mater.DbMigrator.SchoolAut0materDbMigrationService.MigrateAllDatabasesAsync(Nullable`1 tenantId, CancellationToken cancellationToken) in D:\Projects\abpio\SchoolAut0materV4\SchoolAut0mater\shared\SchoolAut0mater.DbMigrator\SchoolAut0materDbMigrationService.cs:line 103 at SchoolAut0mater.DbMigrator.SchoolAut0materDbMigrationService.MigrateHostAsync(CancellationToken cancellationToken) in D:\Projects\abpio\SchoolAut0materV4\SchoolAut0mater\shared\SchoolAut0mater.DbMigrator\SchoolAut0materDbMigrationService.cs:line 55 at SchoolAut0mater.DbMigrator.SchoolAut0materDbMigrationService.MigrateAsync(CancellationToken cancellationToken) in D:\Projects\abpio\SchoolAut0materV4\SchoolAut0mater\shared\SchoolAut0mater.DbMigrator\SchoolAut0materDbMigrationService.cs:line 47 at SchoolAut0mater.DbMigrator.DbMigratorHostedService.StartAsync(CancellationToken cancellationToken) in D:\Projects\abpio\SchoolAut0materV4\SchoolAut0mater\shared\SchoolAut0mater.DbMigrator\DbMigratorHostedService.cs:line 37 at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at SchoolAut0mater.DbMigrator.Program.Main(String[] args) in D:\Projects\abpio\SchoolAut0materV4\SchoolAut0mater\shared\SchoolAut0mater.DbMigrator\Program.cs:line 36 at SchoolAut0mater.DbMigrator.Program.

(String[] args)


1 Answer(s)
  • User Avatar
    0
    afatima@asb.bh created

    Finally i was able to get the error vanish, but don't know how. below are the steps I have done.

    1. docker rm $(docker ps) && docker volume prune
    2. abp suite update --preview
    3. Using ABP suit 7.0.0-rc.2 create a fresh copy of projects
    4. .\etc\dev-cert\create-certificate.ps1
    5. open and executed .\services\identity\SchoolAut0mater.IdentityService.sln on VS 2022
    6. once it create the databse as part of first run. I have stoped the solution
    7. cd ".\etc\dev-cert" && abp clean
    8. cd .\ && abp install-libs && dotnet build /graphBuild
    9. .\etc\docker\up.ps1
    10. .\run-tye.ps1
    • Please credit back my question...
Made with ❤️ on ABP v9.1.0-preview. Updated on December 10, 2024, 06:38