Installing into the GAC with WiX 3.0

Posted by Jeff Yates on Stack Overflow See other posts from Stack Overflow or by Jeff Yates
Published on 2009-09-01T14:14:27Z Indexed on 2010/04/27 17:03 UTC
Read the original article Hit count: 1058

Filed under:
|
|
|

I have a DLL that I would like to install into the Global Assembly Cache so that it can be referenced from multiple locations. I have a File declaration with the Assembly attribute set to ".net" but when the installation tries to install the DLL into the GAC, I get the following error (I have tided it up a bit to make it more readable):

MSI (s) (58:38) [19:14:31:031]: Product: MyProductName 1.01
-- Error 1935. An error occurred during the installation of assembly
 'Compass,
  version="1.0.0.0",
  culture="neutral",
  publicKeyToken="392B26B760D48103",
  processorArchitecture="MSIL"'.
Please refer to Help and Support for more information. HRESULT: 0x80131043. assembly interface:
      IAssemblyCacheItem, function:
            Commit, component: {53AEE63B-F356-4D4F-8D61-EB0640A6E160}

I have hunted around to find out what this means and the error relates to FUSION_E_UNEXPECTED_MODULE_FOUND. This link also includes this information:

/// When installing multi-file assemblies into the GAC, the hash of each module is 
/// checked against the hash of that file stored in the manifest. If the
/// hash of one of the files in the multi-file assembly does not match what is recorded 
/// in the manifest, FUSION_E_UNEXPECTED_MODULE_FOUND will be returned. 

/// The name of the error, and the text description of it, are somewhat confusing. 
/// The reason this error code is described this way is that the internally, 
/// Fusion/CLR implements installation of assemblies in the GAC, by installing 
/// multiple "streams" that are individually committed. 
/// Each stream has its hash computed, and all the hashes found 
/// are compared against the hashes in the manifest, at the end of the installation. 
/// Hence, a file hash mismatch appears as if an "unexpected" module was found. 

Unfortunately, this doesn't make much sense to me and I don't see how it relates to my assembly, which isn't fancy or complex from my perspective (it's just a regular .NET 3.5 class library and the current installation test is occurring on my development machine, which is a valid target environment for my project - 32-bit Windows XP SP3).

Can anyone shed some light on why I might be getting this error and how I might hope to fix it?

© Stack Overflow or respective owner

Related posts about wix

Related posts about gac