Archive

Posts Tagged ‘clickonce’

Deploying SQL Compact databases – Part III

23 November, 2007 Leave a comment

I ended up using ClickOnce deployment instead of Windows Installer after all! This is because I uninstalled the beta of VS2008 and installed the "proper" version of VS 2008 Express – which doesn’t support Setup projects.

ClickOnce is fairly easy to set up – the only thing that I couldn’t work out was how to get it to notice Content files in dependant projects for deployment purposes i.e. the .sdf file that is the database for the application is in another project, and doesn’t get picked up by the ClickOnce publisher. So I had to move the .sdf file into my main project that is published – not ideal but not the end of the world.

I have also then found that after installing and running the first time, occasionally after the install, the database file can’t be found by the application. Once you run it a second time, it works fine – but the first time on install it doesn’t always work. Weird.

Deploying SQL Compact databases in VS 2008 installer packages

21 November, 2007 Leave a comment

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?

Software by Default

Open Source using Microsoft C#.net

Paul Thurrott's SuperSite for Windows

Spreading the Gospel of Isaac

ScottGu's Blog

Spreading the Gospel of Isaac

Jon Skeet: Coding Blog

Spreading the Gospel of Isaac

Search Msdn

Spreading the Gospel of Isaac

elastacloud = azurecoder + bareweb

The Official Elastacloud Blog for Happy Times in the Cloud

robin osborne

Spreading the Gospel of Isaac

Fabulous Adventures In Coding

Spreading the Gospel of Isaac

Follow

Get every new post delivered to your Inbox.

Join 174 other followers