Share via

Geolocation error on Windows 7

Phunction 301 Reputation points
2022-06-17T15:36:52.747+00:00

I am hoping someone has and hint for me. I have an app that uses windows geolocation service, works fine on Windows 10/11 but I am trying to get it to work on Windows 7.
The error I get is:
could not find windows type windows.devices.geolocation.geolocator
system.platformnotsupportedexception: operation is not supported on this platform

From what I can find, windows 7 should support that class so not sure why it says it cannot be found?
My project has the references to System.Runtime.dll, System.Runtime.WindowsRuntime.dll and System.Runtime.InteropServices.WindowsRuntime.dll

Developer technologies | Windows Forms
Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments

1 answer

Sort by: Most helpful
  1. Ken Tucker 5,866 Reputation points
    2022-06-18T10:33:39.503+00:00

    Sorry but this class is not supported on windows 7. It was introduced for the windows 10 uwp projects

    https://learn.microsoft.com/en-us/uwp/api/Windows.Devices.Geolocation.Geolocator?view=winrt-22621

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.