I have been trying to create a automapper Custom value resolvers, but I seem to have missed some set up step as it can never seem to find
public abstract class ValueResolver<TSource, TDestination> : IValueResolver
So in the following snippet will not compile.
using DITest.Models; // This is where the SalesOrder class is
using AutoMapper;
namespace DITest.AutoMapper.SaleOrder
{
public class FullAddress : ValueResolver<SalesOrder, string>
{
protected override string ResolveCore(SalesOrder source)
{
return "foo bar";
}
}
}
I get the error message
The type or namespace name 'ValueResolver<,>' could not be found (are you missing a using directive or an assembly reference?)
Its say the using AutoMapper is not used.
In the past I have been naughty and hacked in a reference for lib\net45\AutoMapper.dll