Run a c# console application in build process

Viewed 1906

Suppose we have a solution with three projects:

enter image description here

  1. DownloadDataBase is a console application that downloads data from web and creates a sqlite db file
  2. Test is the main windows from application that uses the downloaded sqlite database.
  3. TestLibrary is a class library that is referenced by the Test project.

I know How I can reorder the build of these three projects using Configuration Manager from build menu. But The main question is : How can I customize build process of the solution so that:

  • It first builds the DownloadDataBase
  • Then executes this console application DownloadDataBase
  • After that copy the created sqlite file from the last step to the resource directory of the Test Project
  • And Finally builds the Test project using the updated sqlite file?

Therefore every time that I build the new release I will have the latest data needed by my application.

Thanks for any help

1 Answers
Related