http://blogs.clariusconsulting.net/pga

Pablo Galiano's Blog

Go Back to
pga′s Latest post

VS10 Beta 1 / The ‘pga’ instance


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

 

Creating a custom instance/hive for Visual Studio is easier than ever. In this post I will show the details to create a fictitious “pga” instance and configure our VSX development environment to point to it.

This can be useful in some testing scenarios or when we just don’t want to reset the experimental instance to test something.

 


Creating the pga instance

To create a new instance we use the CreateExpInstance tool:

%VSSDK_Installdir%\VisualStudioIntegration\Tools\Bin\CreateExpInstance.exe /Reset /VSInstance=10.0 /RootSuffix=pga

Once we do that the following directory is created:

%LocalAppData%\Microsoft\VisualStudio\10.0pga\Extensions\

And all existing extensions in the main hive are copied to:

%LocalAppData%\Microsoft\VisualStudio\10.0pga\Extensions\Extensions-10.0


Redirecting the VS SDK msbuild target to the pga instance

Every time that we compile a VSPackage project the Microsoft.VsSDK.targets msbuild target is executed doing all the necessary steps to deploy our extension.

But the default behavior is to deploy the extension under the experimental instance. To override that behavior we need to include the following property in the VSPackage csproj file:

<PropertyGroup>
  <VSSDKTargetPlatformRegRootSuffix Condition="'$(VSSDKTargetPlatformRegRootSuffix)' == ''">pga</VSSDKTargetPlatformRegRootSuffix>
</PropertyGroup>

 


Executing VS pointing to the pga instance

To point Visual Studio to a particular instance we just use the /rootSuffix switch:

%VS_Installdir%\devenv.exe /rootSuffix pga

Or we can just enable the F5 experience from the Debug tab in the project properties:


image

 

Pablo

Comments