I'm trying to run exe which is created with Visual C++ 2008 Express in another PC and I get this message:
This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
In project properties I've changed Framework to .NET Framework 2.0 (because target PC has it), and using MFC in static library. Still the same problem, maybe someone can help me?
If you have the Express edition, you don't have MFC, so I am surprised that you even mention it. Also surprised that you mention .Net. Are you programming C++/CLI?
With those out of the way, I remind you that this problem can be solved by statically linking to the CRT or by installing the 2008 C++ runtime in the target PC.
Microsoft Visual C++ 2008 Redistributable Package
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=29
Or an appropriate version thereof for you system
I don't think installing the redistributable will solve the problem. Usually DLL failure loading give another error, not this one.
From the error message I guess is about an incorrect manifest.
It is a manifest error indeed. The manifest is saying it uses the 2008 C++ runtime, and it is most likely not there. This is the XP message, though. In Windows Vista and Windows 7 the message is a bit more clear: It will say that the side by side configuration is incorrect.
EDIT: But just to clarify, modoran may very well be right that it could be ANOTHER type of manifest misconfiguration. True 100%. I just wanted to clarify that the missing runtime appears on screen as if it were a problem with the manifest.
CodeMonkey has it right. Your compiler defaults to dynamic linking. You need static linking if you don't want to distribute the MS redist package, which means you go into Properties | C/C++ | Code Generation | Runtime Library and set it to either /MTd for a debug build (which will only run on another machine that has VS 2008 installed) or /MT for a Release build, which is what you want, but make sure you also set your project to Release at the top of VS 2008.
Once you have set this properly, press Ctrl+F7 to rebuild the entire project, and now it should run on any PC.
EDIT: You must FIRST set your project to "Release" at the top of VS 2008 BEFOREyou set your properties as I've outlined above, otherwise it won't work.