Professional Documents
Culture Documents
1452.connecting The CE 5.0 Emulator To VS2005 - HOW To
1452.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
Page 3 of 9
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
Page 4 of 9
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
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:
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
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.
Page 9 of 9