mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
Sqlite Location #180
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
contextexpects 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
@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?
@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 startit 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):
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