Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

CrossDeviceInfo.Current not working for me in UWP

$
0
0

Hi,
I have been using CrossDeviceInfo.Current.Platform and CrossDeviceInfo.Current.Idiom successfully with Droid and iOS. Now I have added an UWP project and they are throwing an exception.
While stepping through in debug mode, when I set a watch on CrossDeviceInfo.Current.Platform it tells me
CrossDeviceInfo.Current.Idiom error CS0103: The name 'CrossDeviceInfo' does not exist in the current context

and the exception it throws starts with:

Exception: Element not found. (Exception from HRESULT: 0x80070490) -> System.Exception: Element not found. (Exception from HRESULT: 0x80070490) at SharedLibrary!<BaseAddress>+0x80587d

Any ideas on how to fix this are appreciated!


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>