12

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.

Gargoyle
  • 9,590
  • 16
  • 80
  • 145

1 Answers1

30

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.

Simas Joneliunas
  • 2,890
  • 20
  • 28
  • 35