开发者

SQL Compact 3.5 SP2 CU2 Entity Framework Problem

We recently moved from using SQL CE 3.5 SP2 RTM (file version 3.5.8080) to Cummulative Update 2 (3.5.8082), and started encountering an issue where the Entity Framework (from .NET 3.5) can't load System.Data.SqlServerCe.Entity.dll.

The error we get is:

System.Data.MetadataException: Schema specified is not valid. Errors: MyData.ssdl(2,117) : error 0004: Could not load System.Data.SqlServerCe.Entity.dll. Reinstall SQL Server Compact.

I'm not sure as to how the entity framework determines what Entity Framework provider to load based on the ADO.NET provider. One interesting tidbit is that the assembly version for the CU2 copy of System.Data.SqlServerCe.dll is 3.5.1.0 (no change from RTM), yet the assembly version for System.Data.SqlServerCe.Entity.dll is 3.5.1.5. I don't know if that's the problem, but it seems strange.

The line referenced in the SSDL file is the line that specifies the ADO.NET provider (System.Data.SqlServerCe)开发者_开发百科. It doesn't reference the EF provider anywhere I can see.

If I simply replace System.Data.SqlServerCe.Entity.dll with the version from RTM, things start working again. This worries me, however, as there are likely changes I need from CU2 that I won't be getting.

Ideas?


This was actually a result of me using a combination of the public and private assemblies created by the CU installer.

I found this great overview of exactly how the SQL CE Private installation stuff works. Makes sense, and it solved all my issues:

http://www.codeproject.com/KB/database/SQLCEPrivateInstallation.aspx

I've also written a blog post about this issue: http://www.robertdowney.com/post/2011/04/13/Trials-and-Tribulations-with-SQL-Server-Compact-Edition.aspx


I doubt there are any changes, you could use Reflector/WinMerge to find out. But it sounds like a bug. Cooud you share your app.config? Maybe the binding redirect issues has been silently fixed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