How to remove the "Cant find PInvoke DLL SQLite.interop.dll" error

I am developing a mobile application for Windows. I am using SQLlite database. I use the following code to connect to this database as follows

                SQLiteConnection cn = new SQLiteConnection();
                SQLiteDataReader SQLiteDR;
                cn.ConnectionString = @"Data Source=F:\CompNetDB.db3";
                cn.Open();
                SQLiteCommand cmd = new SQLiteCommand();
                cmd.CommandText = "select * from CustomerInfo";
                cmd.CommandType = CommandType.Text;
                cmd.Connection = cn;
                SQLiteDR = cmd.ExecuteReader();

In the above case, I get the error "Cant find PInvike DLL SQLite.interop.dll". I added the System.Data.SQLLite DLL from \ SQLite.NET \ bin \ compactframework of this folder. This is the default folder when installing SQLite. In the same folder there is one DLL file named SQLlite.Interop.66.DLL. When I try to add a link to this DLL, it gives an error that the dll cannot add. Are these two SQLlite.Interop.dll and System.Interop.066.dll DLLs the same? In the above code, how to solve the error "Cant find PInvoke.SQLite.Interop.dll" Please, can you tell me if there is an error in my code or something is missing in my application?

+3
source share
2 answers

DLL interop C DLL, P/Invoke, System.Data.SQLIte. DLL, . - , "" " " ", ". , Studio .

+6

.xxx SQLite.Interop.xxx.DLL. SQLlite.Interop.DLL System.Data.SQLIte ctacke.

+1

Source: https://habr.com/ru/post/1765596/


All Articles