SQLite User Forum

PowerShell 7
Login

PowerShell 7

(1.1) By votality (campitellian) on 2025-05-02 01:35:01 edited from 1.0 [link] [source]

Hi,

I want to use system.data.sqllite with powershell 7 (which uses .net 8)

I want to load the assembly with Add-Type -Path dllhere

Can someone please help me with exactly which package to download so I can extract the dll from it (direct link would be great) and what if any helper dll I need (like the interop one).

I have tried downloading the .net standard 2.0 and 2.1 ones but get an error when I load them (see below) so I must be using the wrong one or missing something..

Thanks in advance.

ErrorRecord : Cannot convert the "System.Data.SQLite" value of type "System.String" to type "System.Type". TargetSite : System.Type ConvertStringToType(System.Object, System.Type, Boolean, System.Management.Automation.PSObject, System.IFormatProvider, System.Management.Automation.Runspaces.TypeTable) Message : Cannot convert the "System.Data.SQLite" value of type "System.String" to type "System.Type". Data : {[System.Management.Automation.Interpreter.InterpretedFrameInfo, System.Management.Automation.Interpreter.InterpretedFrameInfo[]]} InnerException : HelpLink : Source : System.Management.Automation HResult : -2147467262 StackTrace : at System.Management.Automation.LanguagePrimitives.ConvertStringToType(Object valueToConvert, Type resultType, Boolean recursion, PSObject originalValueToConvert, IFormatProvider formatProvider, TypeTable backupTable) at CallSite.Target(Closure, CallSite, String) at System.Dynamic.UpdateDelegates.UpdateAndExecute1T0,TRet at System.Management.Automation.Interpreter.DynamicInstruction`2.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)

(2) By jose isaias cabrera (jicman) on 2025-05-02 12:03:41 in reply to 1.1 [link] [source]

Can someone please help me with exactly which package to download so I can extract the dll from it (direct link would be great) and what if any helper dll I need (like the interop one).

Hi votality.

From the SQLite site, the download link will take you to precompiled binaries, including Windows. Depending on whether you want 32b or 64b DLL, the download has what you want and also the Windows tools.

Precompiled Binaries for Windows
	sqlite-dll-win-x86-3490100.zip
(1.02 MiB) 		32-bit DLL (x86) for SQLite version 3.49.1.
(SHA3-256: 1dac243f154828327d6a250b74cf115e4f6a4cbfe83dbc488d45510b59e7a157)
	sqlite-dll-win-x64-3490100.zip
(1.28 MiB) 		64-bit DLL (x64) for SQLite version 3.49.1.
(SHA3-256: ec8fb7976d9c4bc495c4a142da05e97c4d6dc6c1205877adcce0bd5b191026e2)
	sqlite-tools-win-x64-3490100.zip
(6.12 MiB) 		A bundle of command-line tools for managing SQLite database files, including (1) the command-line shell, (2) sqldiff.exe, (3) sqlite3_analyzer.exe, and (4) sqlite3_rsync.exe. 64-bit.

About your other questions of .net, I don't use it, so I don't know much about it. Others will chime-in with their suggestions.

(3.1) By Aask (AAsk1902) on 2025-05-02 19:30:57 edited from 3.0 in reply to 1.1 [link] [source]

I want to use system.data.sqllite with powershell 7 (which uses .net 8)

The download page for System.Data.SQLite (SDS) does not include a precompiled binary for Net 8.

You will need to compile that version yourself from the SDS source If you intend to use Visual Studio for this, you will need to install the Net 8 SDK and change the target framework accordingly.

The source is bound to SQLite version 3.46.1: see here to upgrade to SQLite version 3.49.1.