Errors when deploying SQL Server 3.5 3.5 sp2 privately

So, I spent some time today with sql lite and saw that .net4 providers were very unstable. So I decided to use SqlCE. It is assumed that it has zero configuration / installation, and not the most confusing way to deploy this thing.

I check numerous SO questions and these articles: http://blogs.msdn.com/b/stevelasker/archive/2008/10/22/privately-deploying-sql-server-compact-with-the-ado-net-entity -provider.aspx

http://blogs.msdn.com/b/sqlservercompact/archive/2010/05/12/troubleshooting-problem-with-private-deployment-of-sql-server-compact-3-5sp2-entity-dll.aspx

A Updated Short Guide:
http://robindotnet.wordpress.com/2010/02/28/how-to-deploy-the-sqlserver-compact-edition-software-locally/

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

With the <runtime > tag, it works on XpSp3, but in my dev block it says:

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

I checked this answer , but I am VERY confused. Also, msdn blog articles seem to be disabled, you need to enable 7 DLLs all together. Both System.Data.SqlServerCe.dll and System.Data.SqlServerCe.Entity.dll both come from a folder named "Private" where the runtimes are installed.

  <system.data> <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=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/> </DbProviderFactories> </system.data> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Data.SqlServerCe" publicKeyToken="89845dcd8080cc91" culture="neutral"/> <bindingRedirect oldVersion="3.5.1.0-3.5.1.50" newVersion="3.5.1.50"/> </dependentAssembly> </assemblyBinding> </runtime> 

How in the world is this zero configuration !? I have no idea what is really going wrong, and what did I do to fix it? Is there no documentation in this place, except for some old blogs?

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

Also, sqlce will work on the box with ONLY .net4 installed correctly?

+4
source share
2 answers

I had a very similar problem posted on SO in 6851346 and I just solved it.

I don’t know if you continue to struggle with this, but I found a solution in the Code Project called Creating a private installation for SQL Compact that fixed my problems.

I hope this helps others too.

+2
source

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

You should change this: Version = 3.5.1.0 (in the add tag) to 3.5.1.50 and make sure that you are using System.data.SqlServerCe.dll from a private folder (it has this special build version)

+1
source

All Articles