We recently needed to update one of our in-house applications that used Mappoint 2006 control within it.
We had started using Visual Studio 2010 – it would build but we could not install it on Windows 7.
The problem was that VS2010 expects all applications to be DEP (Data Execution Prevention) compatible and Mappoint 2006 is not DEP compatible. So although it built it ok the resulting executable would not install on DEP aware operating systems.
We were already committed to VS2010 and could not go back to older versions. We could have upgraded to the latest Mappoint (2010) but that was ruled out due to licensing costs.
In the end we found we had to add some commands to the post build events of the project that turned off DEP for the built executable:
editbin.exe /NXCOMPAT:NO “$(ProjectDir)binrelease$(TargetFileName)”
editbin.exe /NXCOMPAT:NO “$(ProjectDir)objrelease$(TargetFileName)”
We found this worked on VS2010 on an XP machine but we had problems with other Win7 based machines. Not sure why!?