1
votes

(I apologize of my bad english, I´m mexican student) I'm trying to deploy an app (using windows forms) wich has an installer (Advanced installer ) adn using SQLite, when running on Visual Studio works without problem, but when installed I get an "System.Data.SqLite not found" error, How to fix it to work, explained for a new persons that is learning programing?

I have tried all the solutions and recomendations of similar questions, but the error keeps poping. I tried to solve it in a W10 64-bit pc. Previously I tried with this question Could not load file or assembly 'System.Data.SQLite' The main diference is that the problem is showed when runing in VS, solved by installing trhu Nu-get or changing some configurations, my problem is only when compiling an .msi installer and installing the app, and that changes doesnt work

here is the code error, if is not enough tell me and i can share more info

System.IO.FileNotFoundException: No se puede cargar el archivo o ensamblado 'System.Data.SQLite, Version=1.0.111.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' ni una de sus dependencias. El sistema no puede encontrar el archivo especificado.
Nombre de archivo: 'System.Data.SQLite, Version=1.0.111.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139'
   en Half_Heart_IDE.db_driver.Start_up(String Adress)
   en Half_Heart_IDE.Form1.Crear_todo(Object sender, EventArgs e)
   en System.Windows.Forms.Control.OnClick(EventArgs e)
   en System.Windows.Forms.Button.OnClick(EventArgs e)
   en System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   en System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   en System.Windows.Forms.Control.WndProc(Message& m)
   en System.Windows.Forms.ButtonBase.WndProc(Message& m)
   en System.Windows.Forms.Button.WndProc(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   en System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I want to fix it in order to be capable of using SQLite in 64/32bit machines (or creating specific installers) when the app is installed using the .msi generated by Advanced installer 16.1 in VS Community 2019 16.2.0

1

1 Answers

0
votes

did you add the "System.Data.SqLite.dll" file into your setup project (Files and Folders section)? most likely this is a dependency of your app that you should also include into your setup file

try to use the [Add Project Output] button of your setup project in Visual Studio and select all the references and dependencies of your application project; it should help