Where is system.device.location?

Ike 6 Reputation points
2022-03-16T00:46:27.013+00:00

I am trying to use the GeoCoordinateWatcher in my WPF application. Whenever I type the using statement "using System.Device.Location" I am told it does not exist. I have read that I have to add it as a reference but when I go to the list of available references in Visual Studio I don't see it listed there. Do I have to download the dll from somewhere and then reference on my machine? I am confused.

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,788 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,054 questions
{count} vote

3 answers

Sort by: Most helpful
  1. Karen Payne MVP 35,441 Reputation points
    2022-03-16T01:27:50.877+00:00

    System.Device is for Framework 4.8, if using .net core look at https://github.com/scottschluer/geolocation

    1 person found this answer helpful.

  2. Sander van de Velde | MVP 33,231 Reputation points MVP
    2024-05-29T16:31:55.1733333+00:00

    Hello @Ike,

    welcome to this moderated Azure community forum.

    while answering this question, it seems it resembles your question.

    Did you find a solution?

    If so, please share it on the other thread. If not, perhaps you can confirm the solution proposed there.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

    0 comments No comments

  3. Bruce (SqlWork.com) 67,251 Reputation points
    2024-05-29T18:47:52.53+00:00

    the GeoCoordinateWatcher was not ported (and all planned framework porting has been completed). see issue:

    https://github.com/dotnet/runtime/issues/26666

    and from the thread a port:

    https://github.com/dotMorten/System.Device

    0 comments No comments

Your answer

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