tags:

views:

63

answers:

2

I got a report from a user that when they installed my .net 2.0 app they got a message that a reference to system.data.sqlite.dll could not be found. I use Inno to install it in the same folder as the executable and no problems from others. Does it make any difference what the copy local property is when I add the reference in VS? my understanding is that only impacts running it under VS. As long as the user has sqlite in the same folder as the executable, shouldnt that be all that is needed? could there be a permission or other secutity issue that blocks installing the dll? does sqlite.dll need to be registered? -no one else has had to.

+2  A: 

Yes, if it is in the folder with the executable, it works. But you will have to deal with 32 bit an 64 bit architectures, there are seperate assemblies for that. 32 bit is in /System.Data.Sqlite.dll, 64 bit in /x64/System.Data.Sqlite.dll.

Femaref
Yup. Change the Target platform setting to x86.
Hans Passant
that will not work hans. if the box is x64, the application will chrash with x86 lib. you NEED the x64 version on a x64 enviroment.
Femaref
thanks. I will determine if the box is 32 or 64 bit. But in either case I need to provide a version of the app with sqlite for 64 bit.
bill seacham
Is there anything the user can do to get the app with the 32 bit version of sqlite to run on a 64 bit machinge, like maybe forcing it to run in a 32 process?
bill seacham
nope, there isn't. The dll uses unmanaged functions and apperently those are x86/x64 depended.
Femaref
A: 

As has been pointed out this is probably an architecture problem. We are in fact having the same issue with Oracle.

You have ? solutions:

  1. Create two installers one x86 and one x64 that use the appropriate sql lite dll.
  2. Create an intelligent installer that copies the appropriate dll into the bin folder.
  3. Install the relevant sql lite into the gac. You may need to create the installer for this and you would probably want to set it up as a prerequisite for your application.

If you are not tied to SqlLite you might want to take a look at SqlCe. The installers are already there and available as prerequisite in visual studio and chances are they it is probably already installed on some client machines.

Bronumski
A simpler solution is to provide separate downloads, one for 32 bit and one for 64 bit, and let the user choose: these users are either power users or developers so should know which to download. will check out sqlce -always interested in alternatives.
bill seacham