[英]How do you create portable databases with MsBuild?
I want to store in my solution a project containing the database creation scripts. 我想在我的解决方案中存储一个包含数据库创建脚本的项目。 When this project is built, it must generate a database file, which will then be used by this and other projects of the solution at the run time.
构建此项目时,它必须生成一个数据库文件,然后在运行时由此项目和解决方案的其他项目使用。 How to do that?
怎么做?
I know I can add Pre-Build task, but I wonder: 我知道我可以添加Pre-Build任务,但我想知道:
You can download the command line client shell for SQLite at http://www.sqlite.org/download.html 您可以在http://www.sqlite.org/download.html下载SQLite的命令行客户端shell
Then you can add the following Pre-Build task: 然后,您可以添加以下预构建任务:
"sqlite3.exe" %dbFilename% < Database.sql
尝试访问数据库(扩展名:accdb)...它易于编辑,可以备份和使用Office访问..以及它的便携式..
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.