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

时间:2016-05-23 12:44:42

标签: 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

1 个答案:

答案 0 :(得分:0)

试一试:

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