Base solution for your next web application
Open Closed

Same issue as for the "Call ABPServices from Console App #9510" #10011


User avatar
0
PangeaGS created

Prerequisites

  • Angular
  • .Net Core

If issue related with ABP Framework

  • 5.14

Hello guys,

Have two questions:

  1. Could you please take a look at the Call ABPServices from Console App #9510 open issue? I have the very same question and i see no answers in the topic.
  2. Are there any steps how to correctly upgrade to the Abp Zero 6.2? I tried to update my nuget packages but there are a lot of errors in Abp Zero assemblies. examples:


5 Answer(s)
  • User Avatar
    0
    zony created
    Support Team

    Hi PangeaGS, About the question "Call ABPServices from Console App" Can you provide detailed exception information? If so, can you upload a sample project? Regarding the upgrade problem, it may be caused by a break change related to the cache. You need to read the corresponding release notes.(Timespan and DateTimeOffset)

  • User Avatar
    0
    PangeaGS created

    Here is the exception:

    Castle.MicroKernel.Handlers.HandlerException: 'Can't create component 'Abp.BackgroundJobs.BackgroundJobStore' as it has dependencies to be satisfied.

    'Abp.BackgroundJobs.BackgroundJobStore' is waiting for the following dependencies:

    • Service 'Abp.Domain.Repositories.IRepository`2[[Abp.BackgroundJobs.BackgroundJobInfo, Abp, Version=6.2.0.0, Culture=neutral, PublicKeyToken=null],[System.Int64, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]' which was not registered.'

    I have a Console application which creates an AbpBootstrapper instance and initializes it:

            using (var bootstrapper = AbpBootstrapper.Create<MyModule>())
            {
                bootstrapper.Initialize();
            }
    

    MyModule is placed in a Class Library, derived from AbpModule and depends on a DemoApplicationModule:

    [DependsOn(typeof(DemoApplicationModule))]
    public class MyModule : AbpModule
    {
        public override void PreInitialize()
        {
        }
    
        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(typeof(MyModule).GetAssembly());
        }
    }
    

    DemoApplicationModule is the module from Demo.Application project.

    This is all.

    Issues with upgrades have been fixed by downloading latest sources from the Zero customer portal.

  • User Avatar
    0
    PangeaGS created

    Guys, I mentioned two issues. Second is fixed but the First one remains unfixed. Please read carefully.

    I have updates for you. I have found that "AbpBootstrapper" works fine only if start module depends on the base "AbpEntityFrameworkCoreModule". All attempts to use higher modules like "AbpZeroCoreModule" or "DemoEntityFrameworkCore" or "DemoApplicationModule" failed with different exception messages. This means that my console app is unable to use my application infrastructure, services, not even my entity framework model.

    This is the example of exception when i try to add dependency on the "AbpZeroCoreModule":

    [DependsOn(typeof(AbpZeroCoreModule), typeof(AbpEntityFrameworkCoreModule))] public class MyConsoleModule : AbpModule

    Value cannot be null. (Parameter 'value') at Abp.Zero.Configuration.AbpZeroEntityTypes.set_Tenant(Type value) at Abp.Zero.AbpZeroCommonModule.FillMissingEntityTypes() at Abp.Zero.AbpZeroCommonModule.Initialize() at Abp.Modules.AbpModuleManager.<>c.<StartModules>b__15_1(AbpModuleInfo module) at System.Collections.Generic.List1.ForEach(Action1 action) at Abp.Modules.AbpModuleManager.StartModules() at Abp.AbpBootstrapper.Initialize() at Pangea.Hub.Api.Grpc.Server.Console.Program.CreateHostBuilder(String[] args) in D:\Projects\A_Pangea\Sources\PangeaHub\Hub\Pangea.Hub.Api.Grpc.Server.Console\Program.cs:line 24

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    You need to depend on both YourProjectNameEntityFrameworkCoreModule and YourProjectNameApplicationModule. Could you try in that way ?

    Thanks,

  • User Avatar
    0
    PangeaGS created

    Question is solved. Approach with both dependent modules works fine.

    Thank you.