Visual Studio 2005 Device Emulator and Internet Connectivity


Device Emulator and Internet Connectivity


With the release of Visual Studio 2005, I have seen some confusion over how to connect the Device Emulator to the Internet. This post is an attempt to clear some of this confusion. Feedback welcome.


 


Connectivity changes from Beta2 to Final Release


The Desktop to Device Emulator connectivity story has changed quite radically between the Beta2 and the final release version of Visual Studio. Some of the default settings out of the box are different so you need to be aware of them. In the remaining part of this post I will focus only on the final version and point out where it differs from the Beta2 in a major way. 


First, if you have Beta2 of Visual Studio 2005 please remove it using the uninstall steps at http://msdn.microsoft.com/vstudio/support/uninstall/default.aspx. If you used the uninstall tool, then it has been update to remove the DMA Transport Update but do make sure to check ‘Add Remove Programs’ to make sure it is not there before you install the final release version.


The rest of the post assumes that you have installed the final version of Visual Studio 2005 and (optionally) Windows Mobile 5.0 SDK.


 


Starting the Device Emulator


There are three ways to start the Device Emulator from Visual Studio 2005



  1. From Tools->Connect To Device-><pick one emulator from the list> ->Connect
  2. From Tools->Device EmulatorManager, then right click on any emulator from the displayed list and press ‘Connect’.
  3. Create a smart device project and either press F5 or Deploy Solution. Pick a particular emulator when the dialog comes up (in case of managed projects) or from right clicking on your project name in the solution explorer, select Properties and select Deployment (in case of native projects).
  4. There is a fourth way, from command line, to start the Device Emulator that we won’t touch upon in this post.

Visual Studio 2005 running on the desktop (henceforth called ‘Desktop’) interacts with the Device Emulator over a “DMA” channel. In Beta2, the Desktop – Device Emulator interaction occurred over TCP/IP stack. Think of DMA as a direct communication between two Windows processes (Visual Studio and Device Emulator) and hence it’s much more robust and fast than going over the network stack.


 


Confirm that you have the DMA Transport as the transport between Desktop and the Device Emulator. DMA Transport is the new default in Visual Studio 2005 final version. In Beta2 the default was the TCP/IP transport. When you select the ‘Properties’ for any emulator from Tools0->Options->Device Tools->Devices, you will see “DMA Transport’ under the Transport field. Note that while this can be changed to TCP Connect Transport (if you have the Virtual Network Switch Driver installed) it is NOT RECOMMENDED.


 


Enabling Internet Connectivity From the Device Emulator


When the Device Emulator starts up it acts like a physical device that is not cradled. As such it has no Internet connectivity (the Device Emulator has no “data” plan from a carrier to get any such connectivity “over the air” J). In order to “Cradle” the Device Emulator we need to start the Device Emulator Manager (Tools->Device Emulator Manager). The Device Emulator Manager would indicate the instance of the emulator currently running with a green arrow.

DE_4

Right click on the instance of the emulator that is running (presumably only one in your case) that you want to cradle and select ‘Cradle’.

DE_5

If you have ActiveSync 4.0 installed (the developer preview is available at http://download.microsoft.com/download/c/4/5/c45f8f83-6383-43d7-840b-cb9638484e4d/setup.exe) then ActiveSync will automatically detect that a new “device” has been connected. The Device Emulator Manager and the Device Emulator can work with ActiveSync 3.8 also but Visual Studio 2005 supports ActiveSync 4.0 only. You can either create a Guest partnership or a Standard partnership with the Device Emulator. I usually just hit 'Cancel' which automatically sets up a guest partnership.


Once ActiveSync is in the “Connected” state you should have Internet connectivity from the Device Emulator. If you are on a corporate network and access external web sites via a proxy server you will be prompted to set it up. The settings used here are similar to the ones that you would use to setup your desktop IE (Tools -> Internet Options -> Connections -> LAN settings)

DE_6 DE_7 DE_8

At this point you can access the Internet, e.g. www.microsoft.com, from Pocket IE.

DE_9

You can also access the local intranet web sites from the Device Emulator.

DE_10

Enabling Internet Connectivity To the Device Emulator


This scenario is not supported out-of-the-box in Visual Studio 2005. If you need more information please let me know.


Comments (17)

  1. Nino.Mobile says:

    I’ve been asked a few times recently about&amp;nbsp;setting up Internet connectivity with the WM5.0 emulator;&amp;nbsp;…

  2. C’est vrai que poss&#233;der un SmartPhone c’est bien sympa et pratique mais en ce qui concerne le coding…

  3. Mobile apps make great consumers for a webservice. But debugging such a scenario can be hard to set up….

  4. David Kline says:

    The Visual Studio 2005 Device Emulator is a very cool tool for developing, testing and debugging Windows…

  5. Hereby I join the happy crowd running Vista RTM. So far nearly everything is running. Including Virtual

  6. This article walks the reader through the development of a Windows Mobile 5.0 application that interacts

  7. aawolf says:

    老狼的话:David Kline是.NET CF团队一位非常优秀的开发者,看到他这个系列文章已经很久了,一直没空翻译。今天用下班后的时间翻译出来,也是希望有个督促,能让这个系列文章让更多朋友认识。原文地址: http://blogs.msdn.com/davidklinems/archive/2006/07/14/666050.aspx

  8. dentria says:

    Cradling a Device Emulation (Internet Connection)

Skip to main content