可能重复:
加载 x86 或 x64 程序集
我正在尝试编译 Any CPU .NET 项目,但我必须链接 SQLite 库,该库具有不同版本的 x86 和 x64 平台。仅将 DLL 版本更改为 x64 没有帮助,应用程序无法启动,我需要使用 x64 参考重新编译代码。当我同时添加 x86 和 x64 引用时,由于冲突,它无法编译。我无法使用 x86 编译应用程序,因为我使用的系统 COM 库之一在 WOW64 下不起作用。
All 32-bit VSS applications (requesters, providers, and writers) must run as native 32-bit or 64-bit applications. Running them under WOW64 is not supported
所以我需要构建任何 CPU 项目,但目前我看到的解决这个问题的唯一方法是为 x86 和 x64 提供重复的项目。有更好的吗?
更新
当我在项目中引用 x64 库,但尝试加载 x86 库时,出现以下异常。
The located assembly's manifest definition does not match the assembly reference.