Is Sql Server Compact 4.0 supported at all?

733 views
Skip to first unread message

Ivan Zlatev

unread,
Nov 1, 2011, 9:02:17 AM11/1/11
to fluentmigrato...@googlegroups.com
When I execute migrate.exe from the command line with a "sqlserverce" provider I get:

System.Data.SqlServerCe.SqlCeException (0x80004005): Unable to load the native
components of SQL Server Compact corresponding to the ADO.NET provider of versi
on 8482. Install the correct version of SQL Server Compact. Refer to KB article
 974247 for more details.
   at System.Data.SqlServerCe.NativeMethods.LoadNativeBinaries()
   at System.Data.SqlServerCe.SqlCeConnection..ctor()
   at System.Data.SqlServerCe.SqlCeConnection..ctor(String connectionString)
eate(String connectionString, IAnnouncer announcer, IMigrationProcessorOptions
options) in d:\My Dropbox\Proyectos\stuff\FM\src\FluentMigrator.Runner\Processo
rs\SqlServer\SqlServerCeProcessorFactory.cs:line 32


Which however is not the case when I run the migration programatically from an unit tests using the TaskExecutor class. Then I get the stacktrace below. What's up with that?

NullReferenceException Object reference not set to an instance of an object.

   at FluentMigrator.Runner.Processors.SqlServer.SqlServerCeProcessor.FormatSqlEscape(String sql) in d:\My Dropbox\Proyectos\stuff\FM\src\FluentMigrator.Runner\Processors\SqlServer\SqlServerCeProcessor.cs:line 195
   at FluentMigrator.Runner.Processors.SqlServer.SqlServerCeProcessor.SchemaExists(String schemaName) in d:\My Dropbox\Proyectos\stuff\FM\src\FluentMigrator.Runner\Processors\SqlServer\SqlServerCeProcessor.cs:line 50
   at FluentMigrator.Runner.VersionLoader.get_AlreadyCreatedVersionSchema() in d:\My Dropbox\Proyectos\stuff\FM\src\FluentMigrator.Runner\VersionLoader.cs:line 84
   at FluentMigrator.Runner.VersionLoader.LoadVersionInfo() in d:\My Dropbox\Proyectos\stuff\FM\src\FluentMigrator.Runner\VersionLoader.cs:line 111
   at FluentMigrator.Runner.VersionLoader..ctor(IMigrationRunner runner, Assembly assembly, IMigrationConventions conventions) in d:\My Dropbox\Proyectos\stuff\FM\src\FluentMigrator.Runner\VersionLoader.cs:line 26
   at FluentMigrator.Runner.MigrationRunner..ctor(Assembly assembly, IRunnerContext runnerContext, IMigrationProcessor processor) in d:\My Dropbox\Proyectos\stuff\FM\src\FluentMigrator.Runner\MigrationRunner.cs:line 59
   at FluentMigrator.Runner.Initialization.TaskExecutor.Initialize() in d:\My Dropbox\Proyectos\stuff\FM\src\FluentMigrator.Runner\Initialization\TaskExecutor.cs:line 44
   at FluentMigrator.Runner.Initialization.TaskExecutor.Execute() in d:\My Dropbox\Proyectos\stuff\FM\src\FluentMigrator.Runner\Initialization\TaskExecutor.cs:line 49

Hrvoje Hudoletnjak

unread,
Nov 22, 2011, 2:32:25 PM11/22/11
to fluentmigrato...@googlegroups.com
Have same error. Anybody?

Daniel Lee

unread,
Nov 24, 2011, 6:26:36 PM11/24/11
to FluentMigrator Google Group
Hi,

I am working on support for Sql Server Ce 4. I'm nearly ready to
submit a new pull request for it. But most of the Ce4 features should
work with the existing code. So this problem is not specific to Ce 4.

The problem is the native dlls for SqlServer Ce are in the wrong
location. At the moment they are in the tools/SQLServerCENative
folder. The subfolders amd64 and x86 there should be directly under
the tools folder instead. You can move them and it should work. I'll
work out a solution for this so that it is fixed in the next version
of FluentMigrator.

If the above solution doesn't work, download the FluentMigrator.Tools
nuget and use the .NET 4.0 AnyCPU version (assuming you're on .Net 4
and x64).

//Daniel


On 22 Nov, 20:32, Hrvoje Hudoletnjak <hrvoje.hudoletn...@gmail.com>
wrote:
> Have same error. Anybody?

Hrvoje Hudoletnjak

unread,
Nov 25, 2011, 6:25:38 AM11/25/11
to FluentMigrator Google Group
that's great to hear! Moving DLL to another folder is easy workaround.

keep up a good work;)

Reply all
Reply to author
Forward
0 new messages