简体   繁体   中英

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:

  • which command line can help me (maybe sqlite has a command line client?)
  • will it need that I create an empty database file before running the scripts?

You can download the command line client shell for SQLite at http://www.sqlite.org/download.html

Then you can add the following Pre-Build task:

"sqlite3.exe" %dbFilename% < Database.sql

尝试访问数据库(扩展名:accdb)...它易于编辑,可以备份和使用Office访问..以及它的便携式..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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