Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use bind.FileVersion when harvesting using Heat?

Tags:

wix

wix3.8

heat

I've previously used...

<?define PRODUCTVERSION="!(bind.FileVersion.MyLibrary.dll)" ?>

... to define a version variable for use in my installers. For the first time I'm using Heat.exe to harvest the files/folders I need in my installer (which includes MyLibrary.dll) to a file called Source.wxs.

If I try to build the installer I get the following error:

Unresolved bind-time variable !(bind.FileVersion.MyLibrary.dll)

It's like the Product.wxs file where the PRODUCTVERSION is declared can't see the Source.wxs file that has the details of the MyLibrary.dll, but I know this isn't true since if I set PRODUCTVERSION="1.0.0.0" then the installer builds and all this files are installed correctly.

How can I get bind.FileVersion to 'see' MyLibrary.dll?

EDIT

I can get it to work if I use the non-human friendly File Id from Source.wxs (see below), but is this really the best solution?

  <?define PRODUCTVERSION="!(bind.fileVersion.fil023E197261ED7268770DDE64994C4A55)" ?>
like image 924
mattyB Avatar asked Dec 21 '25 23:12

mattyB


1 Answers

It is much easier just to switch SuppressUniqueIds to true, you can see this in the documentation as well. As the result you will have a file name instead of a GUID in your Id.

like image 184
derwasp Avatar answered Dec 24 '25 12:12

derwasp



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!