Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Program Built on Win7 won't run on WinXP

I have a project that I'm building on Windows 7 (32-bit) using Visual Studio 2005. The program builds fine, and I can move it to another Windows 7 machine and run it just fine. The problem comes when I try to move it to a Windows XP Pro machine. When I try to run the file, I get the following error:

"This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem."

When I open the event viewer, there are three system errors related to this issue:

  • Dependent Assembly Microsoft.VC80.CRT could not be found and Last Error was The referenced assembly is not installed on your system.
  • Resolve Partial Assembly failed for Microsoft.VC80.CRT. Reference error message: The referenced assembly is not installed on your system.
  • Generate Activation Context failed for [path to my exe]. Reference error message: The operation completed successfully.

I've tried installing the Visual C++ 2005 SP1 Redistributable Package, which doesn't help.

If I build the project on an XP computer, I'm able to run it on another XP computer (that doesn't have the C++ redistributable) and a Windows 7 computer.

Always building on the XP isn't a viable option since I'm not the only person who will be building this and everyone else will be using Win7.

like image 740
MaddHatter Avatar asked Nov 27 '22 19:11

MaddHatter


1 Answers

Check the missing system DLLs with Dependency Walker if it's a native binary - http://www.dependencywalker.com/

Also check that you have needed WINVER - http://msdn.microsoft.com/en-us/library/aa383745%28v=vs.85%29.aspx otherwise the SDK falls back to SDK version, which is Vista+ for newer versions. Therefore you might accidentally call a few functions that are not even available on XP.

like image 73
Coder Avatar answered Nov 29 '22 08:11

Coder