Identityserver4.admin: upgrade to ids 2.5 version and automapper 8.1.1 crash

Created on 13 Jul 2019  路  5Comments  路  Source: skoruba/IdentityServer4.Admin

when i open the url http://localhost:9000/Configuration/Clients
and throw an unhandled exception
it is automapper 8.1.1 version problem

MissingMethodException: Method not found: 'AutoMapper.IMappingExpression2<!0,!1> AutoMapper.IMappingExpression2.ConstructUsing(System.Linq.Expressions.Expression1<System.Func2>)'.
Skoruba.IdentityServer4.Admin.BusinessLogic.Mappers.ClientMapperProfile..ctor()

TargetInvocationException: Exception has been thrown by the target of an invocation.
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, bool publicOnly, bool wrapExceptions, ref bool canBeCached, ref RuntimeMethodHandleInternal ctor)

TypeInitializationException: The type initializer for 'Skoruba.IdentityServer4.Admin.BusinessLogic.Mappers.ClientMappers' threw an exception.
Skoruba.IdentityServer4.Admin.BusinessLogic.Mappers.ClientMappers.ToModel(PagedList clients)

TargetInvocationException: Exception has been thrown by the target of an invocation.
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, bool publicOnly, bool wrapExceptions, ref bool canBeCached, ref RuntimeMethodHandleInternal ctor)
System.RuntimeType.CreateInstanceSlow(bool publicOnly, bool wrapExceptions, bool skipCheckThis, bool fillCache)
System.Activator.CreateInstance()
AutoMapper.Configuration.MapperConfigurationExpression.AddProfile() in MapperConfigurationExpression.cs
AutoMapper.MapperConfiguration.Build(Action configure) in MapperConfiguration.cs
AutoMapper.MapperConfiguration..ctor(Action configure) in MapperConfiguration.cs
Skoruba.IdentityServer4.Admin.BusinessLogic.Mappers.ClientMappers..cctor()

All 5 comments

How did you solve this issue?
Thanks.

Thanks 馃憤馃徏

I suppose if you upgrade ids to 2.5.0 and Automapper to 8.1.1 (this version is in the dependencies here https://www.nuget.org/packages/IdentityServer4.EntityFramework.Storage/), it should resolve the issue

Was this page helpful?
0 / 5 - 0 ratings