public class AutoMapperConfig { public static MapperConfiguration mapperConfiguration = new MapperConfiguration(cfg => { cfg.AddProfile(new MappingProfile()); cfg.ShouldMapProperty = pi => !pi.Name.InList( "HiddenSwitch","ErrorMessage","SuccessMessage", "WarningMessage","DuplicateForm"); // this is the line I added }); public static IMapper Mapper; public static void Configure() { Mapper = mapperConfiguration.CreateMapper(); mapperConfiguration.AssertConfigurationIsValid(); // This line I added } }But I still got these properties listed as unmapped.