Add DbProvider registration to SQL Server Compact NuGet package [FixedIn6.1.0-alpha1] [AffectedLastRTM]


To enable simple private deployment, both for use in desktop, web and unit test scenarios, I suggest that the EntityFramework.SqlServerCompact package have the DbProvider services registration added (I will be happy to "grab" this issue, if it becomes active)
      <remove invariant="System.Data.SqlServerCe.4.0"/>
      <add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
Closed Dec 4, 2013 at 4:54 PM by mgirgin
Thanks for the pull request!


ajcvickers wrote Nov 25, 2013 at 4:44 PM

@ErikEJ This registration is for the ADO.NET provider which can be used independently of EF. The EF package was intended to install and setup only the EF provider. The package depends on Microsoft.SqlServer.Compact which should be responsible for installing and configuring the ADO.NET provider. This means if you are using SQL CE without EF then you should be able to install just this package and have everything work. That's the idea anyway, although I realize it might not actually work out like that if the Microsoft.SqlServer.Compact is not setup this way and so if, from a pragmatic perspective, it makes sense to put this is in the EF package because we don't have access to setup the Microsoft.SqlServer.Compact package correctly, then I think we would consider doing this. Or having you do it. :-)

ErikEJ wrote Nov 25, 2013 at 5:45 PM

@Arthur That is exactly the issue, it is really a fault in the Microsoft.SqlServer.Compact package, yes. But adding it to the EF provider package will make everything work out of the box, without requiring the SQL Server Compact 4.0 MSI to be installed (which is currently the only mechanism that installs the DbProvider package). In the meantime I have created and published a bootstrap package, EntityFramework.SqlServerCompact.PrivateConfig, but I think it makes more sense to simply "enhance" the existing package with this .config entry. I would be happy to do it, of course! Let me know what you think. . Have just published a blog post on this subject btw: http://erikej.blogspot.dk/2013/11/entity-framework-6-sql-server-compact-4_25.html

ajcvickers wrote Nov 26, 2013 at 5:46 PM

Hi Erik, we discussed this today and we would be happy if you made this change since it seems like the most pragmatic way we have right now of improving this experience.


ajcvickers wrote Dec 2, 2013 at 5:17 PM

Fixed in 50c1265c7bdf by ErikEJ

CDC - ACompactDbProviderConfig
Adding DbProvider configuration for SQLCE to app.config/web.config to improve F5 and deployement experience