Calling Marshall.ReleaseComObject

February 21, 2014

If you ever develop COM add-ins for the VBA editor (or for some Office application), you may find that sometimes you need to call Marshall.ReleaseComObject (when you get strange errors that disappear when calling Marshall.ReleaseComObject) and most of the time (by default) you don’t have to (when you get an InvalidComObjectException). The issue is a […]


MZ-Tools Articles Series: HOWTO: Create a project item from a Visual Studio add-in

February 19, 2014

A question in the MSDN VSX forum has reminded me that I had pending to write this article about how to add new project items (files) to a project or folder, either from a template or existing (and in turn copied or linked): HOWTO: Create a project item from a Visual Studio add-in http://www.mztools.com/articles/2014/MZ2014009.aspx This […]


The strange case of VS 2010 Macros stop working after February 2014 Windows Update

February 19, 2014

I have noticed today that VS 2010 macros stopped working. Fortunately the cause is known (a security patch of Windows Update) and there is a workaround. See: Visual Studio 2010 Macros Stop Working after February 2014 Windows Update http://visualstudioextensions.vlasovstudio.com/2014/02/13/visual-studio-2010-macros-stop-working-after-february-2014-windows-update/ and http://social.msdn.microsoft.com/Forums/vstudio/en-US/590abd1d-2faa-4a35-9b9c-fe404406d6cd/what-the-visual-studio-2010-macros-not-working-after-windows-update


The strange case of VBA editor prompting to repair Visual Studio (again)

February 9, 2014

On one of my computers I have started to suffer again the strange case of a prompt to repair Visual Studio 2010 when launching the VBA editor of any Office application. I already posted about this back in 2012 when I learned that a cause for that issue was having an external hard drive connected […]


MZ-Tools Articles Series: BUG: DTE.ActiveWindow.ProjectItem.Document null for files in Solution Items folder.

February 5, 2014

This is a small bug in the automation model (EnvDTE) that I discovered yesterday when a customer of my MZ-Tools add-in reported a NullReferenceException when sorting code elements in a file outside a project: BUG: DTE.ActiveWindow.ProjectItem.Document null for files in Solution Items folder. http://www.mztools.com/articles/2014/MZ2014008.aspx And here it is the bug report that I have opened […]


MZ-Tools Articles Series: HOWTO: Navigate the files of a solution using the IVsHierarchy interface from an add-in.

February 1, 2014

Continuing with the use of the native IVsHierarchy interface when using add-ins, if in my last article I showed how to get the IVsHierarchy and Item Id of EnvDTE.Project and EnvDTE.ProjectItem, in this new one I show how to navigate the Solution Explorer using that interface instead of the automation model: HOWTO: Navigate the files […]