c# - 如何在安装项目中包含和链接 Sqlite 数据库文件

标签 c# sqlite setup-project

我用 C#、Sqlite 和 Entity Framework 开发了 WPF 桌面应用程序。现在开发已经完成并尝试创建安装项目。

但我不知道如何在我的安装文件夹中包含 Sqlite 数据库文件(myDb.sqlite),以及如何修改我的 App.Config 中的 ConnectionString 以链接到安装文件夹中的这个(myDb.sqlite)?

我使用以下扩展来创建安装项目。 https://visualstudiogallery.msdn.microsoft.com/f1cc3f3e-c300-40a7-8797-c509fb8933b9

最佳答案

尝试一下 :

Step : 1  =>  First in VS2017 Install Microsoft visual Studio Installer Project - > Download -> Install 
                    Or
               Go To the VisualStudio 2017 -> tool -> extension and update -> install.
Step : 2  =>  Create a new project -> Other Object Type -> Setup Project.
Step : 3  => after open that project you can see that In the LEFT PAN 3 files
              1> Application Folder.
              2> User's Desktop.
              3> User's Programs menu.
Step : 4  => Click  1> Application Folder and paste our all file which we want to get in backup.
Step : 5  => find .exe file from application folder and that copy pase, that rename it and give same name, than after one drag and drop to (User's Desktop). and than again same copy pase .exe file than same name rename it and drag and drop to the (User's Programs menu).
Step : 6  => than right click to the project set auther name and you can see diffrent diffrent property and you can change as you want.
Step : 7  => Build The Project.
Step : 8  => Go To The Project Location In our windows explorer.
Step : 9  => open project foldre Click to The "Release" folder install it.

After Install the application you can use the with SQlLite Database

关于c# - 如何在安装项目中包含和链接 Sqlite 数据库文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37391381/

相关文章:

sql-server - 如何将自定义桌面应用程序数据库安装到 SQL Express?

c# - VS 安装项目 - .Net Framework 3.5 或更高版本的启动条件

c# - .NET 中程序之间的通信

c# - RijndaelManaged 支持 128-256 位 key ,默认构造函数生成器的 key 大小是多少?

ios - 在 Coredata 中记录 sqlite 访问

django - 添加到Django的manytomany字段

c# - 如何通过 ModifyJsonSerializerSettings 在 NEST 客户端中设置 NullValueHandling.Include JsonSerializerSettings

c# - 如何从电话线上检测来电显示?

node.js - sqlite3 读取表中的所有记录并返回

visual-studio - 如何在 VS 安装项目输出文件名中包含版本号