John Doe
John Doe

Reputation: 183

Could not load file or assembly System.Data.SQLite - Windows application

I am trying to use the SQLite's .Net DLL to access some data on a local SQLite database. The problem is that i need a way arround this error because i need to develop a software for 32/64 bits platforms (by using VB.Net not C#).

How can i stick to the 32bit version of the DLL to allow 32bit users of my program use it too?

If it's not possible to work with the 32bit version of SQLite's DLL, is it possible to include both versions in my Installer and programaticly choose which version of the DLL should be used?

Or..is there any other way to access SQLite databases without this particular DLL? (Things in C/C++ are much easier when it comes to SQLite usage as i remember)

Thanks!

Upvotes: 1

Views: 630

Answers (1)

Steve
Steve

Reputation: 216343

If you change your Target Platform to x86 instead of AnyCPU your code will be emitted as 32bit code also on 64bit systems and you could use just the 32bit dll of SQLite.
If you think that you are loosing some value working exclusively with x86 then I can give you this reference where the PRO and CONS of AnyCpu are critically examined.

To change the Target Platform use:

Menu BUILD, then Configuration Manager
Choose x86 from the Active Solution Platform combo.

If you don't have an x86 choice,
choose New and Select x86 and copy the default settings from AnyCpu.

Upvotes: 2

Related Questions