Вы находитесь на странице: 1из 9

Connecting the CE 5.0 emulator to VS2005 HOW TO?

As you probably noticed, Microsoft Visual Studio 2005 does not come de-facto with a
Windows CE 5.0 emulator!
This said, if you wish to deploy and execute Visual Studio 2005 .NET solutions against a CE
.NET 5.0 emulator
1. Download the Microsoft Windows CE 5.0 Device Emulator here and install it on your
development PC.
Then follow the below instructions:
1. Start the CE 5.0 emulator using a shortcut command similar to this one
"C:\Program Files\Windows CE 5.0 Emulator\Emulator_500.exe" nk.cem /video
240x320x16 /Ethernet virtualswitch /sharedfolder "C:\tmp\CE5SharedFolder"

Where the shared folder appears on the emulator as \My Device\Storage Card.
Browse this page for additional information about the Emulator Command-Line Launch
Options
2. Copy the files located on the PC at \Program Files\Common Files\Microsoft
Shared\CoreCon\1.0\Target\wce400\x86 to the shared folder

Page 1 of 9

Page 2 of 9

3. Now using the emulator copy these files from the \Storage Card folder to the \Windows
folder

4. Double-click the ConmanClient2 file to execute it

Page 3 of 9

5. Double-click the emulator network system tray icon

to get the emulator IP address:

6. To check the emulator is responding, try pinging it from your PC

E.g.
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\>ping 192.168.0.109
Pinging 192.168.0.109 with 32 bytes of data:
Reply
Reply
Reply
Reply

from
from
from
from

192.168.0.109:
192.168.0.109:
192.168.0.109:
192.168.0.109:

bytes=32
bytes=32
bytes=32
bytes=32

time=23ms TTL=128
time<1ms TTL=128
time<1ms TTL=128
time<1ms TTL=128

Ping statistics for 192.168.0.109:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 23ms, Average = 5ms
C:\>

7. Shut down the emulator using the "Save State" option

Page 4 of 9

8. Navigate to the PC \My Documents\My Virtual Machines folder

The saved state is in the folder that is named with a curly brackets string similar to
{641834F7-7BD7-4A7B-B2CE-D11A2C48E93E}
9. Restart the CE 5.0 emulator from its saved state by adding the virtual machine ID switch to
the command. For example:
"C:\Program Files\Windows CE 5.0 Emulator\Emulator_500.exe" nk.cem /video
240x320x16 /Ethernet virtualswitch /sharedfolder "C:\tmp\CE5SharedFolder"

/vmid {641834F7-7BD7-4A7B-B2CE-D11A2C48E93E}

10. If not already loaded, open your Visual Studio 2005 CE .NET 5.0 smart device project
11. Select the Visual Studio 2005 Options option from the Tools menu
Expand the Device Tools section and select the Devices option

Page 5 of 9

12. Select the Windows CE 5.0 Device and click Properties

13. Click Configure select Use specific IP address and key-in the emulator IP address
U

14. Click OK three times to save the settings and close the dialog boxes.
15. In the emulator, click Start Run, key-in \Windows\cMaccept and hit OK.

Page 6 of 9

From that on, you have about three minutes to connect to the emulator from Visual Studio
2005.
16. Select the Visual Studio 2005 Connect to Device option from the Tools menu.
Set Platform to Windows CE 5.0 and Devices to Windows CE 5.0 Device:

Then click Connect.


Visual Studio 2005 should shortly notify you as follows:

Page 7 of 9

If not,
- turn the emulator off (do not use the Save state option)
- delete the newly created emulator saved stated folder
E.g. \My Documents\My Virtual Machines\{641834F7-7BD7-4A7B-B2CE-D11A2C48E93E}
- repeat this exercise from step 1
17.

You can now deploy and execute your CE 5.0 smart device application against the CE 5.0
emulator.
For example:
- If not already done, set the Target Device to Windows CE 5.0 Device

- Optionally, press CTRL+W, O to bring up Visual Studio 2005 Output


- Press CTRL+F5 to deploy and run the application against the emulator

Page 8 of 9

Now if you take a look at the output window you will notice that Visual Studio 2005 deployed
the two cab files NETCFV2.wce5.x86.cab and System_SR_enu.cab along with your
application.
------ Build started: Project: DeviceApplication1, Configuration: Debug Any CPU -----DeviceApplication1 ->
C:\tmp\DeviceApplication1\DeviceApplication1\bin\Debug\DeviceApplication1.exe
------ Deploy started: Project: DeviceApplication1, Configuration: Debug Any CPU ----Deploying 'C:\Program
Files\Microsoft.NET\SDK\CompactFramework\v2.0\windowsce\wce500\x86\NETCFV2.wce5.x86.ca
b'
Deploying
'C:\tmp\DeviceApplication1\DeviceApplication1\bin\Debug\DeviceApplication1.exe'
Deploying 'C:\Program
Files\Microsoft.NET\SDK\CompactFramework\v2.0\windowsce\diagnostics\System_SR_enu.cab'
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========

18. When done, close your application then shut down the emulator using the Save state option.

Notes: You will need to re-run cMaccept each time you restart the emulator or VS2005, but the
cab files should not need to deploy again, and the emulator ip address should remain the
same.

--- End ---

Page 9 of 9

Вам также может понравиться