New Web Form designer for Visual Studio “Orcas”

Visual Studio “Orcas” will feature a new Web Form designer codenamed “Quartz” based on FrontPage technologies replacing the one of Visual Studio 2005 codenamed “Trident” based on IE (MSHTML):

Sapphire: New Web Form designer in Visual Studio Orcas
http://blogs.msdn.com/mikhailarkhipov/archive/2007/01/20/sapphire-new-web-form-designer-in-visual-studio-orcas.aspx

If you have tried to make your Visual Studio add-in to work with WebForms or HTML pages, you know how difficult it is. So, I have opened a suggestion in the Microsoft Connect website for feedback:

Add extensibility support for WebForms/HTML forms in VS Orcas
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=254426

You can visit it and add your vote to my suggestion. Hopefully we can have a better extensibility for Webforms/HTML pages in VS Orcas. The February CTP will be the starting point to test it.

Email this to someoneTweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+

MZ-Tools articles series: HOWTO Locate commandbars in international versions of Visual Studio

If you are developing addins for Visual Studio, you should be aware that there are several localized editions (Spanish, German, French, etc.). This article provides info to take into account when locating commandbars by name in your add-in: 

HOWTO: Locate commandbars in international versions of Visual Studio
http://www.mztools.com/articles/2007/MZ002.htm

Email this to someoneTweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+

More tools for the add-in developer

In a previous post I mentioned several tools that are part of my toolset as an add-in developer. In this post I would like to mention Microangelo, an icon editor that I use to create the icons/pictures for the command buttons of my MZ-Tools add-in. Once created there, I copy and paste them in the image editor of Visual Studio to change the background to almost green (R=0, G=254, B=0) that you must use for command pictures as explained here:

HOWTO: Creating custom pictures for Visual Studio .NET add-ins commands, buttons and toolwindows.
http://www.mztools.com/articles/2005/MZ007.htm

I have been using MicroAngelo since almost 10 years ago, when I started working at my current company where we purchased it. I liked it, so years later I purchased a license of version 5.x for my own use on Windows XP and I used it to create the TrueColor icons of the version of my add-in for VS 2005, which was very easy thanks to the tool (I am not very talented for graphics but I got managed to create some gradients). But several weeks ago I got a new laptop (a very nice Sony Vaio SZ3) and I installed Windows Vista, Office 2007, but alas, the capture feature of Microangelo 5.x did not work. Today I have got a new version 6.0 of Microangelo that is compatible and certified for Windows Vista 🙂

Email this to someoneTweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+

Happy New Year (and MVP again)

It has been several weeks since my last post but December 2006 was a quite hectic month, apart from the Cristhmas I got a LASIK operation for myopia on December 1 and I worked hard to get a new build of my MZ-Tools add-in with many optimizations for January 1. So, Happy New Year!

I also got the MVP title one more year on January 2 so the year could not start better…that means my 4th year as MVP, still in the generic “Visual Basic” category since there is no enough people for a “VS extensibility” category. But it doesn’t matter, I am commited to VS extensibility and this year I do plan to write many more mini articles (HOWTO, BUG, etc.) on my web site that I will announce here.

Email this to someoneTweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+

New commandbars for Visual Studio “Orcas” (maybe)

