Every time I get a new device I go through almost one debug cycle before I’ve had enough and decide to disable the Windows Mobile security. If you aren’t familiar with Windows Mobile security there are essentially one (for pocketpc/Windows Mobile Professional) or two levels (for smartphone/Windows Mobile Standard). In both cases, if security is enabled the device will prompt you, as in the following screenshot, to allow untrusted assemblies to run on the device. Of course, this includes a number of assemblies that are used during debugging, so a royal pain to have to click Yes for each assembly that is loaded.
The easiest way to disable this “feature” is to use the Device Security Manager that comes with Visual Studio 2008 (Tools –> Device Security Manager). So long as your device is connected via ActiveSync or Windows Mobile Device Center you should see a display similar to the next image – this shows my device with Prompt One Tier as the current setting.
Selecting “Security Off” and hitting the Deploy to Device means that I can easily debug applications without having to click Yes to those annoying prompts.