Context: Visual Studio 2008, with a Pocket PC 2003 project ported from eVC4. When attempting to run from the IDE, this error message appears:
Unable to start program 'MyProgram.exe'.
An error occurred that usually indicates a corrupt installation (code 0x8007007e). If the problem persists, repair your Visual Studio installation via 'Add or Remove Programs' in Control Panel.
Reason for Error: Project is dynamically linked to MFC, but the neccessary dll files are not deployed to the Emulator.
Solution: Create a new project for Windows Mobile 5.0 in Visual Studio 2008. Look at the setting: "Additional Files" which is in "Configuration Properties Deployment". Copy the value from the new default project into the old project that doesn't work.
Here's the settings for release mode:
msvcr90.dll$(BINDIR)\$(INSTRUCTIONSET)\%CSIDL_PROGRAM_FILES%\$(ProjectName)0;atl90.dll$(BINDIR)\$(INSTRUCTIONSET)\%CSIDL_PROGRAM_FILES%\$(ProjectName)0;MFC90U.dll$(BINDIR)\$(INSTRUCTIONSET)\%CSIDL_PROGRAM_FILES%\$(ProjectName)0;
And the settings for debug mode:
msvcr90.dll$(BINDIR)\$(INSTRUCTIONSET)\%CSIDL_PROGRAM_FILES%\$(ProjectName)0;atl90.dll$(BINDIR)\$(INSTRUCTIONSET)\%CSIDL_PROGRAM_FILES%\$(ProjectName)0;msvcr90d.dll$(BINDIR)\$(INSTRUCTIONSET)\%CSIDL_PROGRAM_FILES%\$(ProjectName)0;MFC90UD.dll$(BINDIR)\$(INSTRUCTIONSET)\%CSIDL_PROGRAM_FILES%\$(ProjectName)0;