Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeLib cannot be repeated for both 32-bit and 64-bit components #5562

Closed
mikekaganski opened this issue Apr 14, 2017 · 1 comment
Closed

Comments

@mikekaganski
Copy link

I am trying to install and register both 32-bit and 64-bit COM object in a 64-bit MSI. I try to do the following:

      <?if $(sys.BUILDARCH) = x64?>
      <?define Win64 = "yes"?>
      <?define InstallFolder = "InstallFolder64"?>
      <?define dll = "file_x64.dll"?>
      <?include TypeLib.wxi?>
      <?undef Win64?>
      <?undef InstallFolder?>
      <?undef dll?>
      <?endif?>
      <?define Win64 = "no"?>
      <?define InstallFolder = "InstallFolder"?>
      <?define dll = "file.dll"?>
      <?include TypeLib.wxi?>

and TypeLib.wxi looks like this:

<Include>
  <Component Win64="$(var.Win64)" Directory="$(var.InstallFolder)">
    <File Name="$(var.dll)" KeyPath="yes">
      <TypeLib Id="{PUT-GUID-HERE}" Description="My Type Library v.0.1" HelpDirectory="$(var.InstallFolder)" Language="0" MajorVersion="0" MinorVersion="1">
        <Interface Id="{PUT-GUID-HERE}" Name="IMyInterface" ProxyStubClassId32="{PUT-GUID-HERE}" />
        <Interface Id="{PUT-GUID-HERE}" Name="IMyInterface2" ProxyStubClassId32="{PUT-GUID-HERE}" />
        <Interface Id="{PUT-GUID-HERE}" Name="IMyInterface3" ProxyStubClassId32="{PUT-GUID-HERE}" />
        <Class Id="{PUT-GUID-HERE}" Advertise="no" Context="InprocServer32" Description="My Important Class" Programmable="yes" Server="$(var.dll)" ThreadingModel="apartment">
          <ProgId Id="My.Important.1" Advertise="no"/>
          <ProgId Id="My.Important.2" Advertise="no"/>
          <ProgId Id="My.Important.3" Advertise="no">
            <ProgId Id="My.Important" Advertise="no"/>
          </ProgId>
        </Class>
      </TypeLib>
    </File>
  </Component>
</Include>

So, the code should create components for both 32- and 64-bit DLLs, and their respective registry records. But that doesn't happen; instead, for 64-bit build, it emits

TypeLib.wxi(5,0): error LGHT0130: The primary key 'regMANYMANYSYMBOLS' is duplicated in table 'Registry'. Please remove one of the entries or rename a part of the primary key to avoid the collision.

It seems that the names of the registry items created do not depend on the component bitness.
Wix version 3.11 RC2, project version 3.

@barnson
Copy link
Member

barnson commented Sep 14, 2020

Not an issue in WiX v4 due to id-gen changes.

@barnson barnson closed this as completed Sep 14, 2020
@rseanhall rseanhall modified the milestones: v4.0, v3.x Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants