SQLite app distribution

DavyEFC

Well-known member
Joined
Dec 17, 2010
Messages
51
Programming Experience
5-10
I recently developed an app to be used by many people in my workplace. It utilises a SQLite db that is used to store/retrieve data. All is good on that side until i distributed to a select few to start testing. For most it ran fine, but for a couple the app loaded normally but absolutely no interaction with the db! My guess is that the DLL is not being registered on certain machines?

In the application directory i have:
  • My .exe
  • My SQLite db
  • System.Data.SQLite.dll
  • Two folders, one x64 and one x86 containing their respective versions of SQLite.Interop.dll

  1. Can someone please advise me what i need to do? I have no admin rights on our network but can get the admin to make changes if required.
  2. I am concerned as this app will also be distributed to customers who may face the same issue. Is there a way around this (i thought that having the DLL in the app dir meant it didn't need to be registered?)

Any advice gratefully received...
 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,561
Location
Norway
Programming Experience
10+
I just read up on System.Data.SQLite: Downloads Page that has lots of deployment notes.
Your dev output folder looks right, but you could have put them there manually. In project have you included the x64/x86 folders and files and set to "copy to output" ? Also is the referenced dll "copy to output" ? If this is the case and you're using ClickOnce deployment, check Publish page Application Files and see that these folders/files are included also there.
Other registration should not be necessary on client, but consider your build configuration (AnyCpu/x64/x86) and what client has. Most computers should be x64 and have .Net 4.0 installed these days.
 

DavyEFC

Well-known member
Joined
Dec 17, 2010
Messages
51
Programming Experience
5-10
I just read up on System.Data.SQLite: Downloads Page that has lots of deployment notes.
Your dev output folder looks right, but you could have put them there manually. In project have you included the x64/x86 folders and files and set to "copy to output" ? Also is the referenced dll "copy to output" ? If this is the case and you're using ClickOnce deployment, check Publish page Application Files and see that these folders/files are included also there.
Other registration should not be necessary on client, but consider your build configuration (AnyCpu/x64/x86) and what client has. Most computers should be x64 and have .Net 4.0 installed these days.

Thanks for the pointers, John, quite a bit there for me to be reading up on but all good learning.
I should have mentioned that I am not 'publishing' the solution, only copy/pasting the structure i mentioned onto the target machines as they require it. I thought by publishing that the user would have to run an installer and that in turn falls foul of the 'not having admin rights' issue.
 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,561
Location
Norway
Programming Experience
10+
Then I don't know what the problem is.

Standard users can of course install software for that user account, but not for all users on machine, which is something ClickOnce can't do anyway.
 

DavyEFC

Well-known member
Joined
Dec 17, 2010
Messages
51
Programming Experience
5-10
For anyone interested i just got time to look into this issue and have the solution. I thought all computers at the company where i work had the same staging image on them, they don't. Bad assumption on my part, of course. Some have .net framework 4.6 and some 4.5. I was compiling my app to 4.6, which obviously meant on the 4.5 machines the app would run ok but the wrong version of SQLite libraries were installed meaning no communication with the db. I'm now going to look into having a function as standard in my apps that warns if the installed .net version does not match the version i have compiled to. The thought is that this would at least give me a pointer to the issue early on...
 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,561
Location
Norway
Programming Experience
10+
Support for .Net 4.5 ended nearly two years ago, they should be updated. If you used the ClickOnce installer it would check the .Net version prerequisite, if not you should xcopy the app with the app.config file (ie "name.exe.config") containing the supportedRuntime instruction.
 
Top Bottom