我用 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/