Ayman
Good morning. I have a C# .net application that I have been building and I used an Sqlite 3 database with the application for portability purposes needed by the client.
The client requested an installation wizard for the app to be able to install it on several PCs so I create an installation wizard project and everything went fine. I have the Sqlite database file to copy itself on compile and if I execute the application from the /bin directory everything works fine. The Sqlite file type is set as content(tried other types and same problem below persists). The build of the installation wizard had 0 errors or warnings.
When I execute the wizard and install the application everything goes well, all the files are extracted where they are expected including the database file. The problem is that all the tables within the Sqlite file just disappear which renders the app unusable unless I replace that file with the original.
I am using .net framework 4, Sqlite 3 and no ORM just a custom data access layer.
Anyone had this issue before? Any possible predictions of what could be happening? I looked all over the internet and couldn't find an answer. Thanks!
xterm
Ayman,
Did you add the 'Content' to the 'Project Output' within the setup project?
I just gave it a try, seems to be working fine.
I don't think that it's getting 'erased' as much as it is simply an empty database created by your sql provider (which i presume is System.Data.SQLite).
Ayman
Yes I did add the content if I don't , the Sqlite file wont be added in the first place. Yes the provider is System.Data.SQlite.