I’m trying to deploy a couple of third party assemblies in the GAC with WiX. Some of these assemblies are mixed assemblies. The common way of doing this seems to be setting the assembly-attribute of the corresponding file to “net”. However, doing it that way yields in an error during the installation:
Error 1938. An error occurred during the installation of assembly ...One or more modules of the assembly could not be found. HRESULT: 0x80131042. assembly interface: IAssemblyCacheItem, function : Commit, component: ... MSI (s) (A8:B0) [12:32:39:085]:.... assembly .... One or more modules of the assembly could not be found. HRESULT: 0x80131042. assembly interface: IAssemblyCacheItem, function: Commit, component:...
The instructions I got from the vendor for installing the assembly to the gac is:
- Place all the dlls (d1, d2, d3,…, dn) in the same directory.
- Run gacutil on a subset of these dlls.
If I take a “raw” look in the gac, one of the folders contents looks like this:
gac_32\d1\0.0.0.0_271E3736135E91A2\d1.dll
gac_32\d1\0.0.0.0_271E3736135E91A2\d2.dll
gac_32\d1\0.0.0.0_271E3736135E91A2\d3.dll
gacutil has found out that d2.dll an d3.dll need to be placed in the same directory as d1.dll and has automaticaly done so.
How can I do this with wix? The only way I see right now is calling gacutil as a custom action, but this does not seem like a good solution.
Thank you
Stefan
In case anyone else is struggling with this:
To install a multifile assembly that is made up of one managed assembly and one or more native or mixed dlls that are referenced by the managed assembly, create the following structure in your WixSetup:
Both unmanaged assemblies will go to the GAC-folder where the managed dll is installed to.