Description
If I override all the methods F# complains about I get
System.TypeLoadException: 'Return type in method 'Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlDiscriminatedUnionEnumTypeMappingSource.FindMapping(System.Type)' on type 'Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlDiscriminatedUnionEnumTypeMappingSource' from assembly 'NpgsqlDiscriminatedUnionEnumTypeMappingSourceRepro, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not compatible with base type method 'Microsoft.EntityFrameworkCore.Storage.RelationalTypeMappingSource.FindMapping(System.Type)'.'
Repro steps
NpgsqlDiscriminatedUnionEnumTypeMappingSourceRepro.zip
- Extract the attached sample
- Run
- See exception
- Try removing lines 71-79 from
NpgsqlDiscriminatedUnionEnumTypeMapping.fs
- See that the compiler complaints about protected members
Expected behavior
Lines 71-79 in NpgsqlDiscriminatedUnionEnumTypeMapping.fs
are not required and the file successfully builds
Actual behavior
F# complaints about not implemented methods that are actually implemented
Known workarounds
No
Related information
- .NET SDK 7.0.400-preview.23274.1
- Visual Studio 2022 17.7 Preview 2.0
- Visual F# Tools from @vzarytovskii OneDrive