How to register a dll in Wix 4? #7843
Replies: 11 comments 11 replies
-
Does your COM metadata change frequently from build to build? If not, in InstallShield I would use the right click | COM extract on the component keyfile. This scans the file one time and authors it statically. It's more reliable and faster because it's tested metadata and the build doesn't have to scan it. I personally have an aversion to anything dynamic at build time unless there's a really good reason for it. That said, if it does change frequently, A LOT of WiX users use harvesting in their build process. This is like using dynamic files in InstallShield and can scan native COM libraries and COMVisible assemblies. Check out: https://wixtoolset.org/docs/tools/heat/ About 15 years ago I did a huge migration from InstallShield to WiX for a product line that had a lot of COM. In wix v3 Heat was an EXE you could call. I wrote a simple utility that put a file system watcher on a directory and every time the directory changed it ran heat and displayed the XML in a colorized and formatted way. Sometimes Foo.dll will fail to register if Bar.dll was missing. But maybe Bar.dll wasn't COM. So you'd drop Foo.dll in the folder, then drop Bar.dll in the folder and cherry pick the Foo.dll component out and integrate it into your source. I did hundreds of DLLs this way and it worked really well. I've always meant to recreate that tool but I rarely touch COM these days to be honest. |
Beta Was this translation helpful? Give feedback.
-
FYI... I recently discovered that Heat is going away. In v3 heat.exe was installed with WiX but in v4 it's not installed when you install wix using dotnet install tool. They have greated a wixtoolsetsdk.heat (think thats the right name) that provides a way to do it via msbuild and if you really really want to use heat.exe you'll find it in your nuget package cache when you install that. I read an issue where they basically said they don't want to encourage that. I would also add that outside of WiX, FireGiant has invested in some proprietary tech that's more advanced then Heat called HeatWave. Votive was long in the tooth with lots of technical debt so when they rewrote it they kept it proprietary but released it free as HeatWave Community Edition. The writing is on the wall that there will be a paid version of HeatWave some day in the future that will probably have the advanced capabilities that you are looking for. I don't know your budget but it might be worth checking out. It sould also be noted that you could also do something like author those components as merge modules using InstallShield limited edition and then merging those modules into a WiX v4 built package. Merge modules get a bad rap but IMO (20 years worth) merge modules are fine if you control them and don't share with others or use modules provided by others. They are heavier weight then fragments and libraries but enable you to use multiple tools to accomplish things that neither tool excel at. |
Beta Was this translation helpful? Give feedback.
-
Sorry, my coffee hasn't kicked in yet. InstallShield Limited edition doesn't support authoring merge modules. But it could author a micropackage MSI that you then bundle along with your WiX MSI using Burn. Assuming you need a bootstrapper... Did I mention that I really don't miss COM? :) We used to have 50 snapshotted virual machines. They were pooled together based on various configurations so that we could get a clean reproducible build every time. These days we have ephemeral servers but to be honest I sometimes question the value as we just don't have the pain points that we had back in the day. |
Beta Was this translation helpful? Give feedback.
-
We are getting away from COM also. But it doesn't matter because we still have .NET assemblies that have to be registered. So far I've found that Heat nuget like you've wrote probably have some capability to extract such registries. But I have to give it a try first. |
Beta Was this translation helpful? Give feedback.
-
I'd ask Rob/FireGiant what tools they have outside of WiXToolset for this for sale. |
Beta Was this translation helpful? Give feedback.
-
So I am back. Now I know how to harvest a file to extract registries using HarvestFile, how to set it in my wixproj file. But I would like to build my installer from command line. Is there a way to do it? Do you know a syntax how heat can be used during build of WiX project? I am still talking about WiX v4. So far my command is: |
Beta Was this translation helpful? Give feedback.
-
.wixproj files are msbuild files. You can build them using MSBuild. Just specify the platform and configuration you want ( Release|x64) and the rest is automatic. |
Beta Was this translation helpful? Give feedback.
-
Sure, it's always been possible. If you want the latest MSBuild just install the VS Build Tools. If you want an older one it's probably on your machine already as it used to ship with .NET Framework. Search your harddrive for msbuild.exe and you are likely to find various versions of x86 and x64 bitness. |
Beta Was this translation helpful? Give feedback.
-
MSBuild all the way IMO. |
Beta Was this translation helpful? Give feedback.
-
Hello, |
Beta Was this translation helpful? Give feedback.
-
Another related question: is it possible to harvest registry entries from 64bit libraries?
Has this issue already been resolved? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
recently I've switched from InstallSgield to Wix v4. I would like to know how to register a dll (.NET and COM) the easiest way in my WiX project.
In InstallShield it was options set for component:
COM Extract at Build (for COM file)
.NET COM Interop (for .NET dll)
The extraction of registries was performed during build time.
And is there something like those options to use in WiX? I haven't found clear answer on the web.
Beta Was this translation helpful? Give feedback.
All reactions