New build MZ-Tools 8.0.0.189

It has been a while since the last update, I know. After build 8.0.0.178 (March 1) a new build 8.0.0.180 was released on April 1 that contained a change in the implementation of keyboard shortcuts for features, code templates and error handlers of VB/VBA. The Microsoft API for VB/VBA add-ins doesn’t provide support for keyboard shortcuts, so each add-in has to use some trick to provide them. For years MZ-Tools has used global hotkeys of Windows, but they have some issues (because hotkeys are global, the add-in must unregister them when the IDE is not active and re-register them when the IDE becomes active again). In build 8.0.0.180 a new more robust approach was used but it didn’t work as expected and crashes and duplicated insertions of code templates/error handlers were reported in the first day so that build was retired. Yesterday, after some months without updates, a new build has been released with the bugs reported since April.

This new build introduces also an important and somewhat breaking change if you are still using Visual Studio 2012 or 2013: MZ-Tools 8.0 for Visual Studio was provided in two ways:

  • As an “add-in” (Tools > Add-In Manager) for Visual Studio 2005, 2008 and 2010
  • As a “package” (Tools > Extensions and Updates) for Visual Studio 2012, 2013, 2015 and 2017

The functionality is roughly the same in both cases (only the installation and the Check for Updates mechanism is different).

Due to some upcoming changes in Visual Studio 2017, it’s increasingly difficult to provide the same package for Visual Studio 2012, 2013, 2015 and 2017. New Visual Studio APIs only support Visual Studio 2015 and 2017, so rather than providing a new different download for those two versions (there are already 5 download buttons on the Download page!), the add-in in build 8.0.0.189 supports not only Visual Studio 2005, 2008 and 2010 but also Visual Studio 2012 and 2013, and the package no longer support them.

This means that if you are using MZ-Tools for Visual Studio 2012 / 2013 you must:

  • Make a backup of your personal / team options, just in case, although the same location (C:\Users\<user>\AppData\Roaming\MZTools Software\MZTools8\VS) is used for the add-in and for the package.
  • Go to Tools > Extensions and Updates, Installed section, locate MZ-Tools and click the Uninstall button to uninstall the package.
  • Download the add-in setup for MZ-Tools 8.0 for Visual Studio 2005-2013 and install it.

The complete changelog is the following:

MZ-Tools 8.0.0.189 released (August 1, 2018)

  • Changed (VS 2012, 2013): MZ-Tools is now provided as an add-in for VS 2012 and 2013 rather than as a package.
  • Enhanced [#13217] (All): Added support for headers in enum items.
  • Enhanced [#13154] (VB/VBA): Added menu entries for line numbering and indenting to the context menu of the code window.
  • Enhanced [#13168] (All): MZ-Tools ensures now that toolwindows are completely inside some screen when shown.
  • Enhanced [#13144] (All): The Favorite Code Elements toolwindow no longer shows a modal messagebox when a code element is not found. Now it shows the message in a column.
  • Fixed [#12956, #12957] (VB/VBA): The mechanism for keyboard shortcuts introduced in build 8.0.0.180 didn’t work well and has been reverted.
  • Fixed [#11324, #12941] (VB/VBA): The initial indentation of MsgBox statements generared by the MsgBox Assistant was always fixed.
  • Fixed [#12964] (All): Typo in German language in the Task List.
  • Fixed [#12914] (All): MZ-Tools could hang when trying to show an exception dialog if some project reference was invalid or missing.
  • Fixed [#13202] (All): NullReferenceException could happen unloading MZ-Tools.
  • Fixed [#12914] (VB/VBA): The Method Callers feature could take a long time if a referenced type name didn’t have the correct upper/lower case.
  • Fixed [#13066] (VB/VBA): The indenter removed labels that are only numbers.
  • Fixed [#13040] (All): The Switch Assignment feature didn’t work correctly with the comment character inside quotes.
  • Fixed [#12874] (VS): The Find Text feature didn’t locate results if the end point of a result using regular expressions was between the \r and \n characters.
  • Fixed [#12873] (VB/VBA): The type of a member of a UDT was not parsed correctly if it contained a comment or the “New” keyword.
  • Fixed [#12918] (VB/VBA): Declare Sub and Declare Function were not parsed correctly if they contain comment or blank lines before the declaration.
  • Fixed [#12890] (VBA): Updating MZ-Tools from the VBA editor of Outlook caused error “Cannot start Microsoft Outlook. The command line argument is not valid. Verify the switch you are using.”
  • Fixed [#12922] (VBA): MZ-Tools crashed when closing Microsoft Project.
  • Fixed [#13105] (VS): Operations made active inactive .xaml windows.
  • Fixed [Internal] (VB/VBA): The icon of methods (Sub/Function) was not retrieved correctly in the Favorite Code Elements toolwindow.
  • Fixed [Internal] (VS): Declarations of attributes using the characters “{}” were not parsed correctly.
  • Fixed [Internal] (VS 2012/2013/2015/2017): The Insert Headers buttons has been moved to the left of the Insert Header button.
  • Fixed [Internal] (VB/VBA): The Insert Headers operation didn’t insert headers for child members in some cases.
  • Fixed [Internal] (VS): The scope selector did not show the down arrow in the button of ‘Files matching regular expression’ scope.