***Disclaimer: This information applies to Visual Studio 2010 Beta 1 only.***
One of the first new things that you notice when running VS10 for the first time is the new “New Project” dialog.
In this post I will describe how we can tweak a VSIX project template extension to show the information in the dialog.
I will use as a sample the VSIX template extension that I created for MEF VSIX projects.
The information in the new dialog comes from the vstemplate file, but instead of describing the mapping, I think that a picture is worth a thousand words:
As you can see from the picture, the ProjectType node in the vstemplate file, defines the category (Visual C#) in the tree on the left.
But how the template is being added under the “Extensibility” node in the tree?
Let’s take a look at the VSIX deployment installation folder:
%LocalAppData%\Microsoft\VisualStudio\10.0\Extensions\Pablo Galiano\MEF VSIX Project template\1.0\MEFVSIXProject\Extensibility
Every subfolder below \MEFVSIXProject is rendered as node in the tree. If we have for example:
%LocalAppData%\Microsoft\VisualStudio\10.0\Extensions\Pablo Galiano\MEF VSIX Project template\1.0\MEFVSIXProject\Pablo\Galiano
Pablo
I just created a new site in the Code Gallery that centralizes all the VSIX samples that I will create from now on.
The first sample uploaded is the source code of the MEF VSIX project template that I described in a previous post.
Enjoy,
Pablo
***Disclaimer: This information applies to Visual Studio 2010 Beta 1 only.***
Let’s say that we want to deliver our extension with a installer. How we can easily deploy our VSIX?
The VSIXInstaller tool supports the /quiet switch. That means that we can just have a custom action that calls the tool from within our msi:
<Property Id="VSINSTALLDIR">
<RegistrySearch Id="VSInstallRegistry" Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\10.0" Name="InstallDir" Type="directory" />
</Property>
<CustomAction Id="SetVSIXInstaller" Return="check" Execute="immediate" Property="VSIXInstaller" Value="[VSINSTALLDIR]VSIXInstaller.exe" />
<CustomAction Id="DeployVSIX" Property="VSIXInstaller" Execute="deferred" Impersonate="no" ExeCommand="/quiet" Return="asyncWait"/>
<InstallExecuteSequence>
<Custom Action="Set_SetVSIXInstaller" After="ValidateProductID">VSIXInstaller=""</Custom>
<Custom Action="DeployVSIX" After="MsiPublishAssemblies" />
</InstallExecuteSequence>
Pablo