从版本2.0迁移到4.0后,从WIx安装程序的命令行运行以下命令时:
E:\ Code \ PCPE \ builder> ant -v -f Build.xml -Dlabel = .001安装
我收到以下错误。
[exec] light.exe : error LGHT0001 : Value cannot be null.
[exec] Parameter name: path1
[exec]
[exec] Exception Type: System.ArgumentNullException
[exec]
[exec] Stack Trace:
[exec] at System.IO.Path.Combine(String path1, String path2)
[exec] at WixToolset.Bind.Databases.MergeModulesCommand.Execute()
[exec] at WixToolset.Bind.BindDatabaseCommand.Execute()
[exec] at WixToolset.Binder.BindDatabase(Output output, String databaseFile, IEnumerable`1& fileTransfers, IEnumerable`1& contentPaths)
[exec] at WixToolset.Binder.Bind(Output output, String file)
[exec] at WixToolset.Tools.Light.Run()
[exec] at WixToolset.Tools.Light.Execute(String[] args)
[ant] Exiting E:\Code\PCPE\builder\PCPE3.0.1English_installer.xml.
BUILD FAILED
E:\Code\PCPE\builder\Build.xml:1165: The following error occurred while executing this line:
E:\Code\PCPE\builder\PCPE3.0.1English_installer.xml:382: exec returned: 1
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:650)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:676)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:502)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
Please help me to find the root cause of this error.
I even checked the code in PCPE3.0.1English_Installer.xml as at the below line number it is showing the error:
<exec executable="${wixhome}\light" failonerror="true">
<arg value="-out"/>
<arg value="${builds.dir.pcpe}\EN\PCPE_3.0.1.msi"/>
<arg value="PCPE_WIX_Installer_EN.wixobj"/>
<arg value="PCPE_FRAGMENT_EN.wixobj"/>
<arg value="PCPE_FRAGMENT_COMMON.wixobj"/>
<arg value="PCPE_Registry_entries.wixobj"/>
<arg value="${wix.ui.libfile}_English.wixlib"/>
<arg value="PCPE_FRAGMENT_DE.wixobj"/>
<arg value="PCPE_FRAGMENT_CN.wixobj"/>
<arg value="PCPE_FRAGMENT_FR.wixobj"/>
<arg value="PCPE_FRAGMENT_IT.wixobj"/>
<arg value="PCPE_FRAGMENT_JP.wixobj"/>
<arg value="PCPE_FRAGMENT_BR.wixobj"/>
<arg value="PCPE_FRAGMENT_RU.wixobj"/>
<arg value="PCPE_FRAGMENT_ES.wixobj"/>
<arg value="-loc"/>
<arg value="${shortworkingdir}\Wix\src\ui\WixUI_en-us.wxl"/>
</exec>