When I add Octopack to my WiX bootstrap project I get the following error message during build:
OctoPack.targets (41): The “GetAssemblyVersionInfo” task failed unexpectedly.
System.BadImageFormatException: Could not load file or assembly ‘Setup.exe’ or one of its dependencies. The module was expected to contain an assembly manifest.
File name: ‘Setup.exe’ —> System.BadImageFormatException: Could not load file or assembly ‘Setup.exe’ or one of its dependencies. The module was expected to contain an assembly manifest.
The error seems to stem from OctoPack.Tasks.GetAssemblyVersionInfo.CreateTaskItemFromFileVersionInfo which is calling:
var currentAssemblyName = AssemblyName.GetAssemblyName(info.FileName);
The AssemblyName.GetAssemblyName(string) method, as I understand it, only works for .NET assemblies and throws the previously mentioned error when called on my bootstrap Setup.exe.
Any help would be very much appreciated.