Failure to install VC2005 x64 runtime using merge-modules


Recently on Windows 7 и Windows Server 2008 R2 it was reported that our product failed to install with the following error:
Failed to install Visual C++ 2005 x64 runtime from merge-module (msm)

The error message:

An error occured during the installation of assembly component
HRESULT: 0x80073715.

Verbose log (obtained with msiexec /i prod.msi /l*v msi.log) contains the following entries:

MSI (s) (E0:E0) [15:43:58:875]: Assembly Error:The identities of the manifests are identical but their contents are different.
MSI (s) (E0:E0) [15:43:58:875]: Note: 1: 1935 2:
{844EFBA7-1C24-93B2-A01F-C8B3B9A1E18E} 3: 0x80073715 4: IAssemblyCacheItem 5:
Commit 6:
MSI (s) (E0:E0) [15:43:58:875]: Assembly Error (sxs): Please look into
Component Based Servicing Log located at -121510792ndir\logs\cbs\cbs.log to get
more diagnostic information.
Error 1935. An error occured during the installation of assembly component
{844EFBA7-1C24-93B2-A01F-C8B3B9A1E18E}. HRESULT: 0x80073715. assembly
interface: IAssemblyCacheItem, function: Commit, assembly name:

Log file %winndir%\logs\cbs\cbs.log didn’t give more details, although it contains mnemonic error code: STATUS_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT. This error code means that an assembly with the same identity is already installed in the system, the versions of the installed assembly and one being installed coincide but the files differ in these assemblies.

I couldn’t reproduce the failure on the machines at hand: it installs successfully and works. After a bit of investigation I found out that the Microsoft Visual C++ 2005 x64 Runtime assembly was already installed on the machines where the error occurred.

I installed vcredist_x64.exe on one of my machines. Our product install started to fail afterwards.

I preformed a reverse experiment: on a clean machine I installed our product first, and then VC++ 2005 runtime. Installation of vcredist_x64.exe failed with the same error:
Failed to install Visual C++ 2005 x64 runtime using vcredist_x64.exe

The error message:

Product: Microsoft Visual C++ 2005 Redistributable (x64) — Error 1935.An error occurred during the installation of assembly ‘Microsoft.VC80.CRT,type=”win32″,version=”8.0.50727.4053″,publicKeyToken=”1fc8b3b9a1e18e3b”,processorArchitecture=”amd64″‘. Please refer to Help and Support for more information. HRESULT: 0x80073715. assembly interface: IAssemblyCacheItem, function: Commit, component: {844EFBA7-1C24-93B2-A01F-C8B3B9A1E18E}

I decided to compare the contents of C:\Windows\winsxs\amd64_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4053 after installing the libraries using merge-modules and using vcredist_x64.exe. The CRT assembly contains three files: msvcm80.dll, msvcp80.dll, msvcr80.dll. The versions and the sizes of these files are the same in both cases. Yet two files from the assemblies differ from each other. I found out they had different time stamp in the digital signature: The libraries in merge modules have time stamp of July 12, 2009 11 o’clock, and the libraries in vcredist_x64.exe are signed on July 12, 2009 6 o’clock:

Digital signature of msvcr80.dll from merge module Цифровая подпись msvcr80.dll из vcredist_x64.exe

On Windows XP and Windows Server 2003 this difference didn’t cause error. On newer Windows 7 and Windows Server 2008 R2 it causes installation failure.

Microsoft Connect has a description of this problem: 8.0.50727.4053 x64 CRT merge modules fails to install on x64 but ok on x86. The same message can be found on MSDN forum. This question is marked as resolved, however the answer doesn’t really resolves the issue. The message on the forum contains a link to another description of the same issue on Microsoft Connect.

Neither have I found a solution or workaround to avoid install failure.
The only thing is clear: Visual C++ 2005 x64 runtime can’t be installed on the same machine using both merge modules and vcredist_x64.exe.

The 32 bit (x86) version of this runtime installs successfully in both cases.