<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Developer Support Blog for Visual Studio Extensibility</title><subtitle type="html" /><id>http://blogs.msdn.com/b/dsvst/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/dsvst/" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/b/dsvst/atom.aspx" /><generator uri="http://telligent.com" version="5.6.50428.7875">Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><updated>2009-10-13T13:07:43Z</updated><entry><title>Your VS Package may not load after porting it to VS 2012</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/dsvst/archive/2012/10/08/your-vs-package-may-not-load-after-porting-it-to-vs-2012.aspx" /><id>http://blogs.msdn.com/b/dsvst/archive/2012/10/08/your-vs-package-may-not-load-after-porting-it-to-vs-2012.aspx</id><published>2012-10-08T22:20:00Z</published><updated>2012-10-08T22:20:00Z</updated><content type="html">&lt;p&gt;With VS 2010, the IDE recreates the user's 10.0_Config registry hive and remerges menu resources when it detects a change under HKLM\Software\Microsoft\VisualStudio\10.0. For VS 2012, the IDE team felt this had too much of a negative effect on startup performance, and the feature was removed.&lt;/p&gt;
&lt;p&gt;Consequently, if you deploy your VS Package(s) with a custom setup/installer, your installer must run &lt;strong&gt;devenv.exe /setup&lt;/strong&gt; to ensure the registry changes you add under HKLM\Software\Microsoft\VisualStudio\11.0, are propagated to the users 11.0_Config hive.&lt;/p&gt;
&lt;p&gt;The only exception to this is when you deploy your package via VSIX. Packages installed by the VSIXInstaller, do not have this requirement.&lt;/p&gt;
&lt;p&gt;Therefore, if you find your package does not load under VS 2012, and running devenv.exe /setup fixes the problem; you are in good company. I have seen a number of partners (internal and external) that have encountered this problem.&lt;/p&gt;
&lt;p&gt;There is mention that this is a requirement in the documentation link below, but in the absence of a "What's New/Changed" topic for the VS SDK, that can be very easy to overlook.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb166419.aspx"&gt;Commands That Must Be Run After Installation&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10357529" width="1" height="1"&gt;</content><author><name>Ed Dore</name><uri>http://blogs.msdn.com/Ed-Dore/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Sample Browser Extension for Visual Studio 2010/2012</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/dsvst/archive/2012/09/07/sample-browser-extension-for-visual-studio-2010-2012.aspx" /><id>http://blogs.msdn.com/b/dsvst/archive/2012/09/07/sample-browser-extension-for-visual-studio-2010-2012.aspx</id><published>2012-09-07T16:44:33Z</published><updated>2012-09-07T16:44:33Z</updated><content type="html">&lt;p&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/4934b087-e6cc-44dd-b992-a71f00a2a6df"&gt;&lt;img title="samplebrowservsxreleasewithvs2012banner" style="margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="samplebrowservsxreleasewithvs2012banner" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-15-97-metablogapi/8780.samplebrowservsxreleasewithvs2012banner_5F00_5F6439CF.png" width="500" height="252" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;3500+ samples at your fingertips. The new Sample Browser Extension allows you to quickly search, download, and experiment with sample code covering just about anything you can think of. And if you can’t find what you’re looking for, you can submit a sample request. The latest version, which supports both VS 2010 and VS 2012, was uploaded yesterday, and has already been downloaded over 50,000 times.&lt;/p&gt;  &lt;p&gt;Give it a try, and be sure to send feedback via the &lt;a href="http://visualstudiogallery.msdn.microsoft.com/4934b087-e6cc-44dd-b992-a71f00a2a6df"&gt;Visual Studio Gallery page&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10347359" width="1" height="1"&gt;</content><author><name>Ed Dore</name><uri>http://blogs.msdn.com/Ed-Dore/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Visual Studio 2010 Professional Upgrade Pre-Order</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/dsvst/archive/2010/03/11/visual-studio-2010-professional-upgrade-pre-order.aspx" /><id>http://blogs.msdn.com/b/dsvst/archive/2010/03/11/visual-studio-2010-professional-upgrade-pre-order.aspx</id><published>2010-03-11T16:21:00Z</published><updated>2010-03-11T16:21:00Z</updated><content type="html">&lt;P&gt;Microsoft Visual Studio 2010 Professional will launch on April 12 but you can beat the rush and secure your copy today by pre-ordering at the affordable estimated retail price of $549, a saving of $250. &lt;/P&gt;
&lt;P&gt;If you use a previous version of Visual Studio or any other development tool then you are eligible for this upgrade. Along with all the great new features in Visual Studio 2010 (see &lt;A href="http://www.microsoft.com/visualstudio" mce_href="http://www.microsoft.com/visualstudio"&gt;www.microsoft.com/visualstudio&lt;/A&gt;) Visual Studio 2010 Professional includes a 12-month MSDN Essentials subscription which gives you access to core Microsoft platforms: Windows 7 Ultimate, Windows Server 2008 R2 Enterprise, and Microsoft SQL Server 2008 R2 Datacenter. &lt;/P&gt;
&lt;P&gt;So visit &lt;A href="http://www.microsoft.com/visualstudio/en-us/pre-order-visual-studio-2010" mce_href="http://www.microsoft.com/visualstudio/en-us/pre-order-visual-studio-2010"&gt;http://www.microsoft.com/visualstudio/en-us/pre-order-visual-studio-2010&lt;/A&gt; to check out all the new features and sign up for this great offer.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9976929" width="1" height="1"&gt;</content><author><name>Ed Dore</name><uri>http://blogs.msdn.com/Ed-Dore/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>How to register existing packages to run under VS 2010 Experimental Instance</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/dsvst/archive/2010/03/08/how-to-register-existing-package-binaries-to-run-under-vs-2010-experimental-instance.aspx" /><id>http://blogs.msdn.com/b/dsvst/archive/2010/03/08/how-to-register-existing-package-binaries-to-run-under-vs-2010-experimental-instance.aspx</id><published>2010-03-08T19:01:00Z</published><updated>2010-03-08T19:01:00Z</updated><content type="html">&lt;P&gt;Aaron Marten’s blog “&lt;A href="http://blogs.msdn.com/aaronmar/archive/2009/06/05/pkgdef-and-the-experimental-instance-in-vs-2010.aspx" mce_href="http://blogs.msdn.com/aaronmar/archive/2009/06/05/pkgdef-and-the-experimental-instance-in-vs-2010.aspx"&gt;Pkgdef and the Experimental Instance in VS 2010&lt;/A&gt;” points out that when devenv.exe is invoked with the ‘/rootsuffix Exp’ switch, the VS Shell no longer uses the experimental registry hive. Instead, the shell merges the HKLM\Software\Microsoft\VisualStudio\10.0 registry settings and the .pkgdef files in the user’s …AppData\Local\Microsoft\VisualStudio\10.0Exp\Extensions folder.&lt;/P&gt;
&lt;P&gt;If you have an existing package binary that’s built with an earlier version of VS, and want to have it load into the VS 2010 Experimental instance, you can create a VSIX Project in VS 2010, to ensure the components are properly registered to load in the Experimental instance.&lt;/P&gt;
&lt;P&gt;Alternatively, you can copy these files manually. But using a VSIX Project makes this a relatively quick and easy process. Just follow the steps outlined below and you should have your existing package(s), up and running in VS 2010 in no time.&lt;/P&gt;
&lt;P&gt;Step #1: Create a new VSIX Project from the “File.New Project” dialog. Note, the VSIX Project template is included under the Visual C#\Extensibility and Visual Basic\Extensibility trees.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/dsvst/WindowsLiveWriter/Howtoregisterexistingpackagebinariestoru_9866/clip_image002_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/dsvst/WindowsLiveWriter/Howtoregisterexistingpackagebinariestoru_9866/clip_image002_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=clip_image002 border=0 alt=clip_image002 src="http://blogs.msdn.com/blogfiles/dsvst/WindowsLiveWriter/Howtoregisterexistingpackagebinariestoru_9866/clip_image002_thumb.jpg" width=504 height=324 mce_src="http://blogs.msdn.com/blogfiles/dsvst/WindowsLiveWriter/Howtoregisterexistingpackagebinariestoru_9866/clip_image002_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Step #2: Right click on the project node in Solution Explorer, select ‘Add-&amp;gt;Add Existing…’ and add your package assembly, and pkgdef files to the project. If you currently do not have a pkgdef file for your package, check out “&lt;A href="http://blogs.msdn.com/dsvst/archive/2010/03/08/how-to-create-a-pkgdef-file-for-your-visual-studio-package.aspx" mce_href="http://blogs.msdn.com/dsvst/archive/2010/03/08/how-to-create-a-pkgdef-file-for-your-visual-studio-package.aspx"&gt;How to create a pkgdef file for your Visual Studio Package&lt;/A&gt;”. If your package happens to be a native C++ package with a satellite resource DLL, you’ll want to add a codepage folder to the project add your satellite resource DLL as well. For example:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/dsvst/WindowsLiveWriter/Howtoregisterexistingpackagebinariestoru_9866/clip_image004_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/dsvst/WindowsLiveWriter/Howtoregisterexistingpackagebinariestoru_9866/clip_image004_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=clip_image004 border=0 alt=clip_image004 src="http://blogs.msdn.com/blogfiles/dsvst/WindowsLiveWriter/Howtoregisterexistingpackagebinariestoru_9866/clip_image004_thumb.jpg" width=209 height=244 mce_src="http://blogs.msdn.com/blogfiles/dsvst/WindowsLiveWriter/Howtoregisterexistingpackagebinariestoru_9866/clip_image004_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Step #3: Set the ‘Build Action’ property to “Content”, the ‘Copy to Output Directory’ property to “Copy Always”, and the ‘Include in VSIX’ property to “True”, on each of these files. For Example:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/dsvst/WindowsLiveWriter/Howtoregisterexistingpackagebinariestoru_9866/clip_image006_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/dsvst/WindowsLiveWriter/Howtoregisterexistingpackagebinariestoru_9866/clip_image006_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=clip_image006 border=0 alt=clip_image006 src="http://blogs.msdn.com/blogfiles/dsvst/WindowsLiveWriter/Howtoregisterexistingpackagebinariestoru_9866/clip_image006_thumb.jpg" width=419 height=222 mce_src="http://blogs.msdn.com/blogfiles/dsvst/WindowsLiveWriter/Howtoregisterexistingpackagebinariestoru_9866/clip_image006_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Step #4: Open the .vsixmanifest in the VSIX designer (if it isn’t open already), and fill in the some of the details. For example:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/dsvst/WindowsLiveWriter/Howtoregisterexistingpackagebinariestoru_9866/clip_image008_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/dsvst/WindowsLiveWriter/Howtoregisterexistingpackagebinariestoru_9866/clip_image008_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=clip_image008 border=0 alt=clip_image008 src="http://blogs.msdn.com/blogfiles/dsvst/WindowsLiveWriter/Howtoregisterexistingpackagebinariestoru_9866/clip_image008_thumb.jpg" width=533 height=381 mce_src="http://blogs.msdn.com/blogfiles/dsvst/WindowsLiveWriter/Howtoregisterexistingpackagebinariestoru_9866/clip_image008_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Note, use the “Add Content” button, and add the .pkgdef as a “VS Package, as illustrated below.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/dsvst/WindowsLiveWriter/Howtoregisterexistingpackagebinariestoru_9866/clip_image010_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/dsvst/WindowsLiveWriter/Howtoregisterexistingpackagebinariestoru_9866/clip_image010_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=clip_image010 border=0 alt=clip_image010 src="http://blogs.msdn.com/blogfiles/dsvst/WindowsLiveWriter/Howtoregisterexistingpackagebinariestoru_9866/clip_image010_thumb.jpg" width=342 height=229 mce_src="http://blogs.msdn.com/blogfiles/dsvst/WindowsLiveWriter/Howtoregisterexistingpackagebinariestoru_9866/clip_image010_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Step #5: Right click the project node in Solution Explorer, and select the “Properties…” command to display the project designer. Then select the “VSIX” tab and ensure the “Deploy VSIX content to experimental instance” is selected. For example:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/dsvst/WindowsLiveWriter/Howtoregisterexistingpackagebinariestoru_9866/clip_image012_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/dsvst/WindowsLiveWriter/Howtoregisterexistingpackagebinariestoru_9866/clip_image012_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=clip_image012 border=0 alt=clip_image012 src="http://blogs.msdn.com/blogfiles/dsvst/WindowsLiveWriter/Howtoregisterexistingpackagebinariestoru_9866/clip_image012_thumb.jpg" width=616 height=310 mce_src="http://blogs.msdn.com/blogfiles/dsvst/WindowsLiveWriter/Howtoregisterexistingpackagebinariestoru_9866/clip_image012_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Step #6: Build the project to register the package for execution in the experimental instance of VS 2010.&lt;/P&gt;
&lt;P&gt;Finally, note that the Debug settings are already configured to launch DevEnv.exe with the /RootSuffix Exp switch. So you can readily launch and debug your package running in the experimental instance. If your package happens to be native C++ like mine, you’ll want to also set the “Enable unmanaged code debugging” checkbox on the Debug Tab.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9974965" width="1" height="1"&gt;</content><author><name>Ed Dore</name><uri>http://blogs.msdn.com/Ed-Dore/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>How to create a pkgdef file for your Visual Studio Package</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/dsvst/archive/2010/03/08/how-to-create-a-pkgdef-file-for-your-visual-studio-package.aspx" /><id>http://blogs.msdn.com/b/dsvst/archive/2010/03/08/how-to-create-a-pkgdef-file-for-your-visual-studio-package.aspx</id><published>2010-03-08T18:39:19Z</published><updated>2010-03-08T18:39:19Z</updated><content type="html">&lt;p&gt;The .pkgdef file was first introduced with VS 2008, to allow for easily registering packages targeting the VS 2008 isolated shell. Bill Wienberger details the rationale behind this change in the following blog entry: &lt;a href="http://blogs.msdn.com/visualstudio/archive/2009/12/18/what-s-a-pkgdef-and-why.aspx"&gt;What’s A PkgDef? And Why?&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;There are a couple of ways .pkgdef files can be created. For a managed package, the .pkgdef file can be built using the RegPkg.exe utility with the /pkgdeffile switch. The RegPkg.exe utility will read and execute the various registration attributes in the package assembly to construct the pkgdef file. If the package project was initially created with the VS SDK 1.1 (or later) project wizard, build rules were automatically added to the project file that will automatically generate the .pkgdef during your build operation. For example, you may have noticed something similar to the following in the build output window after building your managed package:&lt;/p&gt;  &lt;p&gt;C:\Program Files\Microsoft Visual Studio 2008 SDK\VisualStudioIntegration\Tools\bin\&lt;b&gt;RegPkg.exe&lt;/b&gt; /root:Software\Microsoft\VisualStudio\9.0Exp &lt;b&gt;&amp;quot;/pkgdeffile&lt;/b&gt;:obj\Debug\VS08ManagedPackage.pkgdef&amp;quot; &amp;quot;C:\Users\&amp;lt;&lt;i&gt;user&lt;/i&gt;&amp;gt;\Documents\Visual Studio 2008\Projects\VS08ManagedPackage\VS08ManagedPackage\bin\Debug\VS08ManagedPackage.dll&amp;quot; &lt;/p&gt;  &lt;p&gt;Or possibly if you’re using VS 2010:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;GeneratePkgDef:&lt;/strong&gt;     &lt;br /&gt;&amp;#160;&amp;#160; Creating intermediate PkgDef file.     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; C:\Program Files\Microsoft Visual Studio 2010 SDK\VisualStudioIntegration\Tools\bin\CreatePkgDef.exe /out=&amp;quot;obj\Debug\My2010Package.latest.pkgdef&amp;quot; /codebase … &amp;quot;c:\users\&amp;lt;&lt;i&gt;user&lt;/i&gt;&amp;gt;\documents\visual studio 2010\Projects\My2010Package\My2010Package\bin\Debug\My2010Package.dll&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160; Copying file from &amp;quot;obj\Debug\My2010Package.latest.pkgdef&amp;quot; to &amp;quot;obj\Debug\My2010Package.pkgdef&amp;quot;.     &lt;br /&gt;&amp;#160;&amp;#160; &lt;strong&gt;CopyPkgDef:&lt;/strong&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Copying file from &amp;quot;obj\Debug\My2010Package.pkgdef&amp;quot; to &amp;quot;bin\Debug\My2010Package.pkgdef&amp;quot;.&lt;/p&gt;  &lt;p&gt;Creating a .pkgdef for C++ based packages requires a bit more work, as the C++ project system (in VS 2008) was not based on MSBuild. If your native C++ package was originally created with VS 2008 SDK 1.1 (or later) project wizard, an initial .pkgdef file was automatically included with your project. This default .pkgdef will contain the settings/tokens based on the initial settings you specified in the project wizard. Additional entries, or changes to the existing .pkgdef must be done manually, as we cannot leverage the RegPkg.exe utility.&lt;/p&gt;  &lt;p&gt;A list of the various replacement tokens that can be used in a .pkgdef file can currently be found in the following help topic: &lt;a href="http://msdn.microsoft.com/en-us/library/bb685692(VS.100).aspx"&gt;Isolated Shell Extension Points&lt;/a&gt;. The topic title is a little out of date, but the tokens listed are entirely valid for packages targeting either the isolated or integrated shells.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Tips for creating a pkgdef file (if you don’t already have one):&lt;/b&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;If your package is a managed package that targets VS 2005, use &lt;a href="http://msdn.microsoft.com/en-us/library/bb707481.aspx"&gt;RegPkg.exe&lt;/a&gt; to create a .reg or .vrg file for guidance to find the registry keys and values you’ll need to include for your package. &lt;/li&gt;    &lt;li&gt;If your package is a C++ based package, review your installer and note the various registry keys and values it creates/adds. &lt;/li&gt;    &lt;li&gt;Create and build a test package using the VS 2008/2010 SDK. And use the generated pkgdef as a template. &lt;/li&gt; &lt;/ul&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9974943" width="1" height="1"&gt;</content><author><name>Ed Dore</name><uri>http://blogs.msdn.com/Ed-Dore/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Dissecting VS 2010 Package Registration</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/dsvst/archive/2010/03/01/dissecting-vs-2010-package-registration.aspx" /><id>http://blogs.msdn.com/b/dsvst/archive/2010/03/01/dissecting-vs-2010-package-registration.aspx</id><published>2010-03-01T22:35:04Z</published><updated>2010-03-01T22:35:04Z</updated><content type="html">&lt;p&gt;While it’s still possible to register your packages, by manually or programmatically adding the requisite registry keys and values under the HKLM\Software\Microsoft\VisualStudio\10.0 registry hive, it’s no longer the recommended way to register your packages with the integrated (or isolated) shell.&lt;/p&gt;  &lt;p&gt;VS2010 now uses pkgdef and vsixmanifest files to integrate custom packages into the shell. For managed packages, the pkgdef file is generated through the &lt;b&gt;GeneratePkgDef&lt;/b&gt; target in Microsoft.VsSDK.targets, which runs the &lt;b&gt;CreatePkgDef&lt;/b&gt; build task in Microsoft.VsSDK.Build.Tasks.dll. The CreatePkgDef build task will construct the pkgdef file, by reading/executing the various attributes (like PackageRegistration, ProvideMenuResource, etc) applied to the Package object. For native C++ packages, the .pkgdef file is initially created via the project wizard template, and must be edited manually as changes are made to the package.&lt;/p&gt;  &lt;p&gt;The pkgdef file is basically just a tokenized .REG file, which the shell merges with the registry. Note, the use of the registry here is now considered an implementation detail, and may change with subsequent releases; hence the above mentioned recommendation not to use the registry directly, to register your packages. Aaron Marten’s blog ‘&lt;a href="http://blogs.msdn.com/aaronmar/archive/2009/11/06/all-your-regkeys-are-belong-to-us.aspx"&gt;All Your RegKeys Are Belong To Us&lt;/a&gt;’ details some of the specifics.&lt;/p&gt;  &lt;p&gt;The &lt;a href="http://msdn.microsoft.com/en-us/library/dd393700(VS.100).aspx"&gt;.vsixmanifest&lt;/a&gt; is typically used to describe the content of a VSIX package, but is also required to notify the shell about your package, and allows for listing the package under the new &lt;a href="http://msdn.microsoft.com/en-us/library/dd293638(VS.100).aspx"&gt;Extension Manager&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Unlike VS 2008 where packages are loaded directly from the projects build output directory, a VS 2010 package is loaded from a copy made in the users AppData\Local\Microsoft\VisualStudio\10.0&lt;i&gt;&amp;lt;Exp&amp;gt;&lt;/i&gt;\Extensions subdirectory. With a managed package, these files are copied over via the &lt;b&gt;DeployVsixExtensionFiles&lt;/b&gt; target defined in Microsoft.VsSDK.targets. From the proj file, you can define the &lt;b&gt;DeployExtension&lt;/b&gt; property to turn this on or off. For native C++ projects, these same files are copied via the &lt;i&gt;&amp;lt;Package&amp;gt;&lt;/i&gt;VSIX project, which is a C# flavored project type that uses the above mentioned targets and properties the C# and VB based package projects use.&lt;/p&gt;  &lt;p&gt;In summary, if you want to manually add a package to run under the experimental shell environment (when launching devenv.exe with ‘/rootsuffix Exp’), you will need to do the following:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Copy your package assembly to a subdirectory under &lt;i&gt;…&amp;lt;user&amp;gt;&lt;/i&gt;\AppData\Local\Microsoft\VisualStudio\10.0Exp\Extensions &lt;/li&gt;    &lt;li&gt;Create and copy a pkgdef and vsixmanifest to the same directory &lt;/li&gt;    &lt;li&gt;Launch devenv with ‘/rootsuffix Exp’ command line switch &lt;/li&gt;    &lt;li&gt;Enable the package via the ‘Tools.Extension Manager’ &lt;/li&gt; &lt;/ol&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9971149" width="1" height="1"&gt;</content><author><name>Ed Dore</name><uri>http://blogs.msdn.com/Ed-Dore/ProfileUrlRedirect.ashx</uri></author><category term="VSX" scheme="http://blogs.msdn.com/b/dsvst/archive/tags/VSX/" /><category term="VSPackage" scheme="http://blogs.msdn.com/b/dsvst/archive/tags/VSPackage/" /></entry><entry><title>Hotfix posted for VS 2010 RC1 Intellisense crash</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/dsvst/archive/2010/02/16/hotfix-posted-for-vs-2010-rc1-intellisense-crash.aspx" /><id>http://blogs.msdn.com/b/dsvst/archive/2010/02/16/hotfix-posted-for-vs-2010-rc1-intellisense-crash.aspx</id><published>2010-02-16T21:12:43Z</published><updated>2010-02-16T21:12:43Z</updated><content type="html">&lt;p&gt;On systems where an application or device is actively using UIAutomation (Tablet, Multi-touch, etc), the IDE may crash if the user is typing while intellisense is being displayed or dismissed.&lt;/p&gt;  &lt;p&gt;KB article describing this problem will be posted to &lt;a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;980615"&gt;http://support.microsoft.com/default.aspx?scid=kb;EN-US;980615&lt;/a&gt; in the next few days.&lt;/p&gt;  &lt;p&gt;A hotfix that addresses this problem can be downloaded from the following locations:&lt;/p&gt;  &lt;p&gt;MSConnect: &lt;a href="http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=26662"&gt;http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=26662&lt;/a&gt;    &lt;br /&gt;Code Gallery:&amp;#160; &lt;a href="http://code.msdn.microsoft.com/KB980610"&gt;http://code.msdn.microsoft.com/KB980610&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9964621" width="1" height="1"&gt;</content><author><name>Ed Dore</name><uri>http://blogs.msdn.com/Ed-Dore/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Problems building VS 2008 SDKSample</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/dsvst/archive/2009/11/12/problems-building-vs-2008-sdksample.aspx" /><id>http://blogs.msdn.com/b/dsvst/archive/2009/11/12/problems-building-vs-2008-sdksample.aspx</id><published>2009-11-12T22:30:00Z</published><updated>2009-11-12T22:30:00Z</updated><content type="html">&lt;P&gt;Recently, one of our partners had a question pertaining to Help 2.0 integration, and I wanted to use the SDKSample to try a few things out with filters and help content. Apparently, it's been a while since I last played with that particular sample. Upon attempting to build it, I was confronted with the following build errors. &lt;/P&gt;
&lt;P style="MARGIN-LEFT: 36pt"&gt;c10100b1: Failed to load file "..\..\..\Release\ExportTlbFromAssembly.exe". The system cannot find the path specified.&lt;BR&gt;c10100b1: Failed to load file "..\..\..\Debug\ExportTlbFromAssembly.exe". The system cannot find the file specified.&lt;BR&gt;LGHT0100 : File of type 'File' with name '..\Common\TypeLibs\Debug\DotNetAssembly.tlb' could not be found.&lt;BR&gt;LGHT0100 : File of type 'File' with name '..\Common\TypeLibs\Release\DotNetAssembly.tlb' could not be found. &lt;/P&gt;
&lt;P&gt;&lt;BR&gt;The VC++ 2008 project system now attempts to generate and embed a manifest into a project's target binary. Because the C++ projects in question don't produce a DLL or EXE binary, the subsequent invocation of mt.exe to generate the manifest fails the build. Consquently, no .TLB files are created for the ExportTlbFromAssembly or Setup projects. The easiest way to fix this, is to simply change the C++ project settings so that the project system thinks it's building a static library instead of a .EXE. &lt;/P&gt;
&lt;P&gt;Just right click on each of the projects in solution explorer, and from the project's 'Property Pages' dialog, select the 'General' category under 'Configuration Properties', and then change the project's 'Configuration Type' property to &lt;STRONG&gt;'Static Library (.lib)&lt;/STRONG&gt;' instead of &lt;STRONG&gt;'Application (.exe)&lt;/STRONG&gt;'. Be sure to do this for each configuration (debug and release). &lt;/P&gt;
&lt;P&gt;After setting the 'Configuration Type' property, you should be able to build the SDKSample project without error. &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9921607" width="1" height="1"&gt;</content><author><name>Ed Dore</name><uri>http://blogs.msdn.com/Ed-Dore/ProfileUrlRedirect.ashx</uri></author><category term="VSX Support" scheme="http://blogs.msdn.com/b/dsvst/archive/tags/VSX+Support/" /><category term="SDKSample" scheme="http://blogs.msdn.com/b/dsvst/archive/tags/SDKSample/" /><category term="VSX Samples" scheme="http://blogs.msdn.com/b/dsvst/archive/tags/VSX+Samples/" /></entry><entry><title>Replacing the Default Error Dialog in the Isolated Shell</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/dsvst/archive/2009/10/14/replacing-the-default-error-dialog-in-the-isolated-shell.aspx" /><id>http://blogs.msdn.com/b/dsvst/archive/2009/10/14/replacing-the-default-error-dialog-in-the-isolated-shell.aspx</id><published>2009-10-14T17:49:00Z</published><updated>2009-10-14T17:49:00Z</updated><content type="html">&lt;p&gt;&lt;strong&gt;Background: &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Recently one of our VSIP partners asked if it was possible to customize the default error dialog that the Isolated Shell displays when encountering an error. Let's suppose you have a package command handler that might throw an error with code that looks like the following: &lt;/p&gt;
&lt;p&gt;
&lt;p&gt;&lt;span style="FONT-FAMILY: Courier New; FONT-SIZE: 8pt"&gt;&lt;span style="COLOR: blue"&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;private&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="COLOR: blue"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; OnTestErrorDialog(&lt;/span&gt;&lt;span style="COLOR: blue"&gt;object&lt;/span&gt;&lt;span style="color: #000000;"&gt; sender, &lt;/span&gt;&lt;span style="COLOR: #2b91af"&gt;EventArgs&lt;/span&gt;&lt;span style="color: #000000;"&gt; e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="COLOR: green"&gt;// throw an exception which will invoke the shells error dialog&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="COLOR: #2b91af"&gt;ErrorHandler&lt;/span&gt;&lt;span style="color: #000000;"&gt;.ThrowOnFailure(DoSomeWork());&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 10pt"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
If 'DoSomeWork()' happens to return an error code like E_ACCESSDENIED for example, the shell will catch the thrown exception, and display a default error dialog that looks like the following:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Solution: &lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/p&gt;
&lt;p&gt;As it turns out, there is support for doing just this in the isolated shell. The problem is that we never documented or published the interface. This blog entry is an 'interim' solution, until we can get the documentation updated, and perhaps the interface and service definitions into an interop assembly. &lt;/p&gt;
&lt;p&gt;In the Isolated Shell, if you have a package that proffers an IVsMessageBoxService, you can supply your own dialog to display error messages. The IVsMessageBoxService is defined as follows &lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;[&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;uuid(1DD71F22-C880-46be-A462-A0A5542BC939), &lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;version(1.0),&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;pointer_default(unique) &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;]&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;interface IVsMessageBoxService: IUnknown &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;//contains information used to display the message box.&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;// (same as Win32API MessageBoxIndirect)&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;HRESULT ShowMessageBox( [in] HWND hwndOwner, &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;[in] HINSTANCE hInstance,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;[in] LPCOLESTR lpszText,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;[in] LPCOLESTR lpszCaption,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;[in] DWORD dwStyle,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;[in] LPCOLESTR lpszIcon,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;[in] DWORD_PTR dwContextHelpId,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;[in] DWORD_PTR lpfnMsgBoxCallback,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;[in] DWORD dwLanguageId,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;[out, retval] int* pidButton // id of the button return value&lt;br /&gt;&amp;nbsp;&amp;nbsp; )&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: courier new,courier;"&gt;&lt;span style="font-size: 8pt;"&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 8pt;"&gt;cpp_quote("#define SID_SVsMessageBoxService IID_IVsMessageBoxService") &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Because the above interface is currently not defined in any of our interop assemblies, you will need to define it yourself. For example: &lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-FAMILY: Courier New; FONT-SIZE: 8pt"&gt;
&lt;pre style="font-family: Consolas; background: white; color: black;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: courier new,courier;"&gt;[&lt;span style="color: #2b91af;"&gt;PreserveSig&lt;/span&gt;]
[&lt;span style="color: #2b91af;"&gt;ComImport&lt;/span&gt;]
[&lt;span style="color: #2b91af;"&gt;InterfaceType&lt;/span&gt;(&lt;span style="color: #2b91af;"&gt;ComInterfaceType&lt;/span&gt;.InterfaceIsIUnknown)]
[&lt;span style="color: #2b91af;"&gt;GuidAttribute&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"1DD71F22-C880-46be-A462-A0A5542BC939"&lt;/span&gt;)]
&lt;span style="color: blue;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;interface&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;IVsMessageBoxService&lt;/span&gt;
{
&lt;span style="color: blue;"&gt;    int&lt;/span&gt;&amp;nbsp;ShowMessageBox(&lt;span style="color: blue;"&gt;int&lt;/span&gt;&amp;nbsp;hWndOwner,
&lt;span style="color: #2b91af;"&gt;    IntPtr&lt;/span&gt;&amp;nbsp;hInstance,
    [&lt;span style="color: #2b91af;"&gt;MarshalAs&lt;/span&gt;(&lt;span style="color: #2b91af;"&gt;UnmanagedType&lt;/span&gt;.LPWStr)]&amp;nbsp;&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;nbsp;lpszText,
    [&lt;span style="color: #2b91af;"&gt;MarshalAs&lt;/span&gt;(&lt;span style="color: #2b91af;"&gt;UnmanagedType&lt;/span&gt;.LPWStr)]&amp;nbsp;&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;nbsp;lpszCaption,
&lt;span style="color: blue;"&gt;    uint&lt;/span&gt;&amp;nbsp;dwStyle,
&lt;span style="color: #2b91af;"&gt;    IntPtr&lt;/span&gt;&amp;nbsp;lpszIcon,
&lt;span style="color: #2b91af;"&gt;    IntPtr&lt;/span&gt;&amp;nbsp;dwContextHelpId,
&lt;span style="color: #2b91af;"&gt;    IntPtr&lt;/span&gt;&amp;nbsp;pfnMessageBoxCallback,
&lt;span style="color: blue;"&gt;    uint&lt;/span&gt;&amp;nbsp;dwLangID,
&lt;span style="color: blue;"&gt;    out&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;int&lt;/span&gt;&amp;nbsp;pidButton);
}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;The next step is to implement the interface. For example: &lt;span style="FONT-FAMILY: Courier New; FONT-SIZE: 8pt"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: blue"&gt;class&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;CustomMessageBoxService&lt;/span&gt; : &lt;span style="COLOR: #2b91af"&gt;IVsMessageBoxService&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: blue"&gt;internal&lt;/span&gt; CustomMessageBoxService() {}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;int&lt;/span&gt; ShowMessageBox(&lt;span style="COLOR: blue"&gt;int&lt;/span&gt; hWndOwner, &lt;span style="COLOR: #2b91af"&gt;IntPtr&lt;/span&gt; hInstance, &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; lpszText, &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: blue"&gt;string&lt;/span&gt; lpszCaption, &lt;span style="COLOR: blue"&gt;uint&lt;/span&gt; dwStyle, &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; szIcon, &lt;span style="COLOR: #2b91af"&gt;IntPtr&lt;/span&gt; dwContextHelpId, &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: #2b91af"&gt;IntPtr&lt;/span&gt; pfnMessageBoxCallback, &lt;span style="COLOR: blue"&gt;uint&lt;/span&gt; dwLangID, &lt;span style="COLOR: blue"&gt;out&lt;/span&gt; &lt;span style="COLOR: blue"&gt;int&lt;/span&gt; pidButton)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: #2b91af"&gt;IVsUIShell&lt;/span&gt; vsShell = (&lt;span style="COLOR: #2b91af"&gt;IVsUIShell&lt;/span&gt;)&lt;span style="COLOR: #2b91af"&gt;Package&lt;/span&gt;.GetGlobalService(&lt;span style="COLOR: blue"&gt;typeof&lt;/span&gt;(&lt;span style="COLOR: #2b91af"&gt;SVsUIShell&lt;/span&gt;));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;vsShell.EnableModeless(0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: green"&gt;// TODO: Display a customized dialog&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;System.Windows.Forms.&lt;span style="COLOR: #2b91af"&gt;MessageBox&lt;/span&gt;.Show(lpszText, &lt;span style="COLOR: #a31515"&gt;"Oops"&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;vsShell.EnableModeless(-1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: green"&gt;// NOTE: Returning a 0 or -1 value for pidButton will result in the shell &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: green"&gt;// displaying its default error dialog&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;pidButton = 1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: blue"&gt;return&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;VSConstants&lt;/span&gt;.S_OK;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And finally, you need to proffer the service from a package running in your isolated shell. First, apply the following attribute to your Package object to ensure the service is registered with the shell. &lt;span style="FONT-FAMILY: Courier New; FONT-SIZE: 8pt"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 10pt"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;[&lt;span style="COLOR: #2b91af"&gt;ProvideService&lt;/span&gt;(&lt;span style="COLOR: blue"&gt;typeof&lt;/span&gt;(&lt;span style="COLOR: #2b91af"&gt;IVsMessageBoxService&lt;/span&gt;))]&lt;/span&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then add the following code to your Package.Initialize implementation (after calling base.Initialize()): &lt;/p&gt;
&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-FAMILY: Courier New; COLOR: green; FONT-SIZE: 8pt"&gt;&lt;/span&gt;&lt;strong&gt;Caveat: &lt;/strong&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; COLOR: green; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp; // Proffer a custom IVsMessageBoxService service to replace the shells default error dialog.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; COLOR: #2b91af; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp; IServiceContainer&lt;/span&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="color: #000000;"&gt; svcContainer = (&lt;/span&gt;&lt;span style="COLOR: #2b91af"&gt;IServiceContainer&lt;/span&gt;&lt;span style="color: #000000;"&gt;)GetService(&lt;/span&gt;&lt;span style="COLOR: blue"&gt;typeof&lt;/span&gt;&lt;span style="color: #000000;"&gt;(&lt;/span&gt;&lt;span style="COLOR: #2b91af"&gt;IServiceContainer&lt;/span&gt;&lt;span style="color: #000000;"&gt;));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 10pt"&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'; FONT-SIZE: 8pt; mso-no-proof: yes; mso-bidi-font-family: 'Courier New'"&gt;&lt;span style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp; svcContainer.AddService(&lt;/span&gt;&lt;span style="COLOR: blue"&gt;typeof&lt;/span&gt;&lt;span style="color: #000000;"&gt;(&lt;/span&gt;&lt;span style="COLOR: #2b91af"&gt;IVsMessageBoxService&lt;/span&gt;&lt;span style="color: #000000;"&gt;), &lt;/span&gt;&lt;span style="COLOR: blue"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="COLOR: #2b91af"&gt;CustomMessageBoxService&lt;/span&gt;&lt;span style="color: #000000;"&gt;(), &lt;/span&gt;&lt;span style="COLOR: blue"&gt;true&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-FAMILY: 'Arial Narrow','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note this feature is only available with the Isolated Shell. The Integrated Shell does not look for, or attempt to utilize the IVsMessageBoxService. &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9907264" width="1" height="1"&gt;</content><author><name>Ed Dore</name><uri>http://blogs.msdn.com/Ed-Dore/ProfileUrlRedirect.ashx</uri></author><category term="VSX Support" scheme="http://blogs.msdn.com/b/dsvst/archive/tags/VSX+Support/" /><category term="VSX" scheme="http://blogs.msdn.com/b/dsvst/archive/tags/VSX/" /><category term="VSPackage" scheme="http://blogs.msdn.com/b/dsvst/archive/tags/VSPackage/" /><category term="Isolated Shell" scheme="http://blogs.msdn.com/b/dsvst/archive/tags/Isolated+Shell/" /></entry><entry><title>Macro that tests for proper implementation of AutomationProperties</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/dsvst/archive/2009/10/13/macro-that-tests-for-proper-implementation-of-automationproperties.aspx" /><id>http://blogs.msdn.com/b/dsvst/archive/2009/10/13/macro-that-tests-for-proper-implementation-of-automationproperties.aspx</id><published>2009-10-13T20:07:43Z</published><updated>2009-10-13T20:07:43Z</updated><content type="html">&lt;p&gt;&lt;strong&gt;Background:
&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;VSPackages can offer up a set of custom properties for their Tools.Options pages, by registering the pages under Visual Studio's AutomationProperties registry key, by using the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.provideoptionpageattribute.aspx"&gt;ProvideOptionPageAttribute&lt;/a&gt;. This allows for programmatic access to the Tools.Options properties via &lt;a href="http://msdn.microsoft.com/en-us/library/envdte.properties.aspx"&gt;DTE.Properties(&lt;em&gt;&amp;lt;categoryName&amp;gt;&lt;/em&gt;, &lt;em&gt;&amp;lt;pageName&amp;gt;&lt;/em&gt;)&lt;/a&gt;.
&lt;/p&gt;&lt;p&gt;The Example.OptionsPage sample in the Visual Studio SDK is missing the following attributes on its DialogPage derived objects. 
&lt;/p&gt;&lt;p style="margin-left: 36pt"&gt;&lt;span style="color:#1f497d; font-size:12pt"&gt;[ComVisible(true)] &lt;br/&gt;[ClassInterface(ClassInterfaceType.AutoDual)]&lt;/span&gt;&lt;span style="color:black; font-family:Tahoma; font-size:10pt"&gt;
		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Unfortunately, this mistake has been copied by many package partners (including internal teams here at Microsoft). Consequently, we occasionally see customers running into problems attempting to programmatically access Tools.Options properties with the above mentioned DTE.Properties interface.
