Reputation: 1
I am creating an installer using WiX which contains few dlls. In the original script first gacutil.exe and then regasm for each dll is called. I am having a problem when transfering this idea into WiX. Here is the code fragment for installing into GAC :
<Component Id="GMAG.Core.Serialization.dll" Directory="_2.2.8.0" Guid="{my_guid}">
<File Id="my.dll" Source="my_src" Assembly=".net" KeyPath="yes" Checksum="yes"/>
</Component>
Now the question is how WiX will perform the assembly registration? My problem is:
<File Id="my.dll" Source="my_src" KeyPath="yes"/>
in the same component cause there must be only one keyPath="yes" attribute/component.<File Id="my.dll" Source="my_src"/>
without keyPath="Yes", as it generates compilation error.I know I don't need to call regasm
or regsvr32
when using heat
. In the component code :<File Id="my.dll" Source="my_src" KeyPath="yes"/>
should be enough for the registration.
I'm using heat and now I'm stuck as I have to do assembly registration also.
Upvotes: 0
Views: 2178
Reputation: 2330
That's how we register DLL in GAC via WIX 3.5:
<Component Id="Level0GAC" Guid="21735A8C-DD0C-4f4e-8AB5-B5BB8C55726B" DiskId='1'>
<File Id='Level0' Name='DLLFileName.dll' DiskId='1' KeyPath="yes"
Source='DLLFileName.dll'
Checksum="yes" Assembly=".net" AssemblyManifest="Level0">
</File>
</Component>
Indeed, there can be only one file inside a Component with a KeyPath set ot "yes", that's why for several DLLs you should create several Components.
Upvotes: 0
Reputation: 2727
Assembly=".net" will put you assembly in the GAC, you will then need registry keys for the COM registration. If you run Heat against your assembly it should generate the code fragment you require.
Upvotes: 0