我有使用SQLite的C#应用程序。它已经工作,但我一直在玩它,它不再工作,我不知道什么是错的: -/部署C#SQLite应用程序
它编译好,但我有问题“无法加载”System.Data.SQLite.dll '或它的一个依赖关系(在非开发计算机上)这是一个在安装过程中启动的服务,所以安装因此错误而失败
因此我添加了System.data.sqlite参考。 86" 和‘再在解决方案资源管理64’: -/
包管理器控制台显示它的安装:
PM> Install-Package System.Data.Sqlite
Attempting to resolve dependency 'System.Data.SQLite.Core (≥ 1.0.94.0)'.
Attempting to resolve dependency 'System.Data.SQLite.Linq (≥ 1.0.94.1)'.
Attempting to resolve dependency 'System.Data.SQLite.EF6 (≥ 1.0.94.0)'.
Attempting to resolve dependency 'EntityFramework (≥ 6.1.1.0)'.
'System.Data.SQLite 1.0.94.1' already installed.
QLog already has a reference to 'System.Data.SQLite 1.0.94.1'.
PM>
我把它添加到WXS:
(...)
<Component Id="System.Data.SQLite.dll" Guid="{BCA7E1B7-CA34-4B1C-829F-29D4F135912E}">
<File Id="System.Data.SQLite.dll" Source="..\QLog\bin\x86\Release\System.Data.SQLite.dll" Vital="yes" KeyPath="yes" DiskId="1"/>
</Component>
<Directory Id='dir_x86' Name='x86'>
<Component Id='x86' Guid='{C2869DAC-B3CC-4E87-AEF2-74F76025CFD9}'>
<CreateFolder />
<File Id='x86' Name='SQLite.Interop.dll' Source='..\QLog\packages\System.Data.SQLite.Core.1.0.94.0\build\net45\x86\SQLite.Interop.dll' />
</Component>
</Directory>
<Directory Id='dir_x64' Name='x64'>
<Component Id='x64' Guid='{452F3E46-B1E6-4A5A-B2CB-C7DA9B7EAB51}'>
<CreateFolder />
<File Id='x64' Name='SQLite.Interop.dll' Source='..\QLog\packages\System.Data.SQLite.Core.1.0.94.0\build\net45\x64\SQLite.Interop.dll' />
</Component>
</Directory>
(...)
有没有“64”,并在解决方案资源管理器中的“x86”的文件夹,因为它们在教程,但“参照”下,我可以看到system.data.sqlite(不够声誉的图像)。
我甚至尝试安装sqlite-netfx45到部署机器,但它也没有帮助。
任何想法? : -/
尝试突出显示参考。去porperties并确保CopyLocal设置为true。然后确保将Sqlite Dll复制到实时环境中 – 2014-09-24 13:03:05