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
    Thermalright Archon SB-E Cooler Review (Part 3)
    Thermalright Archon SB-E Cooler Review (Part 2)
    Thermalright Archon SB-E Cooler Review (Part 1)
    Acer CloudMobile - Ambitious Android Phone (Part 3)
    Acer CloudMobile - Ambitious Android Phone (Part 2)
    Acer CloudMobile - Ambitious Android Phone (Part 1)
    Huawei MediaPad 10 Tablet Review (Part 2)
    Huawei MediaPad 10 Tablet Review (Part 1)
    Mymemory.com - Calendars And Picture Books Review (Part 2)
    Mymemory.com - Calendars And Picture Books Review (Part 1)
    Most View
    SQL Server 2008 : Using ADO.NET Data Services
    Last Call For Blackberry? (Part 1)
    Rise Of The Mobile Processors (Part 2)
    Review: In Win Xframe – Unique open-frame chassis
    Xen Virtualization : Installing Xen from Binary Packages
    Acer CloudMobile - Ambitious Android Phone (Part 1)
    Is The Personal Blog Dead? (Part 2) - Going Mainstream
    AMD Radeon HD 7970 - The World's Fastest Single-GPU (Part 2)
    On The Origin Of PCs
    Hacking - Tools of the Trade
    Cameras Just Out – December 2012
    Safeguarding Confidential Data in SharePoint 2010 : Using SQL Transparent Data Encryption (TDE)
    SQL Server 2008 : Working with Multiple-Source Queries - OpenQuery, OpenRowSet, and OpenDataSource Explained
    Palicomp Alpha Blade – Affordable overclocked Gaming Rig
    Adobe Premiere Elements 11.0 - Video Editing Software
    Panasonic Lumix GH3 – The Fastest Touchscreen-Camera (Part 1)
    What To Look For When Buying A New Phone Or Tablet (Part 10)
    Touch and Go (Part 1)
    Windows 8 - Microsoft’s Silver Bullet (Part 1)
    Windows 7 : Installing and Configuring Windows Media Center Using the Wizard