Automapper issue
See original GitHub issueStartup.cs(36,22): error CS1061: 'IServiceCollection' does not contain a definition for 'AddAutoMapper' and no accessible extension method 'AddAutoMapper' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?)
Resolved by placing using Automapper;
at the top of Startup.cs file
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:16 (10 by maintainers)
Top Results From Across the Web
Issues · AutoMapper/AutoMapper
A convention-based object-object mapper in .NET. . Contribute to AutoMapper/AutoMapper development by creating an account on GitHub.
Read more >Is using automapper bad? : r/csharp
I use Mapster and do not use AutoMapper. Same problem poster above alludes to exists with both - it creates runtime-only dependencies. Much...
Read more >c# - .Net Core Automapper: Problems with Mapping
I am getting an error using Automapper. When I call map I am getting an error. It is explained in the next classes:...
Read more >AutoMapper considered harmful | anthonysteele.github.io
But these are side issues to the main objections. Mapping code is not worth abstracting. If your AutoMapper mappings are trivial, why not...
Read more >AutoMapper considered harmful
AutoMapper considered harmful · Poor code navigation experience · Refactoring issues · Domain Driven Development · Mapping validation · To summarize.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@subhanisyed17 - I had the same problem until I added AutoMapper.Extensions.Microsoft.DependencyInjection Nuget package.
https://www.nuget.org/packages/AutoMapper.Extensions.Microsoft.DependencyInjection/
@Sunboy005 Thanks! This was the trick for me in my Blazor WASM project. I had both AutoMapper and AutoMapper.Extensions.Microsoft.DependencyInjection. I removed the AutoMapper package and everything worked.