Extending visual studio 2003
Download
1 / 17

Extending Visual Studio 2003 - PowerPoint PPT Presentation


  • 132 Views
  • Updated On :

Extending Visual Studio 2003. Building a VS Add-in. Visual Basic Pro User Group May 6, 2004. Who Am I?. Paul Sturgill Psturgill@Commonwealth.com Commonwealth Financial Network Language of choice: VB.NET . Agenda. How can we extend VS 2003? Automation Object Model

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Extending Visual Studio 2003' - yamin


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Extending visual studio 2003 l.jpg

Extending Visual Studio 2003

Building a VS Add-in

Visual Basic Pro User Group

May 6, 2004


Who am i l.jpg
Who Am I?

  • Paul Sturgill

    • Psturgill@Commonwealth.com

    • Commonwealth Financial Network

    • Language of choice: VB.NET

Paul Sturgill - Building a Visual Studio Add-in


Agenda l.jpg
Agenda

  • How can we extend VS 2003?

  • Automation Object Model

  • What makes VS 2003 extensible?

  • Demos

  • Extensibility future – VS 2005 features

  • Creating your own extensible application

Paul Sturgill - Building a Visual Studio Add-in


Introduction l.jpg
Introduction

  • How can we extend Visual Studio 2003?

    • What are our options?

  • VS Add-in is a COM component

    • DTE is a COM wrapper

Paul Sturgill - Building a Visual Studio Add-in



What makes vs extensible l.jpg
What makes VS extensible?

Interfaces!!

Paul Sturgill - Building a Visual Studio Add-in


Interfaces l.jpg
Interfaces

  • Extensibility.IDTExtensibility2

    • OnAddInsUpdate – List of add-ins change

    • OnBeginShutdown – IDE shuts down

    • OnStartupComplete – IDE startup complete

    • OnDisconnection – Add-in unloads from IDE

    • OnConnection – Add-in is loaded into IDE

  • IDTCommandTarget

    • Exec – invokes Add-in behavior (menu item)

    • QueryStatus – listing available add-ins

Paul Sturgill - Building a Visual Studio Add-in


Nevb demo add in l.jpg
NEVB Demo Add-in

  • Features:

    • Code manipulation

    • IDE Event tracking

    • Launched Window application

    • Tool Window

Paul Sturgill - Building a Visual Studio Add-in


Start demos l.jpg
Start Demos

Paul Sturgill - Building a Visual Studio Add-in


Visual studio 2005 whidbey l.jpg
Visual Studio 2005 (Whidbey)

  • Main goal is less COM

  • No more Regsvr32

  • Use XML file to define an Addin

  • No more shim control for Toolwindow

    • New CreateToolWindow2 method

  • Toolbar accepts different types of controls

    • Combo box, checkbox, etc… not just buttons

Paul Sturgill - Building a Visual Studio Add-in


3 steps to creating pluggable software l.jpg
3 Steps to creating Pluggable Software

Define Common Interface

Implement Interface

Create hosting application

Paul Sturgill - Building a Visual Studio Add-in


Define custom interface l.jpg
Define Custom Interface

Public Interface ICustomAddin

Function Start() as Boolean

Function Stop() as Boolean

End Interface

*Equivalent to IDTExtensibility2 Interface

Paul Sturgill - Building a Visual Studio Add-in


Implementation of interface l.jpg
Implementation of Interface

Public Class MyCustomAddin

Implements ICustomAddin

Public Function Start() as Boolean Implements ICustomAddin.Start

‘ Do something here when the add-in starts

End Function

Public Function Stop() as Boolean Implements ICustomAddin.Stop

‘ Do something here when the add-in stops

End Function

End Class

*Equivalent to custom VS Add-in

Paul Sturgill - Building a Visual Studio Add-in


Hosting application l.jpg
Hosting Application

Dim assem As Reflection.Assembly = Reflection.Assembly.LoadFrom(“c:\plugins\mycustomplugin.dll”)

Dim oAddin As Object

Dim iAddin As PluginLibrary.iCustomAddin

oAddin = assem.CreateInstance(“MyCustomAddin.MyCustomAddin”)

iAddin = CType(oAddin, PluginLibrary.ICustomAddin)

iAddin.Start()

* Equivalent to Visual Studio as a hosting application

Paul Sturgill - Building a Visual Studio Add-in


Summary l.jpg
Summary

  • VS Extensibility

    • Macros

    • Add-ins

    • VSIP – Visual Studio Industry Partner

  • Visual Studio 2005 enhancements

  • Add-in contest runs to 5/31/2004

    http://weblogs.asp.net/rosherove/

Paul Sturgill - Building a Visual Studio Add-in


Where to get more information l.jpg
Where to Get More Information

  • Microsoft VSIP Program

    • http://msdn.microsoft.com/vstudio/extend/

  • Writing Add-Ins for Visual Studio .NET

    • Les Smith (Apress)

  • Yahoo User Group

    • http://groups.yahoo.com/group/vsnetaddin/

  • Microsoft Sample Downloads

    • http://www.microsoft.com/downloads/details.aspx?FamilyId=EE1C9710-6DF7-4F3F-A5AE-425A478DDEEB&displaylang=en

Paul Sturgill - Building a Visual Studio Add-in


Feedback l.jpg
Feedback

  • Please send feedback to Psturgill@Commonwealth.com

Paul Sturgill - Building a Visual Studio Add-in