2017-09-09 14 views
0

Visual StudioでSQLiteデータベースを使用してWinFormsアプリケーションを構築しようとしています。2017.NETフレームワーク4.6
NuGetからSQLiteをインストールしました。
私は、参照用のすべてのDLLをユーザーPCにインストールするセットアッププロジェクトを追加しました。
私にとって、デバッグとリリースモードではすべて正常に動作します。私はNuGetからSQLite.Interop.dllを追加しようとしたとき、私はこのエラーを取得するSQLite.Interop.dllリファレンス

System.DllNotFoundException: Unable to load DLL 'SQLite.Interop.dll': Such module not found. (Exception from HRESULT: 0x8007007E)

at System.Data.SQLite.UnsafeNativeMethods.sqlite3_config_none(SQLiteConfigOpsEnum op) at System.Data.SQLite.SQLite3.StaticIsInitialized() at System.Data.SQLite.SQLiteLog.Initialize() at System.Data.SQLite.SQLiteConnection..ctor(String connectionString, Boolean parseViaFramework) at CatFishSystem.Form1.Form1_Load(Object sender, EventArgs e) at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Error Could not install package 'SQLite.Interop.dll 1.0.103'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

私はまた、64ビット用のコンパイル済みのバイナリをダウンロードしようとしたユーザーが私のプログラムをインストールしたときしかし、彼はこれを得ましたWindows .NET 4.6 HereからSQLite.Interop.dllへの参照を正しく追加してください。私は私がこだわっていると何をするか分からない、この

error

を得ました。私はさまざまな解決策を試みたが、どれも役に立たなかった。あなたの助けを楽しみにしています。

答えて

0

この問題はセットアッププロジェクトで発生します。

ファイルをインストーラに自分で追加する必要があります。

Solution Exporerでセットアッププロジェクトを右クリックし、ファイルを追加します。

私はいつもx86とx64フォルダを作成し、debugディレクトリにあるファイルを追加します。