It’s about time: MZ2005003 article (HOWTO: Adding buttons, commandbars and toolbars) revisited and with C# code

March 25, 2009

A long overdue task I had was to revisit the most popular article of the MZ-Tools Articles Series of my web site and provide the samples in C# code: HOWTO: Adding buttons, commandbars and toolbars to Visual Studio .NET from an add-in http://www.mztools.com/articles/2005/MZ2005003.aspx It happened that many developers didn’t bother to read or try the […]


The strange case of <Unknown Error> 8013150A loading a Visual Studio add-in

March 24, 2009

Visual Studio add-ins are not very friendly when trying to auto-update them (at least as of Visual Studio 2008), so when deploying an add-in for internal use within an organization, one creative idea is to put the assembly dll in a shared network folder and register the add-in from there in each computer without copying […]


More on new project type Guids or flavors and how to get them

March 16, 2009

Some days ago I wrote about testing a Visual Studio add-in against new Visual Studio tools or extensions from Microsoft. I have been testing my MZ-Tools add-in and I have had to make it aware of those new project types, mainly to display correctly the project/file icons in some features. I wrote long time ago […]


MZ-Tools Articles Series: BUG: Infinite recursion in add-in causes Visual Studio crash

March 16, 2009

This bug that I commented in a previous blog entry and that I reported to Micorosoft through Microsoft Connect is not going to be fixed in the next version VS 2010: Add-in causing stack overflow causes “Microsoft Visual Studio has encountered a problem and needs to close” https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=414301 So, there will be three versions of […]


MZ-Tools Articles Series: INFO: Testing a Visual Studio add-in against new Visual Studio tools or extensions from Microsoft

March 13, 2009

When you create your Visual Studio extension, whether an add-in or package, likely you test it most of the time against project types provided by Visual Studio out of the box, such as VB.NET/C# projects, smartdevice projects, database projects, etc. Long time ago I wrote an article warning that likely add-ins fail throwing exceptions when […]


Inspecting COM Objects With Reflection

March 11, 2009

Long time ago I wrote about HOWTO: Know the actual type behind a System.__ComObject type returned by an .Object property since chances are that you are going to find System._ComObject when using Visual Studio automation (because internally it’s all COM). Last January 2009 Lucian Wischik, the Visual Basic Specification Lead, wrote an article in MSDN […]


MZ-Tools Articles Series: HOWTO: Prevent dead CommandBarButtons when Visual Studio or an add-in crashes

March 10, 2009

This is another problem that was bugging me for quite some time: if an add-in uses a temporary user-interface rather than a permanent one when adding buttons to a built-in toolbar of Visual Studio, the add-in must remove the buttons when unloaded, typically keeping a reference to the CommandBarButton instance and calling the CommandBarButton.Delete method […]


The strange case of ProjectItem.Open(EnvDTE.Constants.vsext_vk_Designer) trying to check-out a form file

March 9, 2009

Today I have solved a problem that was bugging me for months. I was aware of it but I hadn’t paid much attention to it (because I knew it was not a problem of my MZ-Tools add-in) until today, when I decided to take a closer look. The problem was the following: whenever I executed […]


MZ-Tools Articles Series: BUG: ProjectItem.Open(EnvDTE.Constants.vsext_vk_Designer) restores Visual Studio 2005/2008 from minimized state

March 5, 2009

Suppose that you have an add-in, like my MZ-Tools add-in, that has a feature that needs to open (invisibly) each form of a project to (do some review, modify some properties of controls, etc.). In that case you need to call ProjectItem.Open(EnvDTE.Constants.vsext_vk_Designer) to get the EnvDTE.Window, which remains invisible (you would have to call Window.Visible […]


Announcing the revised MZ-Tools Articles Series with C# samples and more

March 2, 2009

One of the initiatives that I want to accomplish this year 2009 is to revise and update all the more than 125 articles that I have written all these years since 2004 in the MZ-Tools Articles Series to include the following: Samples in C#.  I have provided all the samples in the articles in VB.NET […]