I created a complete Visual Studio 2010 solution that can reproduce the issue here:
http://dl.dropbox.com/u/42317133/WcfRiaAutoMapper.zip
The problem exists during the mapping in the InsertPost method in BlogService.cs in the "RIAServicesLibrary1.Web" project.
If I comment those two lines out, then it works as expected.
Any ideas?
This happens with both AutoMapper 1.1 and AutoMapper 2.0.0
Thank you very much.
This is re-post of the issue submitted here:
https://github.com/AutoMapper/AutoMapper/issues/165
I was finally able to resolve this by using the UseDestinationValue member option as follows:
Mapper.CreateMap<Post2, Post>().ForMember(destinationMember => destinationMember.Author, memberOptions => memberOptions.UseDestinationValue());