Sushant Rawat
Sushant Rawat

Reputation: 100

Automapper issue: Unmapped members were found after version upgrade and .Net Upgrade

I am upgrading the .Net Core Version to .Net 6.0 and while doing the same I upgraded the relevant packages including Automapper from ver 9.0 to 12.0.

But after upgrading when I run the application I get following error:

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...

Earlier it was all working fine. Things I have tried so far: I tried to add the properties in both source and destination, as I got in exception message but it just keeps looping me around and I keep adding more and more properties as properties are interdependent.

Please help me with this issue with something simple which can save both time and effort and can be a quick smart solution.

Thanks

Upvotes: 0

Views: 331

Answers (1)

brijber
brijber

Reputation: 773

I usually have a unit test to test my configuration using AssertConfigurationIsValid - that can give you more information.

https://docs.automapper.org/en/stable/Configuration-validation.html?highlight=AssertConfigurationIsValid%20

Upvotes: 1

Related Questions