Program Unable to Load DLL #39;SQLite.Interop.dll#39; after WiX Installation(WiX 安装后程序无法加载 DLL SQLite.Interop.dll)
问题描述
我使用 WiX 来捆绑一个 MSI 安装文件.安装后,我执行程序,但得到以下错误.
I use WiX to bundle a MSI installation file. After the installation, I execute the program but get the following error.
无法加载 DLL 'SQLite.Interop.dll':找不到指定的模块.(HRESULT 异常:0x8007007E)
Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
我尝试将两个引用:SQLite.Interop
(x86 和 x64)添加到 WiX 项目中.但我明白了:
I have tried to add the two references: SQLite.Interop
(x86 and x64) into the WiX project. But I get:
由于以下原因,无法加载扩展名...SQLite.Interop.dll":无法加载文件或程序集file://.../x86/SQLite.Interop.dll"或它的依赖项之一.该模块应包含程序集清单.
The extension '...SQLite.Interop.dll' could not be loaded because of the following reason: Could not load file or assembly 'file://.../x86/SQLite.Interop.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
这个错误是由 WiX 还是我自己的应用程序引起的?
Is this error caused by WiX or by my own application?
我尝试将 SQLite.Interop.dll
(x64) 的引用添加到主项目,但它给出了这个错误.
I tried to add the reference of SQLite.Interop.dll
(x64) to the main project but it gives this error.
无法添加对V:Users...inDebugx64SQLite.Interop.dll"的引用.请确保该文件是可访问的,并且它是一个有效的程序集或 COM 组件.
A reference to 'V:Users...inDebugx64SQLite.Interop.dll' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component.
- System.Data.SQLite 下载
- 无法加载 DLL 'SQLite.Interop.dll'
推荐答案
在 Product.wxs
文件中,添加这些:
In the Product.wxs
file, add these:
<Directory Id="INSTALLFOLDER" Name="MyApp">
<!-- ... -->
<Directory Id="x86_dir" Name="x86" />
<Directory Id="x64_dir" Name="x64" />
</Directory>
并添加这些:
<Fragment>
<ComponentGroup Id="x86_files" Directory="x86">
<Component Id="SQLite_x86.Interop.dll" Guid="{GUID}">
<File Id="SQLite_x86.Interop.dll" Name="SQLite.Interop.dll" Source="$(var.MyApp_TargetDir)x86SQLite.Interop.dll" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="x64_files" Directory="x64">
<Component Id="SQLite_x64.Interop.dll" Guid="{GUID}">
<File Id="SQLite_x64.Interop.dll" Name="SQLite.Interop.dll" Source="$(var.MyApp_TargetDir)x64SQLite.Interop.dll" />
</Component>
</ComponentGroup>
</Fragment>
这篇关于WiX 安装后程序无法加载 DLL 'SQLite.Interop.dll'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:WiX 安装后程序无法加载 DLL 'SQLite.Interop.dll'


基础教程推荐
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01