Browse DevX
Sign up for e-mail newsletters from DevX


Deconstructing Add-In Architecture in Visual Studio .NET : Page 7

The Visual Studio .NET extensibility model included with the IDE allows any developer to design and compile value-adding custom add-ins right out-of-the-box. No additional APIs or tools are required. Visual Studio .NET even provides a starting point for add-in developers with the Visual Studio .NET Add-In Project type.




Building the Right Environment to Support AI, Machine Learning and Deep Learning

Using the Add-in Wizard
Developing your first add-in from scratch will be a very useful exercise. Visual Studio .NET provides a Visual Studio .NET Add-In Project type shown in Figure 3. This project type will invoke a wizard that will ask you several common questions about the nature of the add-in you are about to develop. The questions are basic and will be used to customize the most common elements an add-in will need. The nicest thing about this wizard is that it will also create a Visual Studio .NET Setup Project that includes all the necessary registry entries shown in Figure 5. Several pages of the wizard will collect simple data points that map directly to assorted registry entries. Page 1 of this wizard will ask which language you need to use, impacting the final output of this wizard. Page 2 will ask if your add-in should be available to Visual Studio .NET and/or the Macros IDE. Your answer on this page will impact only the registry path the \AddIns subkey modifications will impact. You should modify these settings post-wizard by changing the registry settings the generated Setup Project will add to the target system upon installation. Page 3 will ask for a name and description for your add-in. Visual Studio will use these values to populate the FriendlyName and Description values for your add-in. Page 5 will provide you an option to include an About box information. Choosing yes will result in AboutBoxIcon and AboutBoxDetails values being included in your add-in's registry subkey.

The only slightly interesting options will be presented on Page 4 of the Add-In wizard shown in Figure 8. You will be given four options on Page 4. Check the option, "Yes, create a Tool's menu item," if you want the wizard to provide base implementation code for the IDTCommandTarget interface and have a named command declared by your add-in by code placed in the IDTExtensibility2.OnConnection method. You should check this option, as it will provide you a good starting point that you can tweak to modify command bars other than "Tools."

Michael Lane Thomas  , also known as the .NET Cowboy for his sometimes untamed, Wild West-style passion for .NET, has been a fixture in the development community for many years. A speaker at professional, academic, and Microsoft-internal technical conferences, Michael has been a primary contributor to 26 books, including a multi-year stint as .NET Series Editor for Wiley's/Hungry Minds, going back to the beta days of .NET. Michael has spent time as industry analyst, commentator, and co-host of a weekly radio talk show. At last count, Michael had the distinction of being the 8th-most certified MCP in the world, passing a total of 61 exams at last count. Michael is currently a Developer Evangelist for Microsoft and is greatly enjoying exploring the Alpha bits for Whidbey as a Microsoft VS .NET Insider. You can reach him at mlthomas@microsoft.com.
Thanks for your registration, follow us on our social networks to keep up-to-date