简体   繁体   English

C#WPF与Visual Studio 2010中的SQLite数据库发布

[英]C# WPF with SQLite Database Publishing in Visual Studio 2010

I have developed an application in C# using WPF. 我已经使用WPF在C#中开发了一个应用程序。 I want to publish the software to my website so users can download the installer and it will automatically update when I release a new version. 我想将该软件发布到我的网站上,以便用户可以下载安装程序,并且当我发布新版本时它将自动更新。

I am having a couple of problems with the publishing of the project. 我在项目发布方面遇到了一些问题。

First of all, the software is using an embedded SQLite Database. 首先,该软件正在使用嵌入式SQLite数据库。 When I run the installer from the website, it downloads fine but does not include the database file that the software needs. 当我从网站上运行安装程序时,它可以正常下载,但不包含软件所需的数据库文件。 How can I include the database file in to the installer. 如何将数据库文件包含在安装程序中。

The second problem is how to choose where the program installs to on the users PC. 第二个问题是如何选择程序在用户PC上的安装位置。 When I installed it I expected it would install to C:\\Program Files\\Company Name\\Project Name but it doesn't put it there. 当我安装它时,我希望它会安装到C:\\ Program Files \\ Company Name \\ Project Name,但不会放在那里。 How can I do this as well. 我也该怎么做。

Thanks for any help you can provide with this. 感谢您提供的任何帮助。

  1. include your db file into project and restore db from it when application start 在应用程序启动时,将您的数据库文件包含到项目中,并从中还原数据库
  2. you are using clickonce, so you deal with sandbox application/ So you have 2 options - do not use clickonce (google for dday project for example or use windows installer) or use clickonce paths to found your files ( take a look ) 您使用的是clickonce,因此您要处理沙箱应用程序/因此,您有2个选择-不要使用clickonce(例如,用于dday项目的Google或使用Windows Installer),也不要使用clickonce路径来找到您的文件( 看看

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM