Wednesday, March 28, 2012

Installing/Deploying Windows App with SQL Server 2005 CE

I am a little bit confused about making an installer/deployer.

I have an application using SQL Server 2005 CE (I have just updated to the most recent version Jan 2007). It will run on a new desktop PC (windows XP) if I install the SQL CE runtime and then copy the .EXE and the .SDF database file. This is great but my client wants the whole thing to install as one operation. I thought click once could do this but it seems that is only for Pocket PC targets? Can anyone point me to a method to make an appropriate installer please?

Pete

I am using the following:
SQLServerCE31-EN.msi - installer for SQL CE server runtime
SSCE31VSTools-ENU.exe - installed over VS 2005 SP1.Have you tried publishing it? - I have no problem doing this for standard apps.

In Brian Noyes' book "Smart Client Deployment with ClickOnce' there are several small sections on how to deploy CE

P235 "An example is the SQL Server 2005 CE CTP that is available at the time of this writing. You can download the .msi file to do and install of SQL Compact and you can also download the Bootstrapper Manifest needed to add SQL Compact to your Bootstrapper. If you are provided the Bootstrapper files, all you need to do is place the files in the right location."

I can recommend this book - written in a logical straightforward manner. Also covered is Deploying a (sic CE) Client Database with your Application (starting P 167)

Here is the video link from Steve Lasker's blog on CE deployment http://blogs.msdn.com/stevelasker/archive/2006/07/06/SQLServerEverywhereDeploymentOptions.aspx|||If you use something like Inno Setup you can just have the installer copy the SQL Server Compact Edition dll files to the application's folder. Then you won't have to worry about using the MSI file. Check the SQL Server Compact Edition Books Online for more.

Or, (still using Inno Setup) add the MSI file to the setup project and run it with the necessary options to install it right before the installation ends.
|||Great responses guys! I'll try everything you suggest and feed back here.

Pete|||Ok, thanks for the references to Steve Laskers blog. The screencast of deployment options gave me the information I needed. I have ended up using the VS Setup project to install the SQL CE dlls into the app folder and the GAC. That is great for me (I didn't want publish/deploy). I am sure Inno would have done the same but I don't have time to learn another setup app now (I've used NCIS as well in the past). Anyway, kudos to all of you and Steve Lasker and the MS Virtual PC people without which I would need 2 PCs to test all this...

Pete|||I should mention that it looks like just copying SQL Server Compact Edition's DLLs is not a way to do it anymore. I remember seeing it in the SQL Server Everywhere Edition Books Online but it seems to have been removed from the SQL Server Compact Edition Books Online. Just thought I shouldd mention this for anyone else who reads this thread.

No comments:

Post a Comment