Вот конкретное исключение, с которым я столкнулся:
Код: Выделить всё
System.ArgumentException: GenericArguments[0], 'System.Char', on 'T MaxFloat[T](System.Collections.Generic.IEnumerable`1[T])' violates the constraint of type 'T'.
---> System.Security.VerificationException: Method System.Linq.Enumerable.MaxFloat: type argument 'System.Char' violates the constraint of type parameter 'T'.
at System.RuntimeMethodHandle.GetStubIfNeeded(RuntimeMethodHandleInternal method, RuntimeType declaringType, RuntimeType[] methodInstantiation)
at System.Reflection.RuntimeMethodInfo.MakeGenericMethod(Type[] methodInstantiation)
--- End of inner exception stack trace ---
at System.RuntimeType.ValidateGenericArguments(MemberInfo definition, RuntimeType[] genericArguments, Exception e)
at System.Reflection.RuntimeMethodInfo.MakeGenericMethod(Type[] methodInstantiation)
at AutoMapper.TypeDetails.c__DisplayClass30_1.b__10(MethodInfo extensionMethod)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Linq.Enumerable.ConcatIterator`1.MoveNext()
at System.Linq.Enumerable.SelectManyIterator[TSource,TCollection,TResult](IEnumerable`1 source, Func`2 collectionSelector, Func`3 resultSelector)+MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Collections.Generic.HashSet`1.UnionWith(IEnumerable`1 other)
at System.Linq.Enumerable.UnionIterator`1.FillSet()
at System.Linq.Enumerable.UnionIterator`1.ToArray()
at AutoMapper.TypeDetails.BuildPublicNoArgExtensionMethods(IEnumerable`1 sourceExtensionMethodSearch)
at AutoMapper.TypeDetails..ctor(Type type, ProfileMap config)
at AutoMapper.ProfileMap.TypeDetailsFactory(Type type)
at AutoMapper.Internal.LockingConcurrentDictionary`2.c__DisplayClass2_1.b__1()
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at AutoMapper.Internal.LockingConcurrentDictionary`2.GetOrAdd(TKey key)
at AutoMapper.ProfileMap.CreateTypeDetails(Type type)
at AutoMapper.TypeMapFactory.CreateTypeMap(Type sourceType, Type destinationType, ProfileMap options, Boolean isReverseMap)
at AutoMapper.ProfileMap.BuildTypeMap(IConfigurationProvider configurationProvider, ITypeMapConfiguration config)
at AutoMapper.ProfileMap.Register(IConfigurationProvider configurationProvider)
at AutoMapper.MapperConfiguration.Seal()
at AutoMapper.MapperConfiguration..ctor(MapperConfigurationExpression configurationExpression)
at AutoMapper.MapperConfiguration..ctor(Action`1 configure)
at IdentityServer4.EntityFramework.Mappers.IdentityResourceMappers..cctor()
Может ли кто-нибудь предоставить информацию о что может быть причиной этого исключения и как его устранить? Будем очень признательны за любую помощь.
В целях устранения неполадок я попробовал заполнить все свойства IdentityResource, но это не решило проблему.
Подробнее здесь: https://stackoverflow.com/questions/786 ... sql-server