The way to use the MFC and CRT as private assemblies is well-known and you might find some postings, forums, articles or blogs that address this. However, in a lot of cases it is not possible to use the static linked versions of the libraries, such as when using MFC extension DLLs. See the article about vcredist_x86.exe for more details.Ī lot of developers therefore decided to link statically to the MFC and CRT to avoid this.
You have to install the runtime library files on the machine with the appropriate MSI merge module or installer. So, if the runtime files are not installed in the SxS storage the program can't run, even if the needed files are in the current application folder. This manifest tells the loader to pull the files from the Side by Side (SxS) storage of the current Windows system. The reason is that VC++ 8.0 binds the CRT and MFC - and ATL, if used - with a manifest to the EXE. This will work on Windows 2000, but not on Windows XP and Windows Vista. Programs that use the CRT and MFC with the shared DLL versions can't easily copy the runtime DLLs into the local application folder and run the application. This stopped suddenly with VC++ 8.0 (VS 2005).
Just copying the runtime DLLs into the target directory with the executable would allow it to run. Up until VC++ 7.1 (VS.NET 2003), it was easy to deploy programs that use either the CRT-DLLs or the MFC shared DLLs.