What dll is needed for Windows.Devices.Geolocation

2019-07-11 02:37发布

问题:

I am trying to write a WCF application which will store current tablet's location to a local database. I can see that Microsoft has an API for querying current location. But I couldn't find any MSDN article specifying which dll's to add to my project in order to use the Windows.Devices.Geolocation namespace.

Here's the GitHub example provided from Microsoft, but I can't run it because it requires Visual Studio 2015. My company does not allow migration to VS 2015, so I am still stuck with VS 2013.

Could any one please explain how I can create a WCF project using VS 2013 and query current geo location of a tablet?

Thanks

回答1:

From the article about Launch a Universal App from a WPF App, we can add references to Windows Runtime dll's manually by browsing to .NET folder: C:\Windows\Microsoft.NET\Framework\v4.0.30319

I am able to add using statements after adding references to System.Runtime.dll, System.Runtime.WindowsRuntime.dll, and most importantly, System.Runtime.InteropServices.WindowsRuntime.dll