One-click deployment - how can I ensure that the sqlite database file is only copied if it does not already exist?

Reference Information. I am starting to use click-through deployment once for a WinForms application that has a sqlite database file that contains a ready-made database structure.

Question. How do I configure a click-through deployment (via Publish, VS2008) to ensure that when the user loads, he will be:

  • a) If it does not already exist, then the COPY file is in, else
  • b) DO NOT copy the file, BUT check if there is a script update that needs to be run

thank

+3
source share
2 answers

, , , . ( , " " ) , ClickOnce . , , , (Inside VS.Net - Project Properties β†’ Project β†’ Application Files - , "Publish Status" - " " "). , . , , - IsFirstRun, , , , ..... ( , " " clickonce , , , ).

"

, . ClickOnce , - , . ​​ , ClickOnce Data Directory - , .

ClickOnce , , . , , , , ClickOnce . .pre, .

, API- ClickOnce . IsFirstRun, Update UpdateAsync . "

+2

Source: https://habr.com/ru/post/1734828/


All Articles