c# visual studio sql lite

1

my friend and I are currently a program in which we are using a sql lite database. When he is compiling the project, the database loads up without any problems. But when I try to compile the project (which works fine) and load the database the following error appears:

System.BadImageFormatException was unhandled HResult=-2147024885 Message=Die Datei oder Assembly "System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" oder eine Abhängigkeit davon wurde nicht gefunden. Es wurde versucht, eine Datei mit einem falschen Format zu laden. Source=PrisonArchitectSavegameEditor FileName=System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139 FusionLog==== Zustandsinformationen vor Bindung === LOG: Benutzer = TIETZE\tietze111 LOG: DisplayName = System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139 (Fully-specified) LOG: Appbase = file:///D:/Dropbox/C#/WIP/PrisonArchitectSavegameEditor/PrisonArchitectSavegameEditor/bin/Release/ LOG: Ursprünglicher PrivatePath = NULL

Aufruf von Assembly : PrisonArchitectSavegameEditor, Version=2.2.1.0, Culture=neutral, PublicKeyToken=null.

LOG: Diese Bindung startet im default-Load-Kontext. LOG: Die Anwendungskonfigurationsdatei wird verwendet: D:\Dropbox\C#\WIP\PrisonArchitectSavegameEditor\PrisonArchitectSavegameEditor\bin\Release\PrisonArchitectSavegameEditor.vshost.exe.Config LOG: Die Hostkonfigurationsdatei wird verwendet: LOG: Die Computerkonfigurationsdatei von C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config wird verwendet. LOG: Verweis nach der Richtlinie: System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139 LOG: Download von neuem URL file:///D:/Dropbox/C#/WIP/PrisonArchitectSavegameEditor/PrisonArchitectSavegameEditor/bin/Release/System.Data.SQLite.DLL. ERR: Das Setup der Assembly konnte nicht abgeschlossen werden (hr = 0x8007000b). Die Suche wurde beendet.

StackTrace:

  bei PrisonArchitectSavegameEditor.Form1.LoadDatabase()
   bei PrisonArchitectSavegameEditor.Form1.tabControlSaveGameActions_SelectedIndexChanged(Object sender, EventArgs e) in d:\Dropbox\C#\WIP\PrisonArchitectSavegameEditor\PrisonArchitectSavegameEditor\Form1.cs:Zeile 652.
   bei System.Windows.Forms.TabControl.OnSelectedIndexChanged(EventArgs e)
   bei System.Windows.Forms.TabControl.WmSelChange()
   bei System.Windows.Forms.TabControl.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   bei System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   bei System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
   bei System.Windows.Forms.Control.WmNotify(Message& m)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.Form.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   bei System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   bei System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
   bei System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.TabControl.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   bei System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   bei PrisonArchitectSavegameEditor.Program.Main() in d:\Dropbox\C#\WIP\PrisonArchitectSavegameEditor\PrisonArchitectSavegameEditor\Program.cs:Zeile 20.
   bei System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   bei System.Threading.ThreadHelper.ThreadStart()

InnerException:

The error also appears when I start the exe which he compiled. Also the error appears to come up when calling the function and not in the function itself: Error

Thank you in advance!

c#
sql
load
asked on Stack Overflow Oct 25, 2012 by user1633958 • edited Oct 25, 2012 by Vishal Suthar

2 Answers

1

You probably just need to install the provider for SQLLite:

http://sqlite.phxsoftware.com/

answered on Stack Overflow Oct 25, 2012 by SchmitzIT
0

try change Visual Studio Processor Architecture

answered on Stack Overflow Aug 9, 2017 by Ramgy Borja

User contributions licensed under CC BY-SA 3.0