Skip to content

Release 0.11.0 - #103

Merged
josef-poetzl merged 48 commits into
mainfrom
dev
Nov 18, 2026
Merged

josef-poetzl merged 48 commits into
mainfrom
dev

Conversation

@josef-poetzl

Copy link
Copy Markdown
Member

Merge dev into main for release 0.11.0.

  • AccUnit.dll 0.11.0.0
  • AccessCodeLib.Common.VBIDETools 0.9.20.0 (Common.Tools unchanged at 0.9.11.0)
  • VBE add-in 0.11.0000.0
  • Access add-in 0.11.0000.261118

josef-poetzl and others added 30 commits November 15, 2026 21:27
This reverts commit 9b3f4dc. The MCP server runs the tests through the
AccUnitLoader test suite inside Access and does not need the setter.
Start with accunit_generate_test_class and do not read the source of the
module under test; ask the developer once how to handle behavior that
cannot be derived. Use the VBA error number for Assert.Throws, restrict
Ignore to open expected behavior and note explicit skill invocation.
Import test classes and test related modules from source files with the
import of the AccUnit core, so writing tests no longer depends on
msaccess-vcs. Files are converted to the ANSI code page, get the class
export header if missing and are saved with DoCmd.Save to avoid the
Save As dialog on quit. Modules that are not test modules are never
replaced. The draft returns the AccUnit test folder.
Refuse an Access instance that was already running before the server
requested one and release it without quitting. Quit the own instance and
report an error when OpenCurrentDatabase returns without opening the
database, which was seen while another Access automation was running.
accunit_export_test_classes and accunit_remove_test_classes work only on
test modules and keep files they write over as .bak. The skill now
creates a second test class first and asks the developer whether to
merge it, replace the existing class or keep both.
Guard MCP server against foreign or unopened Access instances
…est-classes

MCP server: accunit-tests skill and tools to import, export and remove test classes
VBComponent.Export and VBComponents.Import always use the ANSI code
page. The core now rewrites exported .cls/.bas files as UTF-8 with BOM
(new setting ImportExportEncoding: Utf8Bom (default) or Ansi) and
imports an ANSI copy with CRLF of each source file. The import detects
UTF-8 with or without BOM, otherwise ANSI, and rejects all files if one
contains characters not available in the ANSI code page.
josef-poetzl and others added 18 commits November 17, 2026 15:11
…s-files

Export test classes as UTF-8 with BOM and detect encoding on import
Reading, encoding check and ANSI conversion of test class files now use VbaSourceFile of the AccUnit core. The import copy is written as UTF-8 with BOM; the core converts it for VBComponents.Import. Export docs name the ImportExportEncoding setting.
…urce-file

Use core VbaSourceFile in MCP server import
Combo box with UTF-8 with BOM (0) and ANSI (1) below ImportExportFolder; the form loads and saves the value through IUserSettings.ImportExportEncoding.
…t-export-encoding

Add ImportExportEncoding to Access add-in settings form
…r-suite

Expose CodeCoverageTracker on IAccessTestSuite
… exit

The click event sinks of the VBE command bar buttons were never removed
(unsubscribe was disabled for issue #77). The CLR finalizer then
unadvised them during process shutdown, after the VBE was gone, which
crashed Access (access violation in combase.dll/clr.dll). Office crash
recovery restarted Access, leaving an empty Access window.

Remove the click handlers in Dispose (not from the finalizer) before the
AccUnit command bars are deleted, and unsubscribe the AccUnit sub menu
CommandBarEvents in TestStarter. Buttons are still not deleted.
…cess-instance

Fix Access crash on exit caused by VBE add-in command bar events
Finalizers run on the finalizer thread, possibly during process exit
when the STA is gone (same class of bug as the crash fixed in #98).

- Remove the finalizers of VbeCommandBarAdapter, OfficeApplicationHelper,
  Connect, AddInManager and AccessErrorTrappingObserver; COM objects are
  only released in Dispose(true) (OnDisconnection/OnBeginShutdown).
  AccessErrorTrappingObserver restores the error trapping on Dispose only.
- ComTools: look up the file moniker in the ROT instead of
  Marshal.BindToMoniker (no activation of a new Access instance), check
  the result against the VBE, release non-matching candidates, ROT helper
  objects and the IUnknown/QueryInterface pointers.
- HotKey/HotKeys: unregister hot keys on Dispose instead of in the
  finalizer (registration is still disabled, issue #78).
Remove COM access from finalizers and release COM objects in host lookup
- Release the AddIn RCW only in Connect (AddInManager no longer releases it)
- Dispose the previous OfficeApplicationHelper when the host application is re-initialized
- ComTools: continue with the ROT search if GetActiveObject fails; skip faulty ROT entries
- OfficeApplicationHelper: fix inverted condition in GetCheckedVbProject
- Add unit tests for the project lookup condition and the unregistered ProgID case
…owup

Fix COM ownership and host lookup issues found in #99
Clear(string codeModuleName = null) threw a NullReferenceException for the default value. Null or empty now clears all modules. Clear(name) also removes the module from the tracker, so the report no longer lists it.
TestSuiteManager.InitTestSuite only showed the exception and returned a null suite, so VBA failed later with a meaningless message. The exception is now logged and rethrown as InvalidOperationException with the original message; UI callers already show exceptions themselves. TestSuiteInitialized is raised only on success.
Fix CodeCoverageTracker.Clear and silent null from TestSuiteManager
AccUnit.dll 0.11.0.0, AccessCodeLib.Common.VBIDETools 0.9.20.0 (Common.Tools unchanged at 0.9.11.0), VBE add-in 0.11.0000.0, Access add-in 0.11.0000.261118.
@josef-poetzl
josef-poetzl merged commit fe9f9a8 into main Nov 18, 2026
2 checks passed
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.

1 participant