Modernize to .NET 8 + SQLite (fix Windows 11 Access/ACE-OLEDB errors) - #41
Conversation
Replace the Access/Jet (ACE OLEDB) database with embedded SQLite and port the app from .NET Framework 4.8 to .NET 8 (net8.0-windows), fixing the frequent "provider is not registered" failures on Windows 11 while preserving features. Database - Access varManager.mdb -> embedded SQLite varManager.sqlite (no driver install, no x86/x64 bitness conflicts). - VS typed-DataSet TableAdapters reimplemented on System.Data.SQLite with the SAME public method signatures, so all Forms code is unchanged. - Access saved queries (installedScenes, varsView) recreated as SQLite views; CRUD via SQLiteCommandBuilder, one transaction per batch. - DB lives next to the exe when writable, else %LOCALAPPDATA%\varManager. Framework - varManager + DragNDrop -> SDK-style net8.0-windows; MMDLoader net6 -> net8. - LoadScene intentionally kept on .NET 3.5 (injected into VaM Unity/Mono). - Vendored DgvFilterPopup (CPOL); original external project ref was missing. Data migration - One-time importer (Settings dialog + --migrate) copies an existing varManager.mdb into SQLite via ACE OLEDB. Verified on a real ~358k-row DB. .NET 8 behavior-diff fixes - Process.Start UseShellExecute=true to open URLs/folders. - DpiUnaware so fixed-size WinForms layouts are not re-scaled/clipped. - Virtual-list teardown crash on close; deterministic GDI bitmap disposal; cache folder resolved from the exe dir. UX - Double-buffered grid scrolling; lifted 500-row batch caps; single gate for the shared BackgroundWorker (no more "busy" crashes). See MODERNIZATION.md for details and verification. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Has there been any progress with this? I can get the program to work after about 10+ minutes of opening, then crashing, then opening again until it actually loads lol. I've been using it for a few years now and the crashing on opening has only gotten worse and taken longer to actually work without crashing. |
Why
On Windows 11 the app frequently fails because the Access DB is accessed via
Microsoft.ACE.OLEDB.12.0, which needs the Access Database Engine redistributable and a matching bitness (x64 app vs 32-bit Office) — the common "provider is not registered" errors. .NET Framework 4.8 itself runs fine on Win11; the database driver is the root cause.What
varManager.sqlite): no driver install, no bitness issues. The VS typed-DataSetTableAdapterswere reimplemented onSystem.Data.SQLitewith the same public method signatures, so all Forms code is unchanged. The two Access saved queries (installedScenes,varsView) are recreated as SQLite views.net8.0-windows, SDK-style): varManager + DragNDrop ported; MMDLoader net6 -> net8. LoadScene is intentionally kept on .NET 3.5 (it is injected into VaM's Unity/Mono and must stay)...\DgvFilterPopupproject reference was missing from the repo, so the solution could not build.varManager.exe --migrate) imports an existingvarManager.mdbinto SQLite via ACE OLEDB. Verified on a real ~358k-row DB in ~2.6s.Process.StartUseShellExecute=true; DpiUnaware to keep the original layout; virtual-list teardown crash on close; deterministic GDI bitmap disposal; cache folder resolved from the exe dir.Full write-up & verification in
MODERNIZATION.md. Built with the .NET 8 SDK only (no VS needed):dotnet build varManager.sln -c Release.Notes