Friday, July 03, 2009 - Posts
***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:
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
***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
***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
***Disclaimer: This information applies to Visual Studio 2010 Beta 1 only.***
This post applies to the following Visual Studio 10 Beta 1 extensions:
- MEF component
- 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
-
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

-
Visual Studio will always load it
Pablo
***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:
- There is no package registration with the regpkg utility
- 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
- 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