errors while deploying sql server compact 3.5 sp2 privately

So Ive spent quite some time today with sql lite and saw the .net4 providers were very un stable. So I figured I'll use SqlCE. Its supposed to have a zero config/install instead its the most confusing way to deploy the thing.

I check numerous SO questions and these articles:

A More updated short guide:

So here is my problem, without the <runtime> tag bit, it WORKS on my DEV machine but NOT on XPSp3 without the SqlCE runtimes. It gives me a FileIOLoadException

WITH the <runtime> tag it works on XpSp3 but on my dev box it says :

Could not load file or assembly 'System.Data.SqlServerCe, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I checked this answer but Im VERY confused. Also, apparently the msdn blog articles are off, you need to include 7 dlls all together. And the System.Data.SqlServerCe.dll and System.Data.SqlServerCe.Entity.dll both come from folder named "Private" where the runtimes are installed.

<> <DbProviderFactories> <remove invariant="System.Data.SqlServerCe.3.5"></remove> <add name="Microsoft SQL Server Compact Data Provider" invariant="System.Data.SqlServerCe.3.5" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/> </DbProviderFactories> </> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Data.SqlServerCe" publicKeyToken="89845dcd8080cc91" culture="neutral"/> <bindingRedirect oldVersion="" newVersion=""/> </dependentAssembly> </assemblyBinding> </runtime>

How in the world is this zero configuration!? I have no idea what really is going wrong nor what I did to make it right? Isn't there documentation on this anywhere Other than some old blogs?

Just simply put, once I need to deploy, I just want to be able to xcopy exe and other files and it should work.So where is the reference/msdn/documentation/step-by-step on how to deploy?

Also sqlce will work on a box with ONLY .net4 installed right?

-------------Problems Reply------------

I had a very similar problem posted on S.O. in 6851346, and I just solved it.

I don't know if you are still struggling with this, but I found a solution on Code Project called Creating a Private Installation for SQL Compact that fixed my problems right up.

I hope this helps others, too.

Do you use Entity Framework? If not, the runtime tag is not required.

You must change this: Version= (in the add tag) to, and make sure you use the from the Private folder (it has this special assembly version)

Category:deployment Views:0 Time:2010-11-14

Related post

Copyright (C), All Rights Reserved.

processed in 0.073 (s). 11 q(s)