SQLLite error when running Command Line built from source


I am running a simple backup job:
Duplicati.CommandLine.exe backup C:\backup C:\data\hello.txt

When I run it with the Windows package, things work fine. When I build and run from source (compiled in Visual Studio), I get the following error (after providing the password):

2019-05-22 11:55:18 -07 - [Error-Duplicati.Library.SQLiteHelper.SQLiteLoader-FailedToLoadConnectionSQLite]: Failed to load connection.
System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
at System.Reflection.Assembly.LoadFile(String path)
at Duplicati.Library.SQLiteHelper.SQLiteLoader.get_SQLiteConnectionType() in C:\Users\me\duplicati-master\Duplicati\Library\SQLiteHelper\SQLiteLoader.cs:line 230
at Duplicati.Library.SQLiteHelper.SQLiteLoader.LoadConnection() in C:\Users\me\duplicati-master\Duplicati\Library\SQLiteHelper\SQLiteLoader.cs:line 109

Any idea what I need to do here? Specifying a dbpath doesn’t seem to help.

I am also facing this issue. Can anyone please provide the resolution? My version is duplicati-

Edit: I just observed that the pInvole folder at “duplicati-\Duplicati\CommandLine\bin\Debug\SQLite\pinvoke” does not contain System.Data.SQLite.dll

What do I need to do to resolve this issue? I am able to run Duplicati 2 command line directly through Program Files, but not in debug mode through Visual Studio.

They should be copied automatically as part of the build in VS Studio.

You can copy them manually from thirdparty/SQLite, which contains the pinvoke and win32/win64 versions of System.Data.SQLite.

Something like:

xcopy -R thirdrparty\SQLite Duplicati\CommandLine\bin\Debug\
1 Like