Closed kwakuduahc1 closed 6 years ago
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?
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.
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
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