I’m writing a C# small application in VS 2008 which has a SQL Compact (.sdf) database used to persist data (funnily enough). I’m writing the installer package for it – wondering whether to use standard Windows installer technology or ClickOnce. I’m leaning towards the former because it seems like I’ll get more control over it that way. I need to be able to ensure that the connection string to the SDF file is correct. Bear in mind that I’m using the connection string setting that is created when you hook up the sdf to your DataSet – so I’ll need some way of changing the app.config file post-install. I imagine that I should also run some check to see if the database already exists or not in the location (as if the user is installing a newer version over the top they wouldn’t want to lose all their data).
I have no idea how to go about writing custom install-time tasks like this. Anyone got any ideas?