Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wix light.exe:错误LGHT0001:系统无法打开指定的设备或文件。_Wix - Fatal编程技术网

Wix light.exe:错误LGHT0001:系统无法打开指定的设备或文件。

Wix light.exe:错误LGHT0001:系统无法打开指定的设备或文件。,wix,Wix,今天,我们使用MSBuild/m构建产品,以使用多进程构建 在我们更改预构建事件中的某些文件之前,使用MSBuild multiprocess进行构建可能会成功 现在生成失败,出现以下异常: 124>light.exe:错误LGHT0001:系统无法打开指定的设备或文件。(来自HRESULT:0x8007006E的异常)[…MSI.wixproj] Exception Type: System.IO.FileLoadException Stack Trace:

今天,我们使用MSBuild/m构建产品,以使用多进程构建

在我们更改预构建事件中的某些文件之前,使用MSBuild multiprocess进行构建可能会成功

现在生成失败,出现以下异常:

124>light.exe:错误LGHT0001:系统无法打开指定的设备或文件。(来自HRESULT:0x8007006E的异常)[…MSI.wixproj]

     Exception Type: System.IO.FileLoadException

     Stack Trace:
        at Microsoft.Tools.WindowsInstallerXml.MergeMod.IMsmMerge2.OpenModule(String fileName, Int16 language)
        at Microsoft.Tools.WindowsInstallerXml.Binder.MergeModules(String tempDatabaseFile, Output output, FileRowCollection fileRows, StringCollection suppressedTableNames)
        at Microsoft.Tools.WindowsInstallerXml.Binder.BindDatabase(Output output, String databaseFile)
        at Microsoft.Tools.WindowsInstallerXml.Binder.Bind(Output output, String file)
        at Microsoft.Tools.WindowsInstallerXml.Tools.Light.Run(String[] args)
(链接目标)-> light.exe:错误LGHT0001:系统无法打开指定的设备或文件。(来自HRESULT:0x8007006E的异常)[…Msi.wixproj]


在与团队进行调查后,我们使用Wix 3.8找出根本原因。 ProductMSI.sln有50多个MSI wix项目和所有共享MSM项目要构建

每个MSI项目都有一个生成后事件操作,它将重新打开与MSI相关的MSM,以通过WindowsInstaller API作为数据库对MSI进行一些更改。并通过API以读取和编辑模式打开MSM

因此,如果一个共享MSM由一个MSI post事件打开,并且将由另一个wix项目打开以进行编译。打开的请求将被拒绝。将抛出上述错误

解决方案: 1.将事件后操作更改为以只读方式打开MSM,而不是以只读和编辑模式打开


我们通过了测试。

您可能没有打开安装程序,现在试图通过-o参数重新创建它。WIX无法重新创建它。谢谢Yawar。该问题是由文件访问冲突引起的。