-
-
Notifications
You must be signed in to change notification settings - Fork 25
wix.exe : error WIX0001: System.NullReferenceException at HarvestPackage #7347
Description
Bugs
-
Which version of WiX are you building with?
4.0.0-rc.4 -
Which version of Visual Studio are you building with (if any)?
Visual Studio 2022 17.5.3 -
Which version of the WiX Toolset Visual Studio Extension are you building with (if any)?
N/A -
Which version of .NET are you building with?
.net 6.0 -
If the problem occurs when installing your packages built with WiX, what is the version of Windows the package is running on?
N/A -
Describe the problem and the steps to reproduce it.
Trying to build a bundle with an MsiPackage causes a NullReferenceException.
Bundle.wxs (minimized to reproduce the issue):
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
<Bundle
Name="Name"
Version="1.0.0.0"
Manufacturer="Manufacturer"
UpgradeCode="828AA222-7292-412E-A266-A26FAD74C490">
<BootstrapperApplication>
<bal:WixStandardBootstrapperApplication
Theme="hyperlinkSidebarLicense"
LicenseUrl=""
SuppressOptionsUI="yes"
ShowVersion="yes" />
</BootstrapperApplication>
<Chain>
<MsiPackage
Id="MsiPackage1"
DisplayName="DisplayName"
Vital="yes"
Permanent="yes"
DownloadUrl="http://localhost/download.msi" />
</Chain>
</Bundle>
</Wix>
Command:
.\4.0.0-rc.4\tools\net6.0\any\wix.exe build -ext 4.0.0-rc.4\wixext4\WixToolset.Bal.wixext.dll Bundle.wxs
Produces:
wix.exe : error WIX0001: System.NullReferenceException: Object reference not set to an instance of an object.
at WixToolset.Core.Burn.Bundles.ProcessMsiPackageCommand.HarvestPackage() in D:\a\wix4\wix4\src\wix\WixToolset.Core.Burn\Bundles\ProcessMsiPackageCommand.cs:line 158
at WixToolset.Core.Burn.Bundles.ProcessMsiPackageCommand.Execute() in D:\a\wix4\wix4\src\wix\WixToolset.Core.Burn\Bundles\ProcessMsiPackageCommand.cs:line 73
at WixToolset.Core.Burn.BindBundleCommand.Execute() in D:\a\wix4\wix4\src\wix\WixToolset.Core.Burn\Bind\BindBundleCommand.cs:line 195
at WixToolset.Core.Burn.BundleBackend.Bind(IBindContext context) in D:\a\wix4\wix4\src\wix\WixToolset.Core.Burn\BundleBackend.cs:line 23
at WixToolset.Core.Binder.BackendBind(IBindContext context) in D:\a\wix4\wix4\src\wix\WixToolset.Core\Binder.cs:line 67
at WixToolset.Core.Binder.Bind(IBindContext context) in D:\a\wix4\wix4\src\wix\WixToolset.Core\Binder.cs:line 40
at WixToolset.Core.CommandLine.BuildCommand.BindPhase(Intermediate output, IReadOnlyCollection`1 localizations, IReadOnlyCollection`1 filterCultures, String cabCachePath, Int32 cabbingThreadCount, IReadOnlyCollection`1 bindPaths, Dictionary`2 bindVariables, InputsAndOutputs inputsOutputs, CancellationToken cancellationToken) in D:\a\wix4\wix4\src\wix\WixToolset.Core\CommandLine\BuildCommand.cs:line 319
at WixToolset.Core.CommandLine.BuildCommand.ExecuteAsync(CancellationToken cancellationToken) in D:\a\wix4\wix4\src\wix\WixToolset.Core\CommandLine\BuildCommand.cs:line 152
at WixToolset.Tools.Program.Run(IServiceProvider serviceProvider, IMessageListener listener, String[] args, CancellationToken cancellationToken) in D:\a\wix4\wix4\src\wix\wix\Program.cs:line 103
at WixToolset.Tools.Program.Main(String[] args) in D:\a\wix4\wix4\src\wix\wix\Program.cs:line 48
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
at WixToolset.Core.Burn.Bundles.ProcessMsiPackageCommand.HarvestPackage() in D:\a\wix4\wix4\src\wix\WixToolset.Core.Burn\Bundles\ProcessMsiPackageCommand.cs:line 158
at WixToolset.Core.Burn.Bundles.ProcessMsiPackageCommand.Execute() in D:\a\wix4\wix4\src\wix\WixToolset.Core.Burn\Bundles\ProcessMsiPackageCommand.cs:line 73
at WixToolset.Core.Burn.BindBundleCommand.Execute() in D:\a\wix4\wix4\src\wix\WixToolset.Core.Burn\Bind\BindBundleCommand.cs:line 195
at WixToolset.Core.Burn.BundleBackend.Bind(IBindContext context) in D:\a\wix4\wix4\src\wix\WixToolset.Core.Burn\BundleBackend.cs:line 23
at WixToolset.Core.Binder.BackendBind(IBindContext context) in D:\a\wix4\wix4\src\wix\WixToolset.Core\Binder.cs:line 67
at WixToolset.Core.Binder.Bind(IBindContext context) in D:\a\wix4\wix4\src\wix\WixToolset.Core\Binder.cs:line 40
at WixToolset.Core.CommandLine.BuildCommand.BindPhase(Intermediate output, IReadOnlyCollection`1 localizations, IReadOnlyCollection`1 filterCultures, String cabCachePath, Int32 cabbingThreadCount, IReadOnlyCollection`1 bindPaths, Dictionary`2 bindVariables, InputsAndOutputs inputsOutputs, CancellationToken cancellationToken) in D:\a\wix4\wix4\src\wix\WixToolset.Core\CommandLine\BuildCommand.cs:line 319
at WixToolset.Core.CommandLine.BuildCommand.ExecuteAsync(CancellationToken cancellationToken) in D:\a\wix4\wix4\src\wix\WixToolset.Core\CommandLine\BuildCommand.cs:line 152
at WixToolset.Tools.Program.Run(IServiceProvider serviceProvider, IMessageListener listener, String[] args, CancellationToken cancellationToken) in D:\a\wix4\wix4\src\wix\wix\Program.cs:line 103
at WixToolset.Tools.Program.Main(String[] args) in D:\a\wix4\wix4\src\wix\wix\Program.cs:line 48
at WixToolset.Tools.Program.<Main>(String[] args)
- Describe the behavior you expected and how it differed from the actual behavior.
I expected the wxs file to be validated and indicate the SourceFile or Name is required.
Thank you.