Skip to content

WorkflowCore.Persistence.PostgreSQL doesn't allow to use AutoMapper #415

@kirsanium

Description

@kirsanium

Stack trace:

System.Reflection.ReflectionTypeLoadException : Unable to load one or more of the requested types.
Could not load type 'Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames' from assembly 'Microsoft.EntityFrameworkCore.Relational, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.RuntimeAssembly.get_DefinedTypes()
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.ToArray()
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at AutoMapper.Configuration.MapperConfigurationExpression.AddMapsCore(IEnumerable`1 assembliesToScan) in C:\projects\automapper\src\AutoMapper\Configuration\MapperConfigurationExpression.cs:line 81
   at DP.Smev.UnitTests.Services.Rpf.Pension.Handlers.RpfResponseJsonExtractorTests.<>c.<.ctor>b__4_0(IMapperConfigurationExpression cfg) in C:\Users\nkirsanov\DigitalProfile\smev\test\DP.Smev.UnitTests\Services\Rpf\Pension\Handlers\RpfResponseJsonConstructorTests.cs:line 27
   at AutoMapper.MapperConfiguration.Build(Action`1 configure) in C:\projects\automapper\src\AutoMapper\MapperConfiguration.cs:line 288
   at AutoMapper.MapperConfiguration..ctor(Action`1 configure) in C:\projects\automapper\src\AutoMapper\MapperConfiguration.cs:line 60
   at DP.Smev.UnitTests.Services.Rpf.Pension.Handlers.RpfResponseJsonExtractorTests..ctor() in C:\Users\nkirsanov\DigitalProfile\smev\test\DP.Smev.UnitTests\Services\Rpf\Pension\Handlers\RpfResponseJsonConstructorTests.cs:line 26

The reason to this is the package depends on Npgsql.EntityFrameworkCore.PostgreSQL.Design, which depends on Microsoft.EntityFrameworkCore.Relational.Design which, according to this issue and my own little experiments, is the source of the problem for AutoMapper.

Proposal for solution: get rid of this dependency which tries to use some deprecated code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions