Problem Description:
When the computer installs both VS2008 and VS2008 SP1, the manifest file of the compiled Visual C + + program will default to the MFC version and the CRT version of VS2008. As follows:
<dependency>
<dependentAssembly>
<assemblyidentity type= ' Win32 ' Name= ' Microsoft.VC90.CRT ' version= ' 9.0.21022.8 ' processorarchitecture= ' x86 ' publickeytoken= ' 1fc8b3b9a1e18e3b '/>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyidentity type= ' Win32 ' Name= ' Microsoft.VC90.MFC ' version= ' 9.0.21022.8 ' processorarchitecture= ' x86 ' publickeytoken= ' 1fc8b3b9a1e18e3b '/>
</dependentAssembly>
</dependency>
Description This program needs to refer to the MFC library and runtime Library with version number 9.0.21022.8.
However, the program may compile with reference to the MFC library and runtime Library of VS2008 SP1, whose version number is: 9.0.30729.6161.
(Specific to the installation version on the computer, release version path: C:\Program Files (x86) \microsoft Visual Studio 9.0\vc\redist\x86)
So when the program is running it actually relies on the 9.0.30729.6161 MFC library, but it looks for the 9.0.21022.8 version of the MFC library. If the program uses the 9.0.21022.8 version of the MFC library does not have the functionality. will be an error.
Workaround:
Because the VC + + Application Runtime search library file by default, the first search for the C-disk library files, and then search the local folder of the MFC library. Therefore, the following solutions are required:
Method 1: Add a macro to the header file that starts the project so that it can only use the 9.0.30729.6161 MFC library. (This method is not recommended since Microsoft's subsequent updates may cause bugs.)
Method 2: Run the directory copy 9.0.30729.6161 version of the MFC library locally on the application, but change its manifest version to 9.0.21022.8; that is: C:\Program Files (x86) \microsoft Visual The Microsoft.VC90.MFC and Microsoft.VC90.CRT folders under the Studio 9.0\vc\redist\x86 directory (specifically referenced by the program) are copied to the application directory. Then change the version number in the manifest file to 9.0.21022.8.
Run Error: The application cannot start because the parallel configuration is incorrect. The application have failed to start because their side-by-side configuration is incorrect solution