Couldnot load type 'Volo.Abp.Authorization.Permissions.IPermissionStateManager' from assembly 'Volo.Abp.Authorization.Abstractions,Version=4.4.2.0,

478 views Asked by At
System.Reflection.TargetInvocationException
  HResult=0x80131604
  Message=Exception has been thrown by the target of an invocation.
  Source=System.Private.CoreLib
  StackTrace:
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.Extensions.DependencyInjection.ServiceCollectionCommonExtensions.BuildServiceProviderFromFactory(IServiceCollection services)
   at Volo.Abp.AbpApplicationWithInternalServiceProvider.CreateServiceProvider()
   at Volo.Abp.AbpApplicationWithInternalServiceProvider.Initialize()
   at Synchronization.Program.Main(String[] args) in .....Synchronization\Program.cs:line 72

Inner Exception 1:
**TypeLoadException: Could not load type 'Volo.Abp.Authorization.Permissions.IPermissionStateManager' from assembly 'Volo.Abp.Authorization.Abstractions, Version=4.4.2.0, Culture=neutral, PublicKeyToken=null'.**

I am trying to invoke my Domain service from the console application. Below is my code

using(
var application = AbpApplicationFactory.Create<SecurityDomainModule>
                (options => options.UseAutofac()))
        {
            application.Initialize();
        }

and my securitydomainModule has the code relaed to permission managemnet module and it has dependencies to below modules.

 [DependsOn(
        typeof(AbpDddDomainModule),
        typeof(SecurityDomainSharedModule),
        typeof(AbpUsersDomainModule),
        typeof(AbpUsersDomainSharedModule),
        typeof(AbpAuthorizationModule),
        typeof(AbpIdentityEntityFrameworkCoreModule),
        typeof(AbpPermissionManagementApplicationContractsModule),
        typeof(AbpPermissionManagementDomainModule),
        typeof(AbpPermissionManagementDomainSharedModule),
        typeof(AbpPermissionManagementDomainIdentityModule),
        typeof(AbpPermissionManagementApplicationContractsModule),
        typeof(AbpPermissionManagementEntityFrameworkCoreModule)
)]

    public class SecurityDomainModule : AbpModule
    {..

Why I am getting this typeload exception error and what I need to do to resolve this?

0

There are 0 answers