Skip to content

TypeLoadException on mono 4.2.1 #424

@sklose

Description

@sklose

I am getting this exception when I try to use Dapper on mono

System.TypeInitializationException: The type initializer for 'Dapper.SqlMapper' threw an exception. 
---> System.TypeLoadException: Failed for unknown reasons.

Looking at the type initializer code of SqlMapper and the mono documentation, it seems that

AddTypeHandlerImpl(typeof(IEnumerable<Microsoft.SqlServer.Server.SqlDataRecord>), new SqlDataRecordHandler(), false);

is the culprit - Microsoft.SqlServer.Server.SqlDataRecord is listed nowhere in the mono docs, I guess it isn't implemented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions