I am trying to use SQLITE library with winforms solution, but its throwing an odd error saying :
" Could not load file or assembly 'System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139"
here is snippet code:
internal string GetUserAppPath()
{
string dir = configure.appDir();
try
{
if (!Directory.Exists(dir))
{
Directory.CreateDirectory(dir);
}
string dbPath = configure.dbFile();
if (!File.Exists(dbPath))
{
SQLiteConnection.CreateFile(dbPath);
SQLiteConnection cn = new SQLiteConnection("Data Source=" + dbPath);
SQLiteCommand scriptcommand = new SQLiteCommand(cn);
scriptcommand.CommandText = CustomSolution.Properties.Resources.DatabaseScript;
cn.Open();
scriptcommand.ExecuteNonQuery();
cn.Close();
}
DBfildir = "Data Source=" + dbPath;
}
catch (System.Exception ex)
{
//MessageBox.Show(x.Message);
}
return dir;
}