Open mediawolf opened 7 years ago
I am having similar trouble to this issue. I am trying to put the package version into the name and url of an msipackage in my burn bundle so that different versions have unique file names. I have tried various forms of !(bind.packageVersion.$(var.PackageId)). I have tried it directly in the Name attribute. I have tried it through an intermediate preprocessor(which I get is the same). I have tried putting it into a WixVariable like so:
<WixVariable Id="PackageVersion" Value="!(bind.packageVersion.$(var.PackageId))" />
and then referencing that via !(wix.PackageVersion). Nothing seems to resolve correctly. I end up with a file that looks like this:
!(bind.packageVersion.PackageProjectName)PackageProjectName.msi.
However I know I have !(bind.packageVersion.$(var.PackageId)) correct because that works in the Bundle version attribute.
My MsiPackage has an ID as follows:
<MsiPackage Id="$(var.PackageId)"
Name="!(bind.packageVersion.$(var.PackageId))_$(var.PackageProject.TargetFileName)"
.../>
I am using Wix 3.11 Is this not supported or is there something I am missing?
WIX 3.10.3.3007
In my bundled installer, I have a fragment that defines a shared package:
Installer builds successfully but it installation fails and log contains this entry: [0F70:0808][2016-11-02T11:34:07]e000: Error 0x8007052e: Failed to open payload at path: \NetworkShare\SharedProduct.msi
BootstrapperApplicationData.xml contains this line:
I've looked at how WIX forms Name value if it's unspecified in wix3-develop\src\tools\wix\Compiler.cs: private void CreatePayloadRow(...) ... row[1] = String.IsNullOrEmpty(name) ? Path.GetFileName(sourceFile) : name ... Obviously Path.GetFileName() assumes that unexpanded !(wix.SharedProductInstallerPath) represents a file name. Workaround is to specify Name attribute explicitly which is a bit inconvenient and took time to figure out.
It would be nice if either: