Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pardahlman/automapper-repro
A repro app for an issue with AutoMapper 13.0.1
https://github.com/pardahlman/automapper-repro
Last synced: about 4 hours ago
JSON representation
A repro app for an issue with AutoMapper 13.0.1
- Host: GitHub
- URL: https://github.com/pardahlman/automapper-repro
- Owner: pardahlman
- Created: 2024-10-21T11:49:12.000Z (30 days ago)
- Default Branch: main
- Last Pushed: 2024-10-21T12:14:32.000Z (30 days ago)
- Last Synced: 2024-10-21T17:51:09.528Z (30 days ago)
- Language: C#
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Repro app for AutoMapper issue
This repository showcases [an issue with the latest version of AutoMapper](https://github.com/AutoMapper/AutoMapper/issues/4504) (13.0.1). `AssertConfigurationIsValid` does not detect that mapping for concrete type of mapped object's property is missing if an interface that property type is implementing has registered mapping.
To verify run repro app
Console output
```
The MapperConfiguration is valid
Unhandled exception. AutoMapper.AutoMapperMappingException: Error mapping types.Mapping types:
SourceRoot -> DestinationRoot
SourceRoot -> DestinationRootType Map configuration:
SourceRoot -> DestinationRoot
SourceRoot -> DestinationRootDestination Member:
Property---> AutoMapper.AutoMapperMappingException: Cannot create interface IDestinationProperty
Mapping types:
ISourceProperty -> IDestinationProperty
ISourceProperty -> IDestinationPropertyType Map configuration:
ISourceProperty -> IDestinationProperty
ISourceProperty -> IDestinationProperty
at lambda_method1(Closure, Object, DestinationRoot, ResolutionContext)
--- End of inner exception stack trace ---
at lambda_method1(Closure, Object, DestinationRoot, ResolutionContext)
```If line 8 is not commented out:
```
The MapperConfiguration is valid
Successfully mapped source
```