{"action":"created","issue":{"url":"https://api.github.com/repos/StackExchange/Dapper/issues/424","repository_url":"https://api.github.com/repos/StackExchange/Dapper","labels_url":"https://api.github.com/repos/StackExchange/Dapper/issues/424/labels{/name}","comments_url":"https://api.github.com/repos/StackExchange/Dapper/issues/424/comments","events_url":"https://api.github.com/repos/StackExchange/Dapper/issues/424/events","html_url":"https://github.com/StackExchange/Dapper/issues/424","id":123042599,"node_id":"MDU6SXNzdWUxMjMwNDI1OTk=","number":424,"title":"TypeLoadException on mono 4.2.1","user":{"login":"sklose","id":546088,"node_id":"MDQ6VXNlcjU0NjA4OA==","avatar_url":"https://avatars0.githubusercontent.com/u/546088?v=4","gravatar_id":"","url":"https://api.github.com/users/sklose","html_url":"https://github.com/sklose","followers_url":"https://api.github.com/users/sklose/followers","following_url":"https://api.github.com/users/sklose/following{/other_user}","gists_url":"https://api.github.com/users/sklose/gists{/gist_id}","starred_url":"https://api.github.com/users/sklose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sklose/subscriptions","organizations_url":"https://api.github.com/users/sklose/orgs","repos_url":"https://api.github.com/users/sklose/repos","events_url":"https://api.github.com/users/sklose/events{/privacy}","received_events_url":"https://api.github.com/users/sklose/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2015-12-18T23:20:35Z","updated_at":"2018-08-03T07:09:33Z","closed_at":"2015-12-19T10:18:51Z","author_association":"NONE","body":"I am getting this exception when I try to use Dapper on mono\n\n```\nSystem.TypeInitializationException: The type initializer for 'Dapper.SqlMapper' threw an exception. \n---> System.TypeLoadException: Failed for unknown reasons.\n```\n\nLooking at the type initializer code of SqlMapper and the mono documentation, it seems that \n\n```\nAddTypeHandlerImpl(typeof(IEnumerable<Microsoft.SqlServer.Server.SqlDataRecord>), new SqlDataRecordHandler(), false);\n```\n\nis the culprit - Microsoft.SqlServer.Server.SqlDataRecord is listed nowhere in the mono docs, I guess it isn't implemented.\n"},"comment":{"url":"https://api.github.com/repos/StackExchange/Dapper/issues/comments/410165616","html_url":"https://github.com/StackExchange/Dapper/issues/424#issuecomment-410165616","issue_url":"https://api.github.com/repos/StackExchange/Dapper/issues/424","id":410165616,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDE2NTYxNg==","user":{"login":"NilufarMakhmudova","id":10311342,"node_id":"MDQ6VXNlcjEwMzExMzQy","avatar_url":"https://avatars2.githubusercontent.com/u/10311342?v=4","gravatar_id":"","url":"https://api.github.com/users/NilufarMakhmudova","html_url":"https://github.com/NilufarMakhmudova","followers_url":"https://api.github.com/users/NilufarMakhmudova/followers","following_url":"https://api.github.com/users/NilufarMakhmudova/following{/other_user}","gists_url":"https://api.github.com/users/NilufarMakhmudova/gists{/gist_id}","starred_url":"https://api.github.com/users/NilufarMakhmudova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NilufarMakhmudova/subscriptions","organizations_url":"https://api.github.com/users/NilufarMakhmudova/orgs","repos_url":"https://api.github.com/users/NilufarMakhmudova/repos","events_url":"https://api.github.com/users/NilufarMakhmudova/events{/privacy}","received_events_url":"https://api.github.com/users/NilufarMakhmudova/received_events","type":"User","site_admin":false},"created_at":"2018-08-03T07:09:33Z","updated_at":"2018-08-03T07:09:33Z","author_association":"NONE","body":"@mgravell, we are experiencing a similar problem with our Xamarin Android solution with SQLite database, where Dapper 1.50.5 NuGet package is installed.\r\n System.TypeInitializationException: The type initializer for 'Dapper.SqlMapper' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object.\r\n at Dapper.SqlMapper.AddTypeHandlerImpl (System.Type type, Dapper.SqlMapper+ITypeHandler handler, System.Boolean clone)\r\n at Dapper.SqlMapper.ResetTypeHandlers (System.Boolean clone)\r\n at Dapper.SqlMapper..cctor () \r\n\r\nAre there any clues on how to fix it?"}}
{"actor":{"display_login":"NilufarMakhmudova"}}