如何编辑Windows Phone模拟器映像主机文件? [英] How to edit Windows Phone Emulator Image hosts file?

查看:130
本文介绍了如何编辑Windows Phone模拟器映像主机文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个Windows Phone应用程序,我想在我的应用程序中测试应用程序内购买功能。

I am developing a Windows Phone App and i wanted to test In-app Purchases functionality in my app.

Microsoft提供一个Web服务来测试IAP但是从os开始自动连接到Windows Phone Store,无法测试应用程序是否正确处理IAP

Microsoft Provides a webservice to test IAP but since the os automatically connects to Windows Phone Store, there's no way to test if the application is handling the IAP properly

如何做到这一点?

推荐答案

我在为此目的准备环境时发现了这个:

I Found this while preparing my environment for this purpose:

计算机中有一个文件夹你可以找到用于模拟Windows Phone的虚拟机的.vhd文件。

There is a folder in the computer where you can find the .vhd files of the Virtual Machines used to emulate Windows Phone.

C:\Program Files(x86)\ Mycoftoft SDKs \ Windows Phone \\ v8.0\Emulation\Images

C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Emulation\Images

在这里你可以找到所有的模拟器图像:

Here you can find all the Emulator Images:

删除只读从要编辑的VHD文件属性:

Remove Read Only Attribute from the VHD file you want to edit:

挂载VHD文件(只需双击文件或用资源管理器打开即可完成Windows 8或更高版本)

Mount VHD file (Windows 8 or above is done by simply double clicking the file or opening it with explorer)

这样做后你会看到5个额外的分区

After doing so you should see 5 extra partitions

其中2个分区是系统分区
您可以识别它们,因为它们有15%到40%的可用空间

2 of those partitions are system partitions you can identify them because they have between 15% and 40% free space

来自这2个分区我们关心的是包含用户文件夹的分区。
现在我们必须去以下路径:

From those 2 partitions the one we care about is the partition witch contains Users Folder. Now we must go to the following path:

YourDriveLetter:\Windows\System32\DRIVERS\ETC

YourDriveLetter:\Windows\System32\DRIVERS\ETC

在这个文件中我们必须设置映射

in this file we must set the mapping

yourmachineip marketplaceedgeservice.windowsphone.com

yourmachineip marketplaceedgeservice.windowsphone.com

192.168.1.109 marketplaceedgeservice.windowsphone.com

保存文件并弹出第一个分区

Save the file and eject the first partition

现在你完成配置Mapping
如果你没有配置你的机器使用Microsoft提供的WebService来测试IAP

Now you're done with configuring the Mapping this of course is useless if you haven't configured your machine to use the WebService provided by Microsoft to test IAP

这篇关于如何编辑Windows Phone模拟器映像主机文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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