I have used the following chunk of code for a long time now to get the IMEI,
Android.Telephony.TelephonyManager tMgr = (Android.Telephony.TelephonyManager)Application.Context.GetSystemService(Android.Content.Context.TelephonyService);
string imei = tMgr.Imei;
My target has been Android 7.1.
It has worked, right up until I upgraded to the latest version of Visual Studio 2017 (15.9.1). Now I get "TelephonyManager does not contain a definition for 'Imei'......"
Funny thing is, if I target Oreo, it works. I have tried targeting different versions, and anything below 8.0 gives me this error message. I'm also missing Meid, NetworkSpecifier, DataEnabled and ServiceState.
If I go back to another dev system that still has an older version of Visual Studio 2017 installed it builds fine on 7.1.
Anyone have any ideas what's going on?