We've changed our setup package to install the datafile into the Application Data special folder. Originally the datafile was part of the main project's output as a subfolder\datafile.sdf file. I changed the build action to None, and the Copy to Output Directory as 'Do not copy', then in the setup project set the file up in 'File System'.

What happens when we go to upgrade an existing installation is that the original data file is removed. I would love the setup project to have a custom action or something similar that moves the datafile to the new target location. I haven't found very good documentation on how to do this. Could you point me in the right direction?