WiX 安装后程序无法加载 DLL 'SQLite.Interop.dll' [英] Program Unable to Load DLL 'SQLite.Interop.dll' after WiX Installation

查看:39
本文介绍了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.



推荐答案

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'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