by Bjørn Storkholm
19. December 2009 12:27
One thing I always hated about developing for mobile devices is waiting for deployment. Hit <F5> in Visual Studio... and wait for all the assemblies being copied to the device.
A workaround for this can be, to setup the device emulator’s storage card to point to the bin folder. Doing this you have instant access to the updated binaries, whenever you build. In the emulator click File -> Configure. In Shared Folder add the path to your target library.

With this, you can execute your program instantly upon a new build without waiting for deployment. But if you want to debug your code you can try to attach to process, and get an error saying Unable to attach to the process. Attach is not enabled for this process with this debug type.

You’ll need to use Visual Studio’s remote tools Windows CE Remote Registry Editor to enable remote debugging. Add the following d-word to registry and set the value to 1:
HKLM -> Software -> Microsoft -> .NetCompactFramework -> Managed Debugger -> AttachEnabled

This enables debugging on the device, but be aware it slows down the device quite a bit, so it should only be done on development devices.
Doing it this way, you build and attach, no wait for deployment. It showed to be quite a time saver for me.
Note: In general it cannot be recommended to execute programs from the storage card, it can show to be quite unstable. But for debugging purposes it’s great.