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

Phill Hogland phill.hogland at rimage.com
Wed Jul 20 15:44:36 PDT 2016

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?

More information about the wix-devs mailing list