[wix-devs] Getting assembly info using WixDistribution.ReplacePlaceholder

Phill Hogland phill.hogland at rimage.com
Wed Jul 20 17:02:15 PDT 2016

Actually  my original idea with FileProduct won't work, but I did add a static string for Publisher to WixDistribution and I can revise it if I should take a different approach.

From: wix-devs <wix-devs-bounces at lists.wixtoolset.org> on behalf of Phill Hogland <phill.hogland at rimage.com>
Sent: Wednesday, July 20, 2016 5:44:36 PM
To: WiX Toolset Developer Mailing List
Subject: [wix-devs] Getting assembly info using WixDistribution.ReplacePlaceholder

When the WixBA v4 was discussed in the #109 meeting, at least as I understood it, there was guidance to use WixDistribution to get the publisher nme (.Net Foundation) and other details.  So I noticed that the bundle's file property has a 'long' product name.  I tried to get it using WixDistribution.ReplacePlaceHolder (to see how that would look for a Title).

However when try to get the assembly with Assembly.GetEntryAssembly it always returns null.  I originally wondered if this was a cr artifact but the method docs say:

The GetEntryAssembly method can return null when a managed assembly has been loaded from an unmanaged application. For example, if an unmanaged application creates an instance of a COM component written in C#, a call to the GetEntryAssembly method from the C# component returns null, because the entry point for the process was unmanaged code rather than a managed assembly.

So I assume that since a managed BA is loaded into the native bundle this approach won't work.  Do I need to create a static string for each item that I need to use in the WixBA, and if so should I be doing this in the WixBA or the WixDistribution?

WiX Toolset Developer Mailing List provided by FireGiant http://www.firegiant.com/

More information about the wix-devs mailing list