Pablo Galiano : Friday, July 03, 2009 - Posts

Subscriptions

<March 2010>
SuMoTuWeThFrSa
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910

News

Subscribe to Pablo Galiano by Email

Post Categories

Friday, July 03, 2009 - Posts

VSIX deployment

***Disclaimer: This information applies to Visual Studio 2010 Beta 1 only.***

 

Quan already wrote a great post that explain what VSIX is. In this post I will covered the details of VSIX deployment.

 

When we double click a VSIX file from windows explorer the following dialog is shown:

 

image

 

This is because the .vsix extension is registered within the windows shell. As part of that registration there is also information about which program to launch when we double click a VSIX file. And that executable is the VSIXInstaller and it is located under %VS10_Install_Dir%\Common7\IDE\VSIXInstaller.exe

The VSIXInstaller tool uses the Microsoft.VisualStudio.ExtensionManager.IVsExtensionManager service to install the extension, which perform the following steps:

  • It unzips the content of the VSIX file under %LocalAppData%\Microsoft\VisualStudio\10.0\Extensions\%Extension_Author%\%Extension_Name%\%Extension_Version%.
  • It adds registry information under HKCU\Software\Microsoft\VisualStudio\10.0\ExtensionManager\EnabledExtensions to enable the extension in Visual Studio. 

Depending on the extension content type a Visual Studio restart will be needed. This is the case for MEFComponent and VSPackage content types.

 

Stay tuned,

Pablo

posted Friday, July 03, 2009 8:36 AM by pga with 6 Comments

VS10 beta 1- No more PLKs

***Disclaimer: This information applies to Visual Studio 2010 Beta 1 only.***

 

Visual Studio 2010 no longer requires you to create a Package Load Key (PLK) for deploying a VSPackage extension.

For Isolated Shell applications the Shell Load Key (SLK) requirement has also been removed.

 

Great news and less pain debugging PLKS!!!

Pablo

posted Friday, July 03, 2009 7:05 AM by pga with 0 Comments

VS10 beta 1 - No more Devenv /Setup

***Disclaimer: This information applies to Visual Studio 2010 Beta 1 only.***

 

Visual Studio look and monitors the following folders for pkgdef files:

%LocalAppData%\Microsoft\VisualStudio\10.0\Extensions

%VS10_Install_Dir%\Common7\IDE\Extensions

%VS10_Install_Dir%\Common7\IDE\CommonExtensions

These locations are defined in the %VS10_Install_Dir%\Common7\IDE\devenv.pkgdef file.

Every time that Visual Studio starts, it looks for pkgdef files in these folders and merges them in the registry automatically. The last thing that happens is a devenv / setup (if needed). All of this is being done behind the scenes and it is completely transparent to the user.

 

Pablo

posted Friday, July 03, 2009 7:04 AM by pga with 0 Comments

VS10 beta 1 - User extensions versus Trusted extensions

***Disclaimer: This information applies to Visual Studio 2010 Beta 1 only.***

 

This post applies to the following Visual Studio 10 Beta 1 extensions:

  1. MEF component
  2. VSPackage

 

Visual Studio looks for extensions in the following folders:

  • %LocalAppData%\Microsoft\VisualStudio\10.0\Extensions (user extension)
  • %VS10_Install_Dir%\Common7\IDE\Extensions  (VS trusted extension)
  • %VS10_Install_Dir%\Common7\IDE\CommonExtensions (VS trusted extension)

 

Depending on where we deploy our extension, it will be an user extension or a VS trusted extension.

User extension

  • It can be enabled / uninstalled from the extension manager window

image

  • Visual Studio will only load the extension if it is enabled in the extension manager
    • HKCU\Microsoft\VisualStudio\10.0\ExtensionManager\EnabledExtensions

VS trusted extension

  • It cannot be enabled / uninstalled from the extension manager window

 image

  • Visual Studio will always load it

 

Pablo

posted Friday, July 03, 2009 11:57 AM by pga with 284 Comments

VS10 beta 1 - the Microsoft.VsSDK.targets revisited

***Disclaimer: This information applies to Visual Studio 2010 Beta 1 only.***

 

The first that you notice when compiling a VS package project is that the compilation is really *fast*. Really much faster than compiling an VS 2008 VS package.

This is mainly because of two important changes in a VS package registration:

  1. There is no package registration with the regpkg utility
  2. There is no devenv /setup execution

 

The updated VS SDK msbuild targets now include the following list of actions in order to support the F5 experience:

  • If a VSCT is present in the VS package project
    • Compile VSCT
    • Embed CTO
  • Create pkgdef file
  • Create VSIX manifest file
  • Create VSIX file which includes
    • Project assembly
    • Project references
    • pkgdef file
    • VSIX manifest
    • All items with build action set to “Content”
  • Deploy VSIX to user extensions
    • It is deployed under %LocalAppData%\Microsoft\VisualStudio\10.0Exp\Extensions\%Company%\%Package_Name – Package_Guid%\%Package_Version%
  • Enable the extension
    • The key HKCU\Microsoft\VisualStudio\10.0Exp\ExtensionManager\EnabledExtensions\%Company%\%Package_Name – Package_Guid%\%Package_Version% is written

 

After the VS project is compiled you can hit F5 within VS and another instance of VS (pointing to the experimental hive) will start and our extension will be there, enabled and ready to run.

 

Pablo

posted Friday, July 03, 2009 8:28 AM by pga with 0 Comments