Sqlite Location #180

Closed
opened 2026-01-29 16:33:00 +00:00 by claunia · 3 comments
Owner

Originally created by @kwakuduahc1 on GitHub (Jun 8, 2018).

My test app is almost running fine. I managed to drop the db in the corret folder when i do ... start and it works like a charm. However, when i do a build, I cannot seem to get the location where the context expects the sqlite db to be. I have dropped it in almost every folder but it appears stuck there.

My DbContext is simply

optionsBuilder.UseSqlite("Data Source=assistant.db;", x => { x.SuppressForeignKeyEnforcement(false); x.UseRelationalNulls(true); });

When i run dotnet project.dll, it executes fine without any error. If i start the electon app however, the error occurs

Originally created by @kwakuduahc1 on GitHub (Jun 8, 2018). My test app is almost running fine. I managed to drop the db in the corret folder when i do ... start and it works like a charm. However, when i do a build, I cannot seem to get the location where the <code>context</code> expects the sqlite db to be. I have dropped it in almost every folder but it appears stuck there. My DbContext is simply <code> optionsBuilder.UseSqlite("Data Source=assistant.db;", x => { x.SuppressForeignKeyEnforcement(false); x.UseRelationalNulls(true); });</code> When i run dotnet project.dll, it executes fine without any error. If i start the electon app however, the error occurs
Author
Owner

@robertmuehsig commented on GitHub (Jun 8, 2018):

In the past we had an issue with path locations, but it seems you have tried everything possible location for the db? https://github.com/ElectronNET/Electron.NET/issues/72

Another issue related to SqlLite https://github.com/ElectronNET/Electron.NET/issues/82

If nothing helps: Could you provide a very simple demo application?

@robertmuehsig commented on GitHub (Jun 8, 2018): In the past we had an issue with path locations, but it seems you have tried everything possible location for the db? https://github.com/ElectronNET/Electron.NET/issues/72 Another issue related to SqlLite https://github.com/ElectronNET/Electron.NET/issues/82 If nothing helps: Could you provide a very simple demo application?
Author
Owner

@kwakuduahc1 commented on GitHub (Jun 8, 2018):

As i work on the sample demo app, It may interest you that when i run dotnet eletronize start it actually expects the sqlite db to be in the .bin folder in the node_modules. I am surprised such a folder could be created because i cannot manually create such a folder, but it works at that point. I observed that appeared to be the working folder.

when i try dotnet electronize build /target win7-x86, such folder is not created and it fails at that point.

@kwakuduahc1 commented on GitHub (Jun 8, 2018): As i work on the sample demo app, It may interest you that when i run <code>dotnet eletronize start</code> it actually expects the sqlite db to be in the .bin folder in the node_modules. I am surprised such a folder could be created because i cannot manually create such a folder, but it works at that point. I observed that appeared to be the working folder. when i try <code>dotnet electronize build /target win7-x86</code>, such folder is not created and it fails at that point.
Author
Owner

@kwakuduahc1 commented on GitHub (Jun 8, 2018):

https://github.com/kwakuduahc1/Electron.git

Kindly find the demo application there. I used automatic migrations and it seems to work now. It creates the database and that seems to work. I copied the db into the folder where the sample project created the db and that still fails. I am investigation and would share any development.

The trick was to use automatic migrations

@kwakuduahc1 commented on GitHub (Jun 8, 2018): https://github.com/kwakuduahc1/Electron.git Kindly find the demo application there. I used automatic migrations and it seems to work now. It creates the database and that seems to work. I copied the db into the folder where the sample project created the db and that still fails. I am investigation and would share any development. The trick was to use automatic migrations
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#180