If you have used Visual Studio to write Windows Mobile applications, you might have come across the following error message when you press F5 to start the debugger:
Although the error message seems intuitive, the root cause is far from clear. In order to understand the root cause, it's important to remember that when you press F5 to debug a Windows Mobile application, three things happen:
- The project is built
- The application is deployed to the device
- The application is started on the device
Each of the steps above is a separate stage and can be configured independently. The reason for the error message above is that the step to deploy the application to the device, i.e. step #2 above did not happen. The most common reason for this is that the option to deploy the application to the device is turned off in the Configuration Manager.
To check whether this is the case, open the Configuration Manager (Build -> Configuration Manager...). In the Configuration Manager, verify that the Deploy option for the device project is enabled.