Mapping Com Object: Missing type map configuration or unsupported mapping.
See original GitHub issueI try to map a Interop Com Object to a .Net Object and getting a exception:
Missing type map configuration or unsupported mapping.
Mapping types:
ProjectTimeRecord -> TimeRecord
ComTimeRecording.ProjectTimeRecord -> AutoMapperTest.TimeRecord
Destination path:
TimeRecord
Source value:
System.__ComObject
The Interop library is a private dll, I cloud not share. I write minimal code to reproduce:
class TimeRecord
{
public int Id { get; set; }
}
class Program
{
static void Main(string[] args)
{
ProjectTimeRecord projectTimeRecord = GetRecord();
Console.WriteLine(projectTimeRecord.GetType());
// Output: "System.__ComObjects"
Mapper.CreateMap<ProjectTimeRecord, TimeRecord>();
// Exception in next line
TimeRecord record = Mapper.Map<ProjectTimeRecord, TimeRecord>(projectTimeRecord);
Console.WriteLine(record.Id);
}
}
I use VS2015 RC, .NET 4.6 RC and AutoMapper 4.0.0-ci1061. On StackOverflow is a question with the same exception
Issue Analytics
- State:
- Created 8 years ago
- Comments:17 (10 by maintainers)
Top Results From Across the Web
Automapper missing type map configuration or ...
If the configuration isn't registered before calling the Map method, you will receive Missing type map configuration or unsupported mapping.
Read more >Missing type map configuration or unsupported mapping
Hello guys, in this video we will learn about how to solve error Missing type map configuration or unsupported mapping in asp.net mvc....
Read more >Missing type map configuration or unsupported mapping #30
The '**Missing type map configuration or unsupported mapping.' Is from automapper that changed a default settings, see their breaking changes.
Read more >Missing type map configuration or unsupported mapping.
Hello everyone! I have a Nop version 3.50 that run just fine at my VS local, but after I deploy the solution to...
Read more >Missing type map configuration or unsupported mapping
I am getting this error "Missing type map configuration or unsupported mapping" after every time my app restarts.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here’s an implementation for AutoMapper 6: https://gist.github.com/kbkk/437d92af4f3fc72ee9040f633d0ce988
This will output ApplicationClass, not __ComObject. And the mapping will work.