![](/img/trans.png)
[英]Deploying C# Application with Local MySql (Workbench) Database using SQLite
[英]Deploying C# SQLite application
我有使用SQLite的C#应用程序。 它已经起作用,但是我一直在使用它,并且它不再起作用,并且我不知道出了什么问题:-/
它可以编译,但是我遇到问题“无法加载'System.Data.SQLite.dll'或其依赖项之一(在非dev机器上)。这是一个在安装过程中启动的服务,因此由于此错误安装失败。
因此,我添加了System.data.sqlite参考。 我必须注意,解决方案资源管理器中不再有“ x86”和“ x64”:-/
程序包管理器控制台显示已安装:
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>
(...)
解决方案资源管理器中没有“ x64”和“ x86”文件夹,就像在教程中一样,但是我可以在“引用”下看到system.data.sqlite(图像信誉不高)。
我什至尝试将sqlite-netfx45安装到部署计算机,但这也无济于事。
有任何想法吗? : - /
我必须注意,解决方案资源管理器中不再有“ x86”和“ x64”:-/
看起来像这样的应用程序部署:
我发现了问题。 新版本不需要在项目的构建中指定x86目标。 只需选择AnyCPU。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.