Open chrpai opened 4 months ago
Is this not expected?
If you have an ExePackage
element, but it has nothing to actually define what to execute (i.e. no ExePackagePayload, no DownloadUrl, no SourceFile) then shouldn't it throw some kind of error and not build?
I would agree that a System.InvalidOperationException: Nullable object must have a value.
error message is not ideal, and it probably should reference something about an "ExePackage element without a valid executable reference provided"
I would also expect a build error if you included multiple executable ExePackagePayload
elements under the ExePackage
But it does have a ExePackagePayload which does download and install.
Create a bootstrapper with the following fragment. It will build. Remove the ExePackagePayload element and it will fail.
Your repro says when you remove the ExePackagePayload, the build fails.
Ah! I'm sorry, I meant to write remove the version attribute.
Definitely shouldn't crash...
WiX Version
5.0.0
.NET or MSBuild or Visual Studio Version
VS 17.10.3
HeatWave Version
1.0.4
Windows Version
Win 11 23H2
Repro Repo
None
Repro Steps
Create a bootstrapper with the following fragment. It will build. Remove the ExePackagePayload element's Version attribute and it will fail.
Actual Result
Severity Code Description Project File Line Suppression State Error (active) WIX0001 System.InvalidOperationException: Nullable object must have a value. REDACTEDBundle C:\GitHub\WindowsInstaller\Installer\REDACTEDBundle\wix.exe 1
Expected Result
according to https://wixtoolset.org/docs/schema/wxs/exepackagepayload/ the Version must not be speciied when the Hash is not specified. I expected it to build.
Acknowledgements