Win10开发笔记(一):一些VS2015中可能遇到的问题

Win10开发者交流群:53078485

 

一.VS2015部署Win10程序到手机出现“0x80073CFD”错误解决方案

在VS2015 RC中创建了Windows Universal程序,部署到手机时发生以下异常导致程序无法部署:

Error: DEP0001 : Unexpected Error: A Prerequisite for an install could not be satisfied. (Exception from HRESULT: 0x80073CFD)

 

解决方案:

在 Package.appxmanifest, 更改 TargetDeviceFamily:

<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.1.0" MaxVersionTested="10.0.1.0" />

MaxVersionTested 值可以适当调到比你当前版本再高一个版本,MinVersion设置10.0.1.0,再部署即可。

 

二.Enable Developer Mode for windows 10无法开启开发模式的解决方案

在VS2015 RC新创建程序时提示“Enable Developer Mode for windows 10”,而进入系统设置页面,只要点击了“For developers” 后,即会闪退(此窗口会自动关闭)。

系统版本信息为(Windows 10 Pro Insider Preview Build 10074):

 

解决方案:

通过修改组策略(Group Policy)来开启开发模式

  1. 打开CMD命令.
  2. 运行 Gpedit.msc.
  3. 前 往 Local Computer Policy > Computer Configuration > Administrative Templates > Windows Components > App Package Deployment
  4. 将下面的选项修改为enable:
  • Allow all trusted apps to install
  • Allows development of Windows Store apps and installing them from an integrated development environment (IDE)

      5.重启电脑

 

三、Windows Universal(Win10)中无法调用HardwareButtons后退键的解决方法

在 做Windows Universal开发的时候,发现很多Windows Phone 8.1的api不能调用了,包括获取手机后退键的 HardwareButtons、客户端设备信息EasClientDeviceInformation等,只需要在VS2015中添 加 Microsoft Mobile Extension SDK for Universal App Platform 引用即可,方法如下图:

 

 

1.在项目中右键添加引用

 

 

2.在Windows Universal选项卡中选择拓展,选择Microsoft Mobile Extension SDK for Universal App Platform,确定即可

 

Win10开发者交流群:53078485

 

posted @ 2015-07-01 10:26  Clever-he  阅读(4900)  评论(0编辑  收藏  举报