FluentMigrator.Runner copies 32bit Assembly in Output directory

1.1k Views Asked by At

I have a migrations project with a reference to FluentMigrator.Runner. This assembly references a 32bit version of System.Data.SQLite.dll. So if I deploy this project to our 64bit server I get an exception:

An attempt was made to load a program with an incorrect format.

I don't even need SQLite, if I delete every System.Data.SQLite.dll in the solution everything works fine. But I'm looking for a better way to solve this... Because if FluentMigrator is updated, I will have this 32bit assembly again.

Is there any way to tell Visual Studio not to copy this indirectly referenced assembly to the output directory? Or are there better solutions than deleting all unneeded dlls?

Edit: I'm using the most recent Nuget Package of FluentMigrator (1.0.1.0)

Edit2: I am referencing the AnyCPU version of FluentMigrator.Runner.dll from the FluentMigrator.Tools NuGet-Package, because the FluentMigrator.Runner.dll from the FluentMigrator-Package is also 32bit only. But my problem is System.Data.SQLite.dll which is a 32bit version. There is another System.Data.SQLite.dll in the AnyCPU folder of the FluentMigrator.Tools package, but this DLL is binary equal to the 32bit version (why??)...

1

There are 1 best solutions below

0
On

I resolved this issue by installing the System.Data.SQLite.x64 nuget package.