Reputation: 4416
It seems that all binary files (.dll and .exe) defined in a WIX file inherit their version and language from the Product
element. All other files (.ps1, .txt, etc) don't inherit the version and don't get replaced on upgrade. I need to be able to version non-binary files, so they can be overwritten on upgrade. Once I set DefaultVersion on the file element, everything works fine and file gets replaced on upgrade.
<Component Id="Eula.txt" Guid="14285C13-A70C-474B-B2AE-06F68D4E170B">
<File Id="Eula.txt" DiskId="1" Name="Eula.txt" Source="$(var.NeutralBinRoot)\" DefaultVersion="$(var.MsiProductVersion)"/>
</Component>
However, I get this warning during compilation:
warning LGHT1103 : The DefaultVersion '1.1.1' was used for file 'Eula.txt' which has no version. No entry for this file will be placed in the MsiFileHash table. For unversioned files, specifying a version that is different from the actual file may result in unexpected versioning behavior during a repair or while patching. Version the resource to eliminate this warning.
What is a proper way to version non-binary resources?
Upvotes: 1
Views: 811
Reputation: 6647
According to the docs it looks like you need to use the CompanionFile attribute and link it back to the original assembly. I haven't used this myself so can't say 100% whether it'll work but worth a punt!
Upvotes: 1