Daniel Dyson
Daniel Dyson

Reputation: 13230

automapper cannot resolve method formember

In my AutoMapper mappings, I am getting a weird ReSharper and Intellisense error where the two properties on my class are not recognised by ReSharper. In the example below, ActiveFrom on both of my classes are not recognised. The application compiles and runs fine, but R# spits the dummy.

Mapper.CreateMap<Price, Servcies.Price>().ForMember(
       d => d.ActiveFrom, 
       o => o.MapFrom(s=> s.ActiveFrom.ToString("dd MMM yyyy")))

The problem goes away if I disable ReSharper and comes back when I re-enable it

Visual Studio 2013 Update 1

ReSharper 8.2.0.2160

AutoMapper 3.2.0

Upvotes: 2

Views: 815

Answers (1)

Daniel Dyson
Daniel Dyson

Reputation: 13230

Looks like upgrading AutoMapper to 3.2.1 fixed the issue.

No idea what the root cause was.

Upvotes: 1

Related Questions