I made a ATL/MFC application using VS 2008 but its exe is not running on Win Xp or Windows 7.
My OS is Windows XP 2002 with Service Pack 3.
What could be the problem?
Doing some .net Framework Service packs doesn't seem to help much as I already checked with .net sp 2.0.

Error I get is.

The application configuration is incorrect. The application failed to start. To resolve this problem, reinstall the application.

This is usually caused by your application's manifest file, which might refer to a wrong version of the redistributable VC90.CRT/MFC/ATL dll package, or these packages may not be installed on the traget machine. If you haven't embedded your application's manifest file, then you can see a line in the manifest that looks like this: <assemblyIdentity type="win32" name="Microsoft.VC90.MFC" [B]version="9.0.30729.1"[/B] processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity> . The bold red text indicates the version of Microsoft's redistributable dll control that your app was compiled against. This may not match the version that the target system has installed, or that package may not even exist. There are several ways to fix this. See this for more information: http://msdn.microsoft.com/en-us/library/ms235624.aspx

I usually prefer distributing my applications as Shared Side-by-Side Assemblies,which is far more convenient for small apps. See this page on how to deploy apps by this method.

Hope this helped :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.