Fake/Paket "specified module could not be found" in build file


I created the following Github repo to document the problem: https://github.com/red-swan/fake-sqlite-problem

I am unable to build sqlite databases from an F# FAKE file relying on Paket. Adding the nuget package System.Data.SQLite to the paket.dependencies means I can open System.Data.SQLite but when attempting to build a database from the build.fsx file, I get the following error:

(Unable to load DLL 'SQLite.Interop.dll' or one of its dependencies: The specified module could not be found. (Exception from HRESULT: 0x8007007E))

SQLite.Interop.dll is a located in dependency runtimes\win-x64\native\netstandard2.0 of System.Data.SQLite's dependency System.Data.SQLite.Core. Trying to reference it directly with and #r statement in the build.fsx fails with the error:

Error opening binary file ... bad cli header, rva

I'm not sure how everything is supposed to resolve, but running the database creation from an actual fsproj works just fine, so I believe it has do with the FAKE or Paket resolution.

If you are familiar with FAKE, does this sound reasonable? Do you know how to fix this?

To reproduce the error: git clone https://github.com/red-swan/fake-sqlite-problem.git

asked on Stack Overflow Feb 6, 2019 by jks612

1 Answer


The above comment by TeaDrivenDev has the solution. I'm putting the answer here so I can close the question.

To be specific, I found the Native dll SQLite.Interop.dll and dropped it into the root folder where the FAKE build.fsx file is. The article TeaDrivenDev references has alternative methods as well.

answered on Stack Overflow Feb 7, 2019 by jks612 • edited Feb 9, 2019 by jks612

User contributions licensed under CC BY-SA 3.0