Modernize to .NET 8 + SQLite (fix Windows 11 Access/ACE-OLEDB errors)#41
Open
johnli125308250-design wants to merge 1 commit into
Open
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 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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