How does the ClickOnce installer handle updates when using a compact database?

I have a simple WPF application that uses ClickOnce to handle installation. Inside this application there is a compact database. Thanks to testing, I found that when publishing a new assembly, this database will be overwritten, which I do not want. Anyway, can I have fine control over which files are updated? I assume that ClickOnce simply checks the hash of the database file, deciding that it has changed and pulled the update.

As a workaround, I have since deleted the database from the files that are included in the published application, so that the original remains on the client machine after the update, intact.

Not a great solution I know

Thanks,

+5
source share
2 answers

ClickOnce deployments split application files into Include or Data File. You can specify that each file is in Visual Studio by going to the "Project Properties", "Publish" page, and then clicking on the "Application Files ..." button. You can then install your .sdf file in the “Data File” in the “Publish Status” column.

The data files downloaded by ClickOnce are then placed in a separate directory for each new version.

, , .

, ClickOnce. , " ClickOnce" " ".

SQL Server CE, , , :

<add
  name="MyApplication.Properties.Settings.LocalCacheConnectionString"
  connectionString="Data Source=|DataDirectory|\LocalCache.sdf"
  providerName="Microsoft.SqlServerCe.Client.3.5" />

"| DataDirectory |" , SQL CE SQL Express .

+5

​​ SQLCE, , , ClickOnce \pre.

, . , , . , SQL- , ( ), .

RobinDotNet

+2

All Articles