View Full Version : Redistributable bug

07-17-2012, 02:09 PM
I have discovered what appears to be a rather ghastly problem:

We are distributing an MFC-based 32-bit program that has about 50 DLLs. One of them is an interface to third-party driver code. The third-party code is .NET based, so the DLL links to CLR but just wraps the managed code. (We don't distribute .NET with the package because this file is only used if the third-party code is present, and their installer puts it on the system.)

We recently moved to Visual Studio 2010 and InstallShield 2012 Spring. We added the new redistributables for the Microsoft C run-time 10, x86 version.

InstallShield 2012 Spring by default scans for .NET properties. When it does so it notices that CLR is linked, and somehow comes to the conclusion that it needs the x64 version of the C run time libraries (I'm building on a 64-bit system; might be relevant). It automatically adds the x64 version to the distribution, even though we're already added the x86 version.

It merges both versions into the installer. You will note that the X64 and x86 versions of the file has the same name. When the installer runs, if it needs to install the x86 version into SYSWOW64, it grabs the x64 version instead! So now the SxS configuration is messed up with 64-bit versions of msvcr100.dll and msvcp100.dll, and the application doesn't run. This will also mess up other programs installed later that need the same files. Not good!

We have a workaround (turn off .NET scan for that one DLL) but this really should be fixed so it can't happen.