Running latest nuget on throws MethodAccessException
jpasichnyk opened this issue · 5 comments
System.MethodAccessException: Method MaxMind.Db.Metadata:get_DatabaseType ()' is inaccessible from method
MaxMind.GeoIP2.DatabaseReader:Execute<MaxMind.GeoIP2.Responses.CountryResponse> (string,bool,string)
at MaxMind.GeoIP2.DatabaseReader.get_Metadata()
at MaxMind.GeoIP2.DatabaseReader.Execute[T](String ipAddress, Boolean hasTraits, String type)
at MaxMind.GeoIP2.DatabaseReader.Country(String ipAddress)
NuGet package versions installed are:
MaxMind.Db 1.0.0.0 (though dll version shows 0.2.1.0 ??)
MaxMind.GeoIP2 2.1.0.0
Thoughts?
It sounds like you are using an old version of MaxMind.Db somehow. I might try removing your copy of it, making sure the DLL is removed, and reinstalling.
Yeah, that was my first thought. I deleted the package from the packages folder, removed it from the packages config, and reinstalled it, with the same outcome... Also tried just uninstalling it from the package manager and reinstalling it. :/
If this is working for others, and its just some quirk on my end with the package manager, I'll work through it. Just wanted to inform you incase the dll in the package itself was the wrong version.
From: Gregory Oschwaldmailto:notifications@github.com
Sent: ý12/ý4/ý2014 6:54 AM
To: maxmind/GeoIP2-dotnetmailto:GeoIP2-dotnet@noreply.github.com
Cc: Jesse Pasichnykmailto:jesse@pasichnyk.net
Subject: Re: [GeoIP2-dotnet] Running latest nuget on throws MethodAccessException (#18)
It sounds like you are using an old version of MaxMind.Db somehow. I might try removing your copy of it, making sure the DLL is removed, and reinstalling.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/18#issuecomment-65642833.
This is the first report of the issue. I double checked the version of the DLL in the NuGet package and it does appear to be 1.0.0 as expected. If you are using the 0.2.1 DLL for some reason, that error makes sense as previously the metadata's access level was internal.
Ok, it must be some cached copy that somehow keeps making it into the build. I'll clean things out, restart visual studio, etc... and see if it resolves.
Ok, I found the issue. I had pointed to an external copy of the dll in the past when i had some threading issues that you guys resolved with a hotfix. The nuget package update wasn't overwriting it. I updated to the package reference and it looks good now. Sorry for the false alarm.