WiX: register .NET COM component both x86 x64

六月ゝ 毕业季﹏ 提交于 2019-12-04 07:24:36

Try the regasm.exe switches /x86 and /x64.

You also have 32-bit and 64-bit versions of regasm.exe , one in C:\windows\microsoft .net\<version>\Framework and another in Framework64, see if that helps.

Install two copies of the file, one each under ProgramFiles64Folder and ProgramFilesFolder. Wastes .5MiB, but is simple.

I succeeded registering the same dll on a 64 Bit System for x86 and 64bit by playing around with two Components, one for the 64bit and one for the x86 Registration:

<Component Id="NETDLL.dll" Directory="INSTALLDIR" Guid="*">
   <Class Id="{78BE...}" Context="InprocServer32" Description="NETDLL"  
        ThreadingModel="both" ForeignServer="mscoree.dll">
      <ProgId Id="NETDLL" Description="NETDLL" />
   </Class>
   <File Id="NETDLL.dll" Name="NETDLL.dll" KeyPath="yes" 
          Source="..\NETDLL.dll" />
   <RegistryValue Root="HKCR" Key="CLSID\{78BE...}\Implemented Categories {62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Value="" Type="string" Action="write" />
   ...
</Component>
<Component Id="NETDLLWin64.dll" Guid="{885F75B1-3046-42BD-8B37-F8FA0E8D7A51}" Win64="yes" Directory="INSTALLDIR">
   <Class Id="{78BE...}" Context="InprocServer32" Description="NETDLL" ThreadingModel="both" ForeignServer="mscoree.dll">
      <ProgId Id="NETDLL" Description="NETDLL" />
   </Class>
   <RegistryValue Root="HKCR" Key="CLSID\{78BE...}\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Value="" Type="string" Action="write" />  
   ...
</Component>

I added Guid-Attributes in the Component Node, changed the Id for the second Component and added the Win64="yes" Attribut. Also I don't duplicate the File. Hope this helps, if you have a lot of dependencies and won't duplicate the Files.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!