how to deploy sqlite with .Net
I got a r开发者_运维技巧eport 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.
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.
As has been pointed out this is probably an architecture problem. We are in fact having the same issue with Oracle.
You have ? solutions:
- Create two installers one x86 and one x64 that use the appropriate sql lite dll.
- Create an intelligent installer that copies the appropriate dll into the bin folder.
- 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.
精彩评论