AddAutoMapper not found in .NET Core with AutoMapper

8.1k Views Asked by At

Using Visual Studio 2019 I installed AutoMapper version 8.1.0 via NuGet. When I try to add the services.AddAutoMapper() call though in my Startup.cs file I get a compiler error that the method doesn't exist.

I've already tried to do a dotnet clean and dotnet restore from the NuGet console but that didn't help.

1

There are 1 best solutions below

0
payam ardeshirzad On

It is an old thread, however the solution for this problem is to install Automapper.Extensions.Microsoft.DependencyInjection package along with your automapper package. I hope it helps.