I had the chance to look into building a Visual Studio .NET add-in this past week. It was quite an interesting experience since I’ve never used add-ins (except for CopySourceAsHtml by Colin Coller :
http://www.jtleigh.com/people/colin/software/CopySourceAsHtml/).
I started by reading the one book that I had quick access to: Writing Add-ins for Visual Studio.Net by Les Smith. From that I managed to throw together a quick prototype of what I wanted my add-in to do.
p>
I didn’t think that building the add-in would be so bad. There’s an extensibility project type that you can choose from and you run the Wizard in order to get going. I wanted the add-in to be in a dockable tool window but I had issues with that. The sample VB code that I found didn’t seem to work quite like the example from Microsoft. (see Creating a Dockable Tool Window in the links below).
From there I decided that I’ll just have a form pop up with the Always on Top property set to True and have my prototype do what had to be done.
I thought I would post the list of resources that I found helpful as well as a few things to keep in mind when creating an app.
Things to watch out for
- Version 2003 add-in won’t work on 2002
- Can’t remember where I saw this but I’m 90 percent sure this is the case.
- Version 2002 add-in requires registry edit to work with 2003
- PRB: Add-ins that you create by using Visual Studio .NET 2002 do not load when you start Visual Studio .NET 2003 http://support.microsoft.com/default.aspx?scid=kb;en-us;823236
- The last add-in installed responds to events and doesn’t pass it along to other Add-Ins
- BUG: Command events fired only to last add-in loaded in Visual Studio .NET http://support.microsoft.com/default.aspx?scid=kb;en-us;555090
Books
Writing Add-ins for Visual Studio.NET
By Les Smith ISBN: 1590590260
Published by Apress in 2002
Web Groups
Yahoo group
http://groups.yahoo.com/group/vsnetaddin/files/
Microsoft Newsgroup
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.vsnet.ide&tid=e1a90319-2b7b-4e25-9954-27843992ebf9&cat=en-us-msdn-visualtools-vsnet&lang=en&cr=US&sloc=en-us&m=1&p=1
Creating a Dockable Tool Window
How do I create custom tool windows
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vstchFAQAboutVSNETAutomation.asp
Other Links
Visual Studio Add-Ins: Hosting A C# UserControl
http://www.devsource.ziffdavis.com/article2/0,1759,1640986,00.asp
http://www.devsource.ziffdavis.com/article2/0,1759,1641413,00.asp
MS Extensibility Center
http://msdn.microsoft.com/vstudio/extend/
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dno97ta/html/faceid.asp
Visual Studio automation examples
http://www.microsoft.com/downloads/details.aspx?FamilyId=EE1C9710-6DF7-4F3F-A5AE-425A478DDEEB&displaylang=en
Automation samples for Visual Studio .NET 2002
http://msdn.microsoft.com/vstudio/downloads/samples/automation2002/
Visual Studio.NET Automation
http://consulting.dthomas.co.uk/ooad_articles_resources/Visual-Studio-dotNET-Automation.pdf
Referencing the DTE Object
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxconreferencingdteobject.asp
Creating Add-Ins and Wizards
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxconcreatingautomationobjects.asp
HOW TO: Create and Load Add-ins in the Visual Studio .NET IDE by Using Visual Basic .NET
Frequently Asked Questions About Visual Studio .NET Automation
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vstchFAQAboutVSNETAutomation.asp
Print | posted on Thursday, March 08, 2007 9:20 PM