&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Solution: 
&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;To help address this oft made mistake, Paul Harrington and Doug Hodges recently wrote the following macro which tests all VSPackages registered under AutomationProperties, to see which objects are implemented properly, and which are not. If you have a VSPackage that adds pages to the Tools.Options dialog, you may also which to add this macro to your arsenal of testing tools.
&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:8pt"&gt;&lt;span style="color:blue; font-family:Courier New"&gt;Imports&lt;/span&gt;&lt;span style="font-family:Courier New"&gt; Microsoft.Win32&lt;/span&gt;
		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:8pt"&gt;&lt;span style="color:blue; font-family:Courier New"&gt;Sub&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; TestAutomationProperties()&lt;br/&gt;   &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;Dim&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; properties &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;As&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; EnvDTE.Properties&lt;br/&gt;   &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;Dim&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; ow &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;As&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; OutputWindow = DTE.ToolWindows.OutputWindow&lt;br/&gt;   &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;Dim&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; op &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;As&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; OutputWindowPane = ow.OutputWindowPanes.Add(&lt;/span&gt;&lt;span style="color:#a31515; font-family:Courier New"&gt;"Test Automation Properties"&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt;)&lt;br/&gt;   op.Activate()&lt;br/&gt;   op.Clear()&lt;br/&gt;&lt;br/&gt;   &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;Dim&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; regrootKey &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;As&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; RegistryKey = Registry.LocalMachine.OpenSubKey(DTE.RegistryRoot, &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;False&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt;)&lt;br/&gt;   &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;Dim&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; automationPropertiesKey &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;As&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; RegistryKey = regrootKey.OpenSubKey(&lt;/span&gt;&lt;span style="color:#a31515; font-family:Courier New"&gt;"AutomationProperties"&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt;, &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;False&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt;)&lt;br/&gt;   &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;Dim&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; categoryName &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;As&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt;
			&lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;String&lt;br/&gt;&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt;&lt;br/&gt;   &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;For&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt;
			&lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;Each&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; categoryName &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;In&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; automationPropertiesKey.GetSubKeyNames&lt;br/&gt;      &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;Dim&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; categoryKey &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;As&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; RegistryKey = automationPropertiesKey.OpenSubKey(categoryName, &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;False&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt;)&lt;br/&gt;      &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;For&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt;
			&lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;Each&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; pageName &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;As&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt;
			&lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;String&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt;
			&lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;In&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; categoryKey.GetSubKeyNames&lt;br/&gt;         &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;Dim&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; pageKey &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;As&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; RegistryKey = categoryKey.OpenSubKey(pageName, &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;False&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt;)&lt;br/&gt;         &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;Try&lt;br/&gt;&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt;            properties = DTE.Properties(categoryName, pageName)&lt;br/&gt;            &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;If&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; properties.Count = 0 &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;Then&lt;br/&gt;&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt;               op.OutputString(&lt;/span&gt;&lt;span style="color:#a31515; font-family:Courier New"&gt;"*** BUG: "&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; + categoryName + &lt;/span&gt;&lt;span style="color:#a31515; font-family:Courier New"&gt;"."&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; + pageName + &lt;/span&gt;&lt;span style="color:#a31515; font-family:Courier New"&gt;" must add [ClassInterface(ClassInterfaceType.AutoDual)] attribute"&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; + vbCrLf)&lt;br/&gt;            &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;Else&lt;br/&gt;&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt;               op.OutputString(categoryName + &lt;/span&gt;&lt;span style="color:#a31515; font-family:Courier New"&gt;"."&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; + pageName + &lt;/span&gt;&lt;span style="color:#a31515; font-family:Courier New"&gt;" has "&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; + properties.Count.ToString() + &lt;/span&gt;&lt;span style="color:#a31515; font-family:Courier New"&gt;" properties"&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; + vbCrLf)&lt;br/&gt;            &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;End&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt;
			&lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;If&lt;br/&gt;&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt;         &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;Catch&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; ex &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;As&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; Exception&lt;br/&gt;            op.OutputString(&lt;/span&gt;&lt;span style="color:#a31515; font-family:Courier New"&gt;"*** BUG: "&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; + categoryName + &lt;/span&gt;&lt;span style="color:#a31515; font-family:Courier New"&gt;"."&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; + pageName + &lt;/span&gt;&lt;span style="color:#a31515; font-family:Courier New"&gt;" must add [ComVisible(true)] attribute"&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt; + vbCrLf)&lt;br/&gt;         &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;End&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt;
			&lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;Try&lt;br/&gt;&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt;      &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;Next&lt;br/&gt;&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt;   &lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;Next&lt;br/&gt;End&lt;/span&gt;&lt;span style="color:black; font-family:Courier New"&gt;
			&lt;/span&gt;&lt;span style="color:blue; font-family:Courier New"&gt;Sub&lt;/span&gt;&lt;span style="color:black"&gt;
			&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Caveats:
