哪个DLL有Windows.Devices.Gelocation命名空间? [英] Which DLL has the Windows.Devices.Gelocation namespace?

查看:324
本文介绍了哪个DLL有Windows.Devices.Gelocation命名空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用VS 2012,我需要编写使用类的命名空间Windows.Devices.Gelocation代码。我下载的示例程序,但因为它需要VS 2013年。而对于类的文档并不表示它的DLL名称空间是它不会在VS2012加载。

I'm using VS 2012 and I need to write code that uses the classes in the Windows.Devices.Gelocation namespace. I downloaded the sample program but it won't load in VS2012 as it requires VS 2013. And the documentation for the class does not indicate which DLL that namespace is in.

有人能告诉我哪DLL包含命名空间?它是可以在.NET 4或做我必须使用.NET 4.5?

Can someone tell me which DLL contains that namespace? Is it available in .NET 4 or do I have to use .NET 4.5?

修改

我的项目是在后台运行为Windows服务的控制台应用程序。我已经做了搜索表明,我必须使用参考管理器的Windows选项卡以适用于Windows 8。但没有Windows选项卡中的参考经理在我的项目,因为它不是一个Windows Store应用程序。是否有使用这个API从桌面应用程序???办法

My project is a console application which runs in the background as a Windows service. The searching I've done indicates that I have to target Windows 8 by using the Reference Manager's Windows Tab. But there is no Windows tab in the Reference Manager in my project because it's not a Windows Store application. Is there a way to use this API from a desktop application???

推荐答案

我已经找到了如何引用总成我需要的。

I've found how to reference the assembly I need.

此页面,下部分 Windows选项卡核心小组款,第三款对如何从桌面应用程序中引用所需的窗口组件的说明。要总结一下:

On this page, under the section Windows Tab, in the Core Subgroup subsection, the third paragraph gives instructions on how to reference the needed windows assemblies from desktop applications. To summarize it:


  1. 卸载将在其中添加了引用项目

  2. 编辑的.csproj的文件项目

  3. 任意位置添加下面的代码片段在.csproj的文件:

  1. Unload the project to which the reference will be added.
  2. Edit the .csproj file for the project.
  3. Add the following snippet anywhere in the .csproj file:

&NBSP;&NBSP; <&的PropertyGroup GT;

&NBSP;&NBSP;&NBSP;&NBSP; < TargetPlatformVersion> 8.0 LT; / TargetPlatformVersion>

&NBSP;&NBSP; < /的PropertyGroup方式>

   <PropertyGroup>
     <TargetPlatformVersion>8.0</TargetPlatformVersion>
   </PropertyGroup>

保存编辑的.csproj文件

  • Save the edited .csproj file.

    在这一点上,当您打开引用管理器对话框,您将看到<$ C左侧$ C>窗口设置页。单击,你会看到核心子组。右边,它会说瞄准窗口8.0和Windows版本255.255.255.255下,将取消选中。检查其关闭,然后单击确定&安培;你就大功告成了。

    At this point, when you open the Reference Manager dialog, you'll see a Windows tab on the left. Click that, and you'll see the Core subgroup. To the right, it'll say "Targeting Window 8.0" and under that "Windows version 255.255.255.255" will be unchecked. Check it off then click OK & you're done.

    这篇关于哪个DLL有Windows.Devices.Gelocation命名空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