I build a simple inventory management app. Now I would like to publish it as a single executable file (.exe) including the database and all dependencies. The purpose is to use it offline on another machine. I tried with deployment mode: ``Self-contained`` and file publish option as: ``produce single file``, ``Enable ReadyToRun compilation`` and ``Trim unused assemblies`` in visual studio. But that does not include database niter producing a single file.
Now in this case what should I do? Can anyone help me?
Regards,
Nazmul
CodePudding user response:
You should create a migration file with command and run it on SQL, or use ci/cd to deploy it.
Pay attention to these links:
CodePudding user response:
Well, I found a solution by myself. By using SQLite Database instate of MSSQL. Since my application is not a multiuser application that will not be an issue. But if you are thinking of a multiuser app you better not use SQLite. You can use it by installing the Microsoft.EntityFrameworkCore.Sqlite
plugin.
if anyone finds a better solution let me know.