ENTERPRISE

Visual Studio 2010 : Introducing the Visual Studio Extensibility - Deploying Visual Studio Extensions

6/9/2012 4:47:02 PM
Among new features in the Visual Studio extensibility, deploying extensions also changes. Microsoft introduces a new file type named VSIX (with .vsix extension) for packaging deploying Visual Studio extensions. This new format is intended as a replacement for the previous .vsi file format first introduced with Visual Studio 2005. Basically a VSIX package is nothing but a zip archive that is built with regard to the open packaging convention. This means that if you rename the .vsix package into .zip, you can browse its content with any compression tool supporting zips. This kind of package needs to store some other files:
  • A [Content_Types].xml file that describes the archive content according to the open packaging convention

  • An extension.vsixmanifest file storing information on the extension and on how it will be deployed

  • Binary files for the extension (set named product payload)

  • Support files, such as license, icons, and so on

VSIX packages cannot deploy add-ins, macros, and code snippets, whereas they can deploy any other kind of extensions. You can also deploy extensions via Windows Installer packages; this is preferable when you need to accomplish specific requirements such as installing assemblies to the GAC or writing to the Registry. For all other cases, VSIX packages are a good thing.

Deploying Add-Ins and Code Snippets

Because you cannot deploy Visual Studio add-ins and code snippets with Vsix packages, you still need to build a .vsi package or recur to Windows Installer projects.


There are also some other good reasons for preferring VSIX packages. First, they can check for updates. Second, they can be uploaded to the Visual Studio Gallery so that other developers can download your extension directly from the Visual Studio Extension Manager. (Another good reason is that you do not need to edit a VSIX package manually. Visual Studio offers an integrated designer for creating VSIX packages directly into the current project. Continuing the previous example, double-click the source.extension.vsixmanifest file in Solution Explorer. This file is added to each extensibility project at creation time and is the deployment manifest for the extension. Once this is done, Visual Studio 2010 looks like Figure 1.

Figure 1. Customizing properties for the deployment package.

With the exception of the ID field, which is filled by Visual Studio, you just need to fill blank and self-explanatory fields with custom values, as Figure 57.8 exemplifies. It is worth mentioning that VSIX packages are localizable (check out the Locale combo box) and can target multiple editions of Visual Studio (click the Select Editions button). You can also specify a license agreement (License Terms field) adding an existing text file or RTF file. The References group simply enables specifying other extensions that the current one depends on. To build the deployment package, simply build the project. The VSIX package is now available in the project output folder (Bin\Debug or Bin\Release). With regard to the previous example, the package is named SnippetCompilerVSPackage.Vsix. If you double-click such a file, you will be prompted with some information before installation begins, as represented in Figure 2.

Figure 2. Installing the new custom extension.


By clicking Install, the new custom extension will be available onto the target system. This means that you simply need to deploy the VSIX package and you are done.

Other  
  •  Visual Studio 2010 : Introducing the Visual Studio Extensibility - Building a Visual Studio Package
  •  Advanced FAQ Corner, May 2012
  •  The drive toward DSLs : Taking a DSL apart—what makes it tick?
  •  The drive toward DSLs : Choosing between imperative and declarative DSLs
  •  Visual Studio Team System 2008 : Creating new report (part 2)
  •  Visual Studio Team System 2008 : Creating new report (part 1) - Report server project
  •  Visual Studio Team System 2008 : TFS reports for testing - Bugs
  •  Extra Network Hardware Round-Up (Part 3)
  •  Extra Network Hardware Round-Up (Part 2) - NAS Drives, Media Center Extenders & Games Consoles
  •  Extra Network Hardware Round-Up (Part 1)
  •  Networking Jargon Explained (Part 2)
  •  Networking Jargon Explained (Part 1)
  •  The Micro Revolution
  •  Computing Yourself Fit (Part 4)
  •  Computing Yourself Fit (Part 3)
  •  Computing Yourself Fit (Part 2)
  •  Computing Yourself Fit (Part 1)
  •  Touch Interaction - Multi-Touch: An Evolution
  •  Think the Brighter Side to Piracy
  •  These Companies Would Still Be Here In 5 Years
  •  
    Top 10
    Windows Server 2003 : Managing and Implementing Disaster Recovery - Fundamentals of Backup
    Microsoft .NET : Design Principles and Patterns - From Principles to Patterns (part 2)
    Microsoft .NET : Design Principles and Patterns - From Principles to Patterns (part 1)
    Brother MFC-J4510DW - An Innovative All-In-One A3 Printer
    Computer Planet I7 Extreme Gaming PC
    All We Need To Know About Green Computing (Part 4)
    All We Need To Know About Green Computing (Part 3)
    All We Need To Know About Green Computing (Part 2)
    All We Need To Know About Green Computing (Part 1)
    Master Black-White Copying
    Most View
    Programming WCF Services : Queued Services - Transactions
    Managing Exchange Server 2010 : The Exchange Management Console
    The 50 Best Headphones You Can Buy (Part 4)
    Play It Smart (Part 2) - Western Digital WD TV Live, Apple TV, D-Link Boxee Box
    All in One - The iDevice To Rule Them All
    Understanding Network Access Protection (NAP) in Windows Server 2008 R2
    WCF Services : Data Contract - Hierarchy
    Building LOB Applications : Databinding in XAML
    Windows System Programming : File Pointers & Getting the File Size
    OS X Mountain Lion: What’s New - The System (Part 4)
    Exploring the T-SQL Enhancements in SQL Server 2005 : Exception Handling in Transactions
    Amiga – Amiga on the web
    Personalizing Windows 8 : Tweaking Your Touch Experience
    Samsung LED Monitor With 170 Degree Viewing Angle
    System Center Configuration Manager 2007 : Developing the Solution Architecture (part 4) - Capacity Planning,Site Boundaries,Roaming
    The ASP.NET AJAX Control Toolkit (part 2) - The Accordion
    Writing 64-Bit Applications for Windows 7 (part 2)
    Create, Read, and Write a Binary File
    Windows Server 2003 : Building a Nameserver (part 1) - Enabling Incremental Transfers, Entering A Records into a Zone, Entering and Editing SOA Records
    BenQ Joybee GP2 Mini Projector - Compact HD-ready projection