First image

Hello, my name is David Shoemaker and I am one of the developers of Silverlight for Windows Embedded (SWE). In this blog entry I am going to walk you through the basic setup of the Windows Embedded Compact 7 CTP and getting your first SWE enabled image up and running.

I assume you have Visual Studio 2008 SP1, some flavor of Virtual PC*, Blend 3 and the CTP installed. If not, go back to the previous blog entry by David Franklin and install the CTP.

*For Windows 7 you can get XP Mode and Virtual PC from


Open Visual Studio (if this is the first time you have run VS with PB installed there will be some configuration dialogs about default settings).


  1. File -> New -> Project (I named mine Blog1)
  2. Project type = Platform Builder 2008
  3. Click the OK button which brings up the CE OS design wizard.
  4. [Next]
  5. BSP select the Virtual PC : x86 [Next]
  6. Design template = PDA Device -> Enterprise Web Pad [Next]
  7. Applications / Media (no changes) [Next]
  8. Network communications (no changes) [Next]
  9. OS Design Project Wizard Complete (Don't select "Build the following configuration after I click Finish") [Finish]
  10. Acknowledge any security warnings or license dialogs that come up.

You should now be in VS with the solution open. We didn't just build at the end of the wizard because we want to add a couple of things to the image before we build.

Select the Catalog Items View tab (if not visible you can use View -> Other Windows -> Catalog Items View).

Enter "Silverlight for Windows Embedded" into the search box and click the search button. This will bring you to the SWE options in the catalog. Open that and select the SWE checkbox. This brings in the SWE component for later use.

We are going to bring the xamlperf sample into the image to give us some instant gratification. As this sample is not in the catalog we need to add the sysgen flag manually.

  1. In VS select the solution explorer tab (Or Ctrl+Alt+L), right click on the project name (in my case the Blog1 name) and select properties.
  2. Configuration properties -> Environment
  3. New…
  4. Variable name = SYSGEN_SAMPLEXAMLPERF
  5. Value = 1
  6. Apply
  7. OK

To verify everything is set as expected you can do:

  1. Build -> Open Release Directory in Build Window.
  2. Set Sysgen [Enter]
  3. Look at the output and verify that sysgen_xaml_runtime=1 & sysgen_samplexamlperf=1 are set.

Now do a build. Build -> Build Solution (or F7) and wait a while. Depending on your machine this could take a while.

At the end of the build you will get output like:

BLDDEMO: BUILDMSG: Directory of C:\WINCE700\OSDesigns\Blog1\Blog1\RelDir\VirtualPC_x86_Release

BLDDEMO: BUILDMSG: 07/09/2010 11:52 AM 40,528,451 NK.bin

BLDDEMO: BUILDMSG: 1 File(s) 40,528,451 bytes

BLDDEMO: BUILDMSG: 0 Dir(s) 293,800,824,832 bytes free

BLDDEMO: BUILDMSG: cebase build complete.

BLDDEMO: BUILDMSG: BldDemo ended at 11:52:39.73 on Fri 07/09/2010 (exit code 0)

BuildLogs: BUILDMSG: Exiting: BldDemo1.bat (result code 0).

BuildLogs: BUILDMSG: C:\WINCE700\build.log

BuildLogs: BUILDMSG: C:\WINCE700\build.out

BuildLogs: BUILDMSG: C:\WINCE700\build.wrn

Blog1 - 0 error(s), 723 warning(s)

========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========

I am using virtual PC (Win Xp mode on Windows 7) so I need to create a virtual machine to be my target device.

  1. Start -> Windows Virtual PC
  2. Create virtual machine
  3. Name (I used VPC) [Next]
  4. Memory and networking [Next]
  5. Add a virtual hard disk
    1. Use an existing virtual hard disk (navigate to where in you installed the CTP)
    2. C:\wince700\platform\virtualpc\vm\hd0_sample.vhd (this comes with the CTP)
  6. [Create]

To use this from Platform Builder you need to make a connection in VS

  1. Start the virtual machine
  2. In VS, Target -> Connectivity Options…
  3. Add Device
  4. Name (I used VPC) [Add]
  5. Kernel Download -> [Settings] (this may bring up a firewall dialog, if so "Allow Access")
  6. This brings up a dialog which should detect the "Bootme's" from the virtual machine. Select the target device that shows up (mine was named "PC-0003FF10A48F" and [Apply]
  7. [Close]
  8. This takes you back to the VS main window. In the Device: Drop down on the toolbar select the connection you just made (VPC in my case).

We are now ready to download our first image.

  1. You will probably have to restart your VM as the bootme's have run out (only sends a fixed number before giving up).
  2. Then on the device toolbar press connect (the play symbol next to the dropdown).
  3. The Device Status window should appear and show the image downloading.
  4. Once that has finished the output window should show some debug spew about the boot process and then finally the VPC window should appear with your image loaded.

This has three samples (brought in by the SYSGEN_SAMPLEXAMLPERF sysgen).

Double Click Bounce, Bubbles or Carousel to see the samples in action. Clicking in the running app will close it.

We now have an image up and running which allows you to try out SWE applications.