Microsoft has just published some early specifications (http://msdn2.microsoft.com/en-us/vstudio/aa948851.aspx) about the new Visual Studio “Orcas” and among them, it is the “CommandBar Improvements” (http://download.microsoft.com/download/5/9/c/59cd0dc5-4691-4c3e-840c-66d865f27692/command-bar-improvements.xps) which has an intriguing paragraph:

“The work we will do here will cause us to diverge from Office’s MSO Commmand Bar look and feel. Office 2007 (formerly known as Office “12”), will still use MSO Command Bars in applications such as Outlook. There, for example, customers will still see bubbly, beveled Command Bars. We believe that it is appropriate for Visual Studio to diverge from Office’s Command Bar appearance”

So, it seems that for the first time Visual Studio “Orcas” will not borrow the commandbars from Office, and I don’t know how to feel about that because all add-in developers know that creating commandbars and buttons in Visual Studio is tricky and to give a button a transparent custom picture is, well, I don’t want to get started about this… Also, I have experienced (well, my customers too) random COMExceptions (although very very rarely) creating or destroying commandbars, which are not reproducible and therefore don’t seem to be a problem on the side of the add-in. So, with a new commandbar model it could be that things get worse, or that finally commandbars are easy and problem-free, time will tell, but what is sure is that if those especifications get real, add-in developers will have to test their add-ins since the early CTPs of Orcas with the new commandbars, to report the problems that they find with the new model. Stay tuned!

Email this to someoneTweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+

Visual Studio, add-ins and Windows Vista

Microsoft has a FAQ: Visual Studio and Windows Vista (http://msdn2.microsoft.com/en-us/vstudio/aa948854.aspx) where it is stated that Visual Studio .NET 2002/2003 will not be supported on Windows Vista, and that only VS 2005 will be supported with the SP1 and a (post-SP1) Vista Support Update. I have some comments about this:

The first one is that although .NET Framework 1.x applications will be supported, since an add-in is intended to be hosted inside a Visual Studio IDE, and since VS.NET 2002/2003 will not be supported, there is no need to test an add-in for those IDEs on Windows Vista.

Second, the VS 2005 SP1 will ship soon (maybe December 2006, maybe January 2007) and the Vista Support Update will be released “in the first quarter of 2007” but SP1 will not wait until then because “Delivering great product quality is something that we have always aimed for. We wanted to deliver the update to Visual Studio 2005 as soon as possible to our existing customers”. Given the long delay of the SP1 of previous IDES (VS.NET 2002/2003), it is quite shocking that VS 2005 SP1 can not wait a couple of months and include the Vista Support, because to run VS 2005 on Vista you will have to go through three installations, and it can be a mess.

Email this to someoneTweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+

The Add-In Manager of Visual Studio 2005 got broken…and won’t be fixed for SP1

My MZ-Tools 2005 add-in, like many others migrated from VS.NET 2002/2003 still uses COM registration, rather than XML registration (.AddIn file) and since it wants to be a good citizen in the new Windows Vista operating system, it uses HKEY_LOCAL_MACHINE to register within Visual Studio 2005 so the administrator installing it makes it available to other users of the machine (which may be other than the administrator). Previously I was using HKEY_CURRENT_USER but since I changed to HKEY_LOCAL_MACHINE, I am experiencing a problem that many of you will have seen: the Add-in Manager of VS 2005 does not persist changes in the Startup column if the add-in uses COM registration, even if you are an administrator of the machine.

I investigated this issue in the Microsoft Connect database and to my consternation it was reported twice but either the bug reports were not very clear or the Microsoft team failed to understand the problem so it is still unsolved, I reported it a third time, very clearly (I hope) but MS has answered that there is no time to fix it for SP1. So, if your add-in is affected by this problem take a look and vote for the bug to get it fixed for SP2 or VS “Orcas”:

http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=238492

Email this to someoneTweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+

Common newbie questions asked in the forums

I have been visiting forums about Visual Studio extensibility since year 2002 or so, and it is almost a law that if you are a newbie starting in this world of add-ins, you will have to ask the same questions that others before you because you don’t know the basics or you find an unexpected behavior. So, I have written many HOWTO, INFO, BUG and PRB articles on my web site but here are the most popular.

If you only have time to read one of the articles, this is the most popular one:

HOWTO: Adding buttons, commandbars and toolbars to Visual Studio .NET from an add-in
http://www.mztools.com/articles/2005/MZ003.htm

Chances are that if you are writting an add-in, you will need a command and a button and likely a set of them so you will want a toolbar. Alas, commands, buttons and commandbars are the most difficult part of writing add-ins, so ensure that you understand how they work. The question is so complex that there are several related articles at the end of that one, so I won’t repeat them here.

If you are working with C#, then ensure that you read this one:

PRB: Visual Studio .NET events being disconnected from add-in.
http://www.mztools.com/articles/2005/MZ012.htm

Because again, chances are that you will want to capture events, and if you don’t do it correctly, you will capture them for a while but at some point you won’t capture them. VB.NET developers are more fortunate and thanks to the WithEvents keyword they don’t incurre in the pitfall described in the article.

Before I said that creating commands, buttons, and toolbars is the most difficult task and now I realize that I lied. Or at least, partially. The most difficult task is to put a custom picture in a button, and once you think that you have got it, you are only half way, because, of course, you want it transparent and sometimes you get it green, or magenta, or gray. Somehow, Microsoft have managed to do this incredibly painful since VB5 back in 1997 and it is yet painful in 2005 with VS 2005 and I wish it was so easy as to pass a .NET managed icon (icon, which support transparency, not bitmap) but I have no hope for VS “Orcas” in 2007 ten years later so get familiar with the lime green and magenta colors, a resource editor, a satellite dll and here we go:

HOWTO: Creating custom pictures for Visual Studio .NET add-ins commands, buttons and toolwindows
http://www.mztools.com/articles/2005/MZ007.htm

If you want to work with Windows Forms controls from an add-in, you need to meet a new (foreign) guy in town, the PropertyDescriptor type:

HOWTO: Manipulating controls of Windows forms from Visual Studio .NET add-ins.
http://www.mztools.com/articles/2005/MZ001.htm

If you are just creating macros (not even add-ins) to navigate your code (projects or code elements), again a tricky proposition, here are the ones that you need:

HOWTO: Navigate the files of a solution from a Visual Studio .NET macro or add-in.
http://www.mztools.com/articles/2006/MZ004.htm

HOWTO: Navigate the code elements of a file from a Visual Studio .NET macro or add-in
http://www.mztools.com/articles/2006/MZ008.htm

Sometimes you want to work with the references of a project but, alas, they don’t appear in the EnvDTE namespace. Did Microsoft omit them? No, but they are a little hidden:

HOWTO: Getting information specific to VB.NET and C# projects from an add-in or macro.
http://www.mztools.com/articles/2005/MZ011.htm

And finally this one also appears from time to time: how do I create a tabbed window (like a document window) from an add-in? Well, a toolwindow will do the trick:

HOWTO: Understanding toolwindow states in Visual Studio
http://www.mztools.com/Articles/2006/MZ025.htm

And of course, you have lots more here:
http://www.mztools.com/resources_vsnet_addins.htm

Email this to someoneTweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+

VS SDK, packages, add-ins, macros and more…