We are experiencing this strange issue with one of our ClickOnce-deployed applications:
On some client machines, ClickOnce when updating the application does not copy the old database in the .pre folder.
ClickOnce updates the application, but it behaves like it is a new installation.
Another strange thing is that despite it is specified a minimum required version to force any client to update the client PCs which have this issue display the ClickOnce upgrade prompt (it also displays the "Restore the application to its previous state" in the control panel "Program and features" item).
Indeed, other client PCs upgrade automatically without prompting and ClickOnce update behaves like it should.
This is a mature application and this is our 30th publication.
Another element is: Usually we published this application alternatively with two PCs but after installing Visual Studio 2012 we cannot use them to publish ClickOnce and then we create a virtual machine only for publishing this application.
--------------UPDATE----------------
I accepted RobinDotNet's solution because it is DAMN RIGHT to not rely on ClickOnce moving your data reliably.
I also found that you cannot rely on ApplicationDeployment.IsFirstRun.
I changed my code to use my internal check for IsFirstRun and now every updates run smoothly.