07-23-2023, 06:47 AM
We are using Automapper for a project, and seem to get the following error randomly:
> AutoMapper.AutoMapperConfigurationException: Unmapped members were found. Review the types and members below. Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type
The code hasn't been changed in months. I get that error, refresh and the error is gone and page works fine. I'm using
Mapper.AssertConfigurationIsValid();
not sure why it complains the mappings are not good and then a refresh and it's fine again, has anyone run into this? Debugging doesn't help as it's random, sometimes no errors and then other days it will popup somewhere on the site, come back to it and it's fine. The error also comes up on random pages, not the same page, not the same mapping.
> AutoMapper.AutoMapperConfigurationException: Unmapped members were found. Review the types and members below. Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type
The code hasn't been changed in months. I get that error, refresh and the error is gone and page works fine. I'm using
Mapper.AssertConfigurationIsValid();
not sure why it complains the mappings are not good and then a refresh and it's fine again, has anyone run into this? Debugging doesn't help as it's random, sometimes no errors and then other days it will popup somewhere on the site, come back to it and it's fine. The error also comes up on random pages, not the same page, not the same mapping.