0

Project works fine in ASP.NET Core 6.0 but when I tried to migrate it to 7.0, it builds successfully without errors but at runtime I got this error:

Message "GenericArguments[0], 'AbilityFix.Model.Models.Forums', on 'T MaxIntegerT' violates the constraint of type 'T'." string

  • InnerException  {"Method System.Linq.Enumerable.MaxInteger: type argument 'AbilityFix.Model.Models.Forums' violates the constraint of type parameter 'T'."} 
    

System.Exception {System.Security.VerificationException}

Error in startup.cs file

 services.AddAutoMapper(mapperConfig => mapperConfig.AddProfiles(GetType().Assembly)); 

enter image description here

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
User
  • 1,334
  • 5
  • 29
  • 61

0 Answers0