&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;While adding the [ClassInterface(ClassInterfaceType.AutoDual)] attribute allows you to expose the DialogPage's properties through the DTE.Properties method, it exposes 'all' public properties, including those from your base classes, such as the "Site", "AutomationObject" and "Container" properties, and others hidden from the Import/Export Settings feature (through the use of the DesignerSerializationVisibilityAttribute).
&lt;/p&gt;&lt;p&gt;However, the development team is currently working to address this in VS 2010, and alleviate the need to use the ClassInterface attribute to expose the dialogs properties.
&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9906801" width="1" height="1"&gt;</content><author><name>Ed Dore</name><uri>http://blogs.msdn.com/Ed-Dore/ProfileUrlRedirect.ashx</uri></author><category term="VSX" scheme="http://blogs.msdn.com/b/dsvst/archive/tags/VSX/" /><category term="VSPackage" scheme="http://blogs.msdn.com/b/dsvst/archive/tags/VSPackage/" /><category term="Samples" scheme="http://blogs.msdn.com/b/dsvst/archive/tags/Samples/" /><category term="Automation" scheme="http://blogs.msdn.com/b/dsvst/archive/tags/Automation/" /><category term="Macro" scheme="http://blogs.msdn.com/b/dsvst/archive/tags/Macro/" /></entry></feed>