How to edit Windows Phone Emulator Image hosts file?

余生颓废 提交于 2019-12-01 09:11:05

问题


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

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

How can this be done?


回答1:


I Found this while preparing my environment for this purpose:

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)\Microsoft SDKs\Windows Phone\v8.0\Emulation\Images

Here you can find all the Emulator Images:

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

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

After doing so you should see 5 extra partitions

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

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

in this file we must set the mapping

yourmachineip marketplaceedgeservice.windowsphone.com

192.168.1.109 marketplaceedgeservice.windowsphone.com

Save the file and eject the first partition

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



来源:https://stackoverflow.com/questions/22919788/how-to-edit-windows-phone-emulator-image-hosts-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!