Skip to content

fix: Ensure SQLite DLL is flushed to disk before initialization#41

Merged
NerdsCorp merged 2 commits into
mainfrom
claude/fix-sqlite-dll-error-WvtVE
Dec 28, 2025
Merged

fix: Ensure SQLite DLL is flushed to disk before initialization#41
NerdsCorp merged 2 commits into
mainfrom
claude/fix-sqlite-dll-error-WvtVE

Conversation

@NerdsCorp
Copy link
Copy Markdown
Owner

  • Changed FileMode from OpenOrCreate to Create for clean writes
  • Changed FileAccess from ReadWrite to Write (only need write)
  • Added explicit Flush(true) to force write to disk immediately
  • Added file existence verification after extraction
  • Prevents DllNotFoundException by ensuring DLL is on disk before SQLitePCL.Batteries_V2.Init()

This fixes the "Dll was not found" error at startup by ensuring the sqlite3.dll file is fully written and flushed to disk before the SQLitePCL library attempts to load it.

- Changed FileMode from OpenOrCreate to Create for clean writes
- Changed FileAccess from ReadWrite to Write (only need write)
- Added explicit Flush(true) to force write to disk immediately
- Added file existence verification after extraction
- Prevents DllNotFoundException by ensuring DLL is on disk before SQLitePCL.Batteries_V2.Init()

This fixes the "Dll was not found" error at startup by ensuring the
sqlite3.dll file is fully written and flushed to disk before the
SQLitePCL library attempts to load it.
The SQLitePCLRaw.bundle_e_sqlite3 package expects the native DLL to be
named 'e_sqlite3.dll', not 'sqlite3.dll'. Changed the target filename
when extracting the embedded SQLite DLL to match what the package expects.

This resolves the DllNotFoundException: "Dll was not found" error that
occurred during SQLitePCL.Batteries_V2.Init() at startup.
@NerdsCorp NerdsCorp merged commit 5c2576e into main Dec 28, 2025
1 check passed
@NerdsCorp NerdsCorp deleted the claude/fix-sqlite-dll-error-WvtVE branch December 28, 2025 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants