Applocal deployment of MFC localized resource DLLs

It was pointed out to me that it is not clear from Docs how to redistribute MFC localized DLLs with MFC application in application local folder. Again while doc team is updating docs, I have put together a quick sample.

 

If you have MFC application MyApplication.exe and you are going to redistribute VC++ libraries in application local folder per described in MSDN example, you may already now that you need to copy Microsoft.VC80.CRT and Microsoft.VC80.MFC folder from %VCINSTALLDIR%\redist\ into application local folder. On a target computer folder structure looks similar to the following:

 

\bin\

            myApplication.exe

            \Microsoft.VC80.CRT

\Microsoft.VC80.MFC

 

Now if you need to use MFC localized DLLs, you need to copy Microsoft.VC80.MFCLOC from %VCINSTALLDIR%\redist\ as a sub-folder of \Microsoft.VC80.MFC. In other words, new folder structure of your application on the target computer looks like,

 

\bin\

            myApplication.exe

            \Microsoft.VC80.CRT

\Microsoft.VC80.MFC

            \Microsoft.VC80.MFCLOC

 

In this way MFC localized strings are going to load just fine at runtime. 

Note:

Unfortunately, due to a bug in VS2005 (late regression that was identify to late to be fixed for RTM), you need to change version number in \ Microsoft.VC80.MFCLOC\Microsoft.VC80.MFCLOC.manifest from version="8.0.50727.42" to version= "8.0.50608.0". Otherwise OS loader refuses to load MFCLOC dlls. If you use MSMs or vcredist to redistribute MFCLOC assemblies, no action is need.