<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>The Visual Studio Blog : extensibility</title><link>http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/</link><description>Tags: extensibility</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>Introducing the Microsoft “Roslyn” CTP</title><link>http://blogs.msdn.com/b/visualstudio/archive/2011/10/19/introducing-the-microsoft-roslyn-ctp.aspx</link><pubDate>Wed, 19 Oct 2011 12:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10226695</guid><dc:creator>Visual Studio Blog</dc:creator><slash:comments>11</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/rsscomments.aspx?WeblogPostID=10226695</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/commentapi.aspx?WeblogPostID=10226695</wfw:comment><comments>http://blogs.msdn.com/b/visualstudio/archive/2011/10/19/introducing-the-microsoft-roslyn-ctp.aspx#comments</comments><description>&lt;h2&gt;Today we are releasing the first Community Technology Preview of the &lt;a href="http://msdn.com/roslyn"&gt;Roslyn Project&lt;/a&gt;!&lt;/h2&gt;
&lt;h2&gt;What is Roslyn?&lt;/h2&gt;
&lt;p&gt;In the past, our compilers have acted as black boxes &amp;ndash; you put source text in and out the other end comes an assembly. All of that rich knowledge and information that the compiler produces is thrown away and unavailable for anyone else to use.&lt;/p&gt;
&lt;p&gt;As Soma mentions in his &lt;a href="http://blogs.msdn.com/b/somasegar/archive/2011/10/19/roslyn-ctp-available-now.aspx"&gt;blog&lt;/a&gt;, a part of the Visual Studio languages team is working on a project called Roslyn with a goal to rewrite the C# and VB compilers and language services in managed code. With a clean, modern, managed codebase our team can be more productive, innovate faster, and deliver more features sooner and with better quality.&lt;/p&gt;
&lt;p&gt;More importantly, we are opening up the C# and Visual Basic compilers and exposing all that rich information and code analysis to be available for your use. We expose a public API surface and provide extension points in the C# and VB language services.&lt;/p&gt;
&lt;p&gt;This opens up new opportunities for VS extenders to write powerful refactorings and language analysis tools, as well as allow anyone to incorporate our parsers, semantic engines, code generators and scripting in their own applications.&lt;/p&gt;
&lt;h2&gt;Download the October 2011 CTP&lt;/h2&gt;
&lt;p&gt;The CTP and supporting materials can be downloaded from:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msdn.com/roslyn"&gt;http://msdn.com/roslyn&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The main goal of this early preview is to gather feedback on the API design and to introduce the C# Interactive window (also known as REPL, or Read-Eval-Print-Loop).&lt;/p&gt;
&lt;p&gt;This first CTP is intended for preview-use only and does not allow redistribution of the Roslyn components or allow use in a production environment.&lt;/p&gt;
&lt;p&gt;The CTP installs on Visual Studio 2010 SP1. It also requires the &lt;a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=21835"&gt;Visual Studio 2010 SP1 SDK&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Getting Started&lt;/h2&gt;
&lt;p&gt;After the installation succeeds, the best place to start is to open Start Menu -&amp;gt; Microsoft Codename Roslyn CTP -&amp;gt; Getting Started.&lt;/p&gt;
&lt;p&gt;To get started, the &lt;a href="http://go.microsoft.com/fwlink/?LinkID=230702"&gt;&amp;ldquo;Roslyn Project Overview&amp;rdquo;&lt;/a&gt; document gives a look at the compiler API &amp;ndash; how to work with syntax and semantics of your program. Several walkthrough documents are also included to provide a deep dive into various aspects of the Roslyn APIs.&lt;/p&gt;
&lt;p&gt;The CTP ships with quite a few samples for Visual Studio Extensions, compiler API, code issues, refactorings and so on. Most of the samples are provided for both C# and Visual Basic. You can open the sample source code from the Getting Started page.&lt;/p&gt;
&lt;p&gt;We also install several new project templates available in the New Project dialog:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-29-92-metablogapi/6036.ProjectTemplatesVB_5F00_01804DA6.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="ProjectTemplatesVB" border="0" alt="ProjectTemplatesVB" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-29-92-metablogapi/3113.ProjectTemplatesVB_5F00_thumb_5F00_08335729.png" width="699" height="278" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-29-92-metablogapi/4774.ProjectTemplatesCSharp_5F00_68184A6B.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="ProjectTemplatesCSharp" border="0" alt="ProjectTemplatesCSharp" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-29-92-metablogapi/2630.ProjectTemplatesCSharp_5F00_thumb_5F00_75EA9066.png" width="696" height="284" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;These templates will help you to get started on a new Visual Studio extension that uses Roslyn.&lt;/p&gt;
&lt;h2&gt;Reference Assemblies&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-29-92-metablogapi/3201.References_5F00_40DE0136.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="References" border="0" alt="References" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-29-92-metablogapi/1157.References_5F00_thumb_5F00_4EB04731.png" width="486" height="187" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The Roslyn assemblies are also installed in the GAC. Switch to the Full Profile (instead of the Client Profile) to be able to also reference the Services assemblies (which contain the IDE support).&lt;/p&gt;
&lt;h2&gt;C# Interactive window&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-29-92-metablogapi/6355.InteractiveWindow_5F00_5C828D2C.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="InteractiveWindow" border="0" alt="InteractiveWindow" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-29-92-metablogapi/0574.InteractiveWindow_5F00_thumb_5F00_3C67806F.png" width="394" height="206" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can invoke the C# Interactive window from View -&amp;gt; Other Windows -&amp;gt; C# Interactive Window. The Interactive window is powered by the new C# language service. The architecture of Roslyn is flexible enough to allow many of the IDE features such as IntelliSense and refactorings to work the same in a normal editor and in the Interactive window.&lt;/p&gt;
&lt;p&gt;At this time, the Interactive window is only available for C#. We&amp;rsquo;re working hard on providing the VB Interactive at a future time.&lt;/p&gt;
&lt;h2&gt;C# Script File (.csx) Editing Support&lt;/h2&gt;
&lt;p&gt;The CTP introduces a concept of a C# Script File. You can create a .csx file through File -&amp;gt; New File (or also use any other editor such as notepad):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-29-92-metablogapi/5873.NewCSharpScriptFile_5F00_1C4C73B2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="NewCSharpScriptFile" border="0" alt="NewCSharpScriptFile" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-29-92-metablogapi/3730.NewCSharpScriptFile_5F00_thumb_5F00_7C3166F4.png" width="700" height="479" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-29-92-metablogapi/5857.CSXScriptEditor_5F00_4724D7C4.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="CSXScriptEditor" border="0" alt="CSXScriptEditor" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-29-92-metablogapi/3704.CSXScriptEditor_5F00_thumb_5F00_2709CB07.png" width="459" height="147" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can run scripts using the new rcsi.exe, which installs into %ProgramFiles(x86)%\Microsoft Codename Roslyn CTP\Binaries\rcsi.exe. You can add rcsi.exe to the path and then type rcsi &amp;lt;scriptfilename&amp;gt;.csx.&lt;/p&gt;
&lt;p&gt;You can also copy chunks of code from a script file and send them to the C# Interactive Window (using the right-click context menu or a keyboard shortcut).&lt;/p&gt;
&lt;p&gt;The editor for the script files is also powered by the new language services. Hence it is important to keep in mind that .csx scripts will only support the part of the language already implemented in the Roslyn compilers. For more details, see the "Introduction to Scripting" walkthrough.&lt;/p&gt;
&lt;h2&gt;Quick sample of the Roslyn API&lt;/h2&gt;
&lt;p&gt;Here&amp;rsquo;s a sample of compiling and executing a small program using the Roslyn API.&lt;/p&gt;
&lt;pre style="font-family: consolas; background: white; color: black;"&gt;&lt;span style="color: blue;"&gt;using&lt;/span&gt; Roslyn.Compilers;
&lt;span style="color: blue;"&gt;using&lt;/span&gt; Roslyn.Compilers.CSharp;

...

&lt;span style="color: blue;"&gt;var&lt;/span&gt; text = &lt;span style="color: #a31515;"&gt;@"class Calc { public static object Eval() { return 42; } }"&lt;/span&gt;;
 
&lt;span style="color: blue;"&gt;var&lt;/span&gt; tree = &lt;span style="color: #2b91af;"&gt;SyntaxTree&lt;/span&gt;.ParseCompilationUnit(text);
&lt;span style="color: blue;"&gt;var&lt;/span&gt; compilation = &lt;span style="color: #2b91af;"&gt;Compilation&lt;/span&gt;.Create(
    &lt;span style="color: #a31515;"&gt;"calc.dll"&lt;/span&gt;,
    options: &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;CompilationOptions&lt;/span&gt;(assemblyKind: &lt;span style="color: #2b91af;"&gt;AssemblyKind&lt;/span&gt;.DynamicallyLinkedLibrary),
    syntaxTrees: &lt;span style="color: blue;"&gt;new&lt;/span&gt;[] { tree },
    references: &lt;span style="color: blue;"&gt;new&lt;/span&gt;[] { &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;AssemblyFileReference&lt;/span&gt;(&lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color: blue;"&gt;object&lt;/span&gt;).Assembly.Location) });
 
&lt;span style="color: #2b91af;"&gt;Assembly&lt;/span&gt; compiledAssembly;
&lt;span style="color: blue;"&gt;using&lt;/span&gt; (&lt;span style="color: blue;"&gt;var&lt;/span&gt; stream = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;MemoryStream&lt;/span&gt;())
{
    &lt;span style="color: #2b91af;"&gt;EmitResult&lt;/span&gt; compileResult = compilation.Emit(stream);
    compiledAssembly = &lt;span style="color: #2b91af;"&gt;Assembly&lt;/span&gt;.Load(stream.GetBuffer());
}
 
&lt;span style="color: #2b91af;"&gt;Type&lt;/span&gt; calc = compiledAssembly.GetType(&lt;span style="color: #a31515;"&gt;"Calc"&lt;/span&gt;);
&lt;span style="color: #2b91af;"&gt;MethodInfo&lt;/span&gt; eval = calc.GetMethod(&lt;span style="color: #a31515;"&gt;"Eval"&lt;/span&gt;);
&lt;span style="color: blue;"&gt;string&lt;/span&gt; answer = eval.Invoke(&lt;span style="color: blue;"&gt;null&lt;/span&gt;, &lt;span style="color: blue;"&gt;null&lt;/span&gt;).ToString();
 
&lt;span style="color: #2b91af;"&gt;Assert&lt;/span&gt;.AreEqual(&lt;span style="color: #a31515;"&gt;"42"&lt;/span&gt;, answer);&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; At this stage, only a subset of the language features has been implemented in the current CTP. We&amp;rsquo;re moving forward at a fast pace, but features such as Linq query expressions, attributes, events, dynamic, async are not yet implemented. To see a full list of non-implemented language features, see the &lt;a href="http://go.microsoft.com/fwlink/?LinkId=230758"&gt;Roslyn forums&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Although not all the language features are supported, the shape of the public API is mostly complete, so we encourage you to write extensions and tools against the Syntax, Symbols, and Flow and Region Analysis APIs.&lt;/p&gt;
&lt;p&gt;We&amp;rsquo;re very excited to get an early preview of this technology in your hands and we welcome your feedback, ideas and suggestions. Use the &lt;a href="http://go.microsoft.com/fwlink/?LinkId=230758"&gt;forums&lt;/a&gt; to ask questions and provide feedback, &lt;a href="http://go.microsoft.com/fwlink/?LinkId=230759"&gt;Microsoft Connect&lt;/a&gt; to log bugs and suggestions, and use the &lt;a href="http://twitter.com/#!/search/realtime/%23RoslynCTP"&gt;#RoslynCTP&lt;/a&gt; hashtag on Twitter.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Kirill Osenkov&lt;/p&gt;
&lt;p&gt;QA (Roslyn Services Team)&lt;/p&gt;
&lt;p&gt;Blog: &lt;a href="http://blogs.msdn.com/b/kirillosenkov"&gt;http://blogs.msdn.com/b/kirillosenkov&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Twitter: &lt;a href="http://twitter.com/#!/KirillOsenkov"&gt;@KirillOsenkov&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=10226695" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/announcement/">announcement</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/">extensibility</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/walkthrough/">walkthrough</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/Visual+Basic/">Visual Basic</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/C_2300_/">C#</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/Roslyn/">Roslyn</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/Kirill+Osenkov/">Kirill Osenkov</category></item><item><title>Extension Analyzer V3</title><link>http://blogs.msdn.com/b/visualstudio/archive/2010/10/01/extension-analyzer-v3-for-visual-studio-2010.aspx</link><pubDate>Fri, 01 Oct 2010 08:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10069582</guid><dc:creator>Visual Studio Blog</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/rsscomments.aspx?WeblogPostID=10069582</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/commentapi.aspx?WeblogPostID=10069582</wfw:comment><comments>http://blogs.msdn.com/b/visualstudio/archive/2010/10/01/extension-analyzer-v3-for-visual-studio-2010.aspx#comments</comments><description>&lt;p&gt;Extension Analyzer is an Extension to Visual Studio 2010 that allows browsing several extensibility entities inside of Visual Studio. It also allows diagnosing several common errors loading extensions by reporting information from logging services inside Visual Studio.&lt;/p&gt;
&lt;p&gt;The Extensibility team in Visual Studio has recently added several exciting features to the Extension Analyzer tool. In addition to browsing through Visual Studio Packages and MEF Extensions, it is now possible to browse through the collection of VSIX extensions and PkgDef files installed on the machine. The tool scans the contents of the VSIX extensions and PkgDef files and establishes relationships between the VS Packages, VSIX extensions, PkgDef files and MEF Components. These relationships allow navigation between the different entities. &lt;/p&gt;
&lt;p&gt;The latest version of the tool can be downloaded from the &lt;a href="http://visualstudiogallery.msdn.microsoft.com/en-us/56253144-6ffa-4e93-8224-6c59822ce900"&gt;Visual Studio Gallery&lt;/a&gt;. This post describes in detail the new features added to Extension Analyzer.&lt;/p&gt;
&lt;h3&gt;Extension Browser VSIX Tab&lt;/h3&gt;
&lt;p&gt;The new VSIX Tab displays information about installed VSIX Extensions. Each VSIX Extension has a unique VSIX Identifier plus other information about the Extension. When a row is selected in the grid, the Properties window updates with information about the selected VSIX. &lt;br /&gt;The VSIX Tab has a checkbox to toggle showing System Components or not. This allows reducing the amount of data the user sees, which typically does not need to browse through System Components. A System Component is a VSIX whose manifest has the SystemComponent property set. &lt;/p&gt;
&lt;p&gt;It is also possible to navigate back and forth between the VSIX Tab to see the definitions of VSIX units and the Log Viewer to see log events related to a specific VSIX. To collect events in the Log Viewer, remember to start Visual Studio with the /log switch.&lt;/p&gt;
&lt;p&gt;Selecting the context menu on a VSIX row includes the following actions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Navigate to Log entries for selected VSIX. &lt;/li&gt;
&lt;li&gt;Open VSIX Manifest in Visual Studio editor as XML. &lt;/li&gt;
&lt;li&gt;Open VSIX folder. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/0804.VSIXTabWithContextMenu_5F00_1C251B9F.jpg"&gt;&lt;img height="534" width="880" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/8420.VSIXTabWithContextMenu_5F00_thumb_5F00_3FFDCD2C.jpg" alt="VSIXTabWithContextMenu" border="0" title="VSIXTabWithContextMenu" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Extension Browser PkgDef Files Tab&lt;/h3&gt;
&lt;p&gt;The PkgDef Files Tab displays information about PkgDef files available to Visual Studio. Each row shows the short name of a PkgDef file, its path and if the PkgDef file is a System Component or not. This tab is also fully integrated with the Properties Window in Visual Studio.&lt;/p&gt;
&lt;p&gt;The value for System Component property is inherited from the VSIX that contains the PkgDef, if any. If the PkgDef did not come from a VSIX, the value for System Component is undefined (blank), because there is no exact way to determine if the PkgDef is a System Component or not. The PkgDef Files Tab contains a checkbox to toggle showing System Components or not. This is again to reduce the amount of relevant data the user sees.&lt;/p&gt;
&lt;p&gt;If a PkgDef file was deployed through a VSIX Extension, the value for the property VSIX Identifier contains the identifier of the corresponding VSIX. This value can be used to navigate to the corresponding VSIX Extension in the VSIX Tab and observe several other properties of that VSIX.&lt;/p&gt;
&lt;p&gt;Several PkgDef files (specially System Component ones) are not deployed through VSIX and their VSIX Identifier property will be empty. It is possible now to filter out columns with empty values by entering a filter like this in the Filter control of the tab: &lt;br /&gt;-VSIXIdentifier=&amp;rdquo;&amp;rdquo; &lt;/p&gt;
&lt;p&gt;Notice that the &amp;ldquo;-&amp;ldquo; prefix filters &lt;i&gt;out&lt;/i&gt; the rows with empty values. Without the &amp;ldquo;-&amp;ldquo; or with a &amp;ldquo;+&amp;rdquo; prefix will include the rows &lt;i&gt;with&lt;/i&gt; empty values.&lt;/p&gt;
&lt;p&gt;Similar to VSIX, it is also possible to navigate back and forth between the PkgDef Files Tab to see the definitions of PkgDef files and the Log Viewer to see log events related to a specific PkgDef file.&lt;/p&gt;
&lt;p&gt;Selecting the context menu on a PkgDef file row includes the following actions: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Navigate to Log entries for selected PkgDef. &lt;/li&gt;
&lt;li&gt;Navigate to VSIX that installed selected PkgDef (if available). &lt;/li&gt;
&lt;li&gt;Open PkgDef file in Visual Studio editor as XML. &lt;/li&gt;
&lt;li&gt;Open PkgDef file folder. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/6663.PkgDefFilesTabWithContextMenu_5F00_36C191EB.jpg"&gt;&lt;img height="493" width="880" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/2475.PkgDefFilesTabWithContextMenu_5F00_thumb_5F00_54BF9FDF.jpg" alt="PkgDefFilesTabWithContextMenu" border="0" title="PkgDefFilesTabWithContextMenu" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Updates to VS Packages Tab&lt;/h3&gt;
&lt;p&gt;The VS Packages Tab of the Extension Browser has been updated with a couple of features. There is now a new PkgDef File Identifier column that links a VS Package to the PkgDef, if any, that registers the package. The association between VS Packages and PkgDef files is done using the Codebase or Assembly properties for Managed packages or the Path property for Native packages.&lt;/p&gt;
&lt;p&gt;Several VS Packages internal to Visual Studio are registered directly during Setup and do not have PkgDef files associated with them. However, most VS Packages created by external users using Visual Studio 2010 will have PkgDef files and VSIX deployable units associated with them.&lt;/p&gt;
&lt;p&gt;There is also a new VSIX Identifier column that links a VS Package to the VSIX that deployed the package. These associations are computed using the PkgDef files that registered the VS Packages. Basically, a VSIX is associated with a VS Package if the VSIX contains a PkgDef file that registers the package.&lt;/p&gt;
&lt;p&gt;The Is System Component column is now computed from knowing if a VS Package is internal to Visual Studio or if the VSIX of the VS Package is marked as a System Component.&lt;/p&gt;
&lt;p&gt;Selecting the context menu on a VS Package row includes the following actions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Navigate to VSIX that installed the selected VS Package (if available). &lt;/li&gt;
&lt;li&gt;Navigate to PkgDef file that registered the selected VS Package (if available). &lt;/li&gt;
&lt;li&gt;Open VS Package file folder. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/4201.VSPackagesTab_5F00_66BBBD9F.jpg"&gt;&lt;img height="438" width="880" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/2553.VSPackagesTab_5F00_thumb_5F00_76E78598.jpg" alt="VSPackagesTab" border="0" title="VSPackagesTab" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;
&lt;h3&gt;Updates to MEF Components Tab&lt;/h3&gt;
&lt;p&gt;The MEF Components Tab of the Extension Browser has been updated with a couple of features as well. First, there is a new VSIX Identifier property for each MEF entity that allows correlating the MEF entity with a VSIX Extension that deployed the entity, if any. It is now possible to navigate to the VSIX Tab from a given MEF entity.&lt;/p&gt;
&lt;p&gt;One other feature added is to include a System Component column for each MEF entity. The value of this property is inherited from the VSIX that deployed the entity and allows filtering System Components using the Show System Component checkbox. This again substantially reduces the amount of data that external users see, showing only components that are more relevant and not internal to Visual Studio.&lt;/p&gt;
&lt;p&gt;The following context menus were added to MEF entities:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Navigate to VSIX that installed the selected MEF entity (if available). &lt;/li&gt;
&lt;li&gt;Open MEF entity folder. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/1884.MEFComponentsTabWithContextMenu_5F00_2DE163D2.jpg"&gt;&lt;img height="533" width="880" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/0003.MEFComponentsTabWithContextMenu_5F00_thumb_5F00_209ADABF.jpg" alt="MEFComponentsTabWithContextMenu" border="0" title="MEFComponentsTabWithContextMenu" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;We hope you find the new features in this tool useful.&lt;/p&gt;
&lt;p&gt;Mynor Ivan Muralles, Software Design Engineer, Visual Studio Team&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10069582" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/">extensibility</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VSIX/">VSIX</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/pkgdef/">pkgdef</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/MEF/">MEF</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extension/">extension</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/logging/">logging</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/dependency+analysis/">dependency analysis</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/package/">package</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/contract/">contract</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/load/">load</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/export/">export</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/load+error/">load error</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/composition/">composition</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/analysis/">analysis</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/import/">import</category></item><item><title>15 minute blog post: PNG files in Packages</title><link>http://blogs.msdn.com/b/visualstudio/archive/2010/06/27/15-minute-blog-post-png-files-in-packages.aspx</link><pubDate>Sun, 27 Jun 2010 23:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10031368</guid><dc:creator>Visual Studio Blog</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/rsscomments.aspx?WeblogPostID=10031368</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/commentapi.aspx?WeblogPostID=10031368</wfw:comment><comments>http://blogs.msdn.com/b/visualstudio/archive/2010/06/27/15-minute-blog-post-png-files-in-packages.aspx#comments</comments><description>&lt;p&gt;Recently I&amp;rsquo;ve been helping plan the next version of Visual Studio. It&amp;rsquo;s way too early to be talking about specifics, but one topic came up this week that I have to share.&lt;/p&gt;
&lt;h3&gt;&lt;/h3&gt;
&lt;h3&gt;Package Authoring&lt;/h3&gt;
&lt;p&gt;As some of you may have noticed, many of the regular posters here have been busy writing extensions for the &lt;a href="http://visualstudiogallery.msdn.microsoft.com"&gt;Visual Studio Gallery&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/b/visualstudio/archive/2010/06/10/document-well-2010-plus.aspx"&gt;some&lt;/a&gt; &lt;a href="http://blogs.msdn.com/b/visualstudio/archive/2010/05/13/announcing-collapse-selection-in-solution-explorer-extension.aspx"&gt;of&lt;/a&gt; &lt;a href="http://blogs.msdn.com/b/visualstudio/archive/2010/01/04/changing-visual-studio-s-color-palette.aspx"&gt;which&lt;/a&gt; &lt;a href="http://blogs.msdn.com/b/visualstudio/archive/2010/06/17/command-image-changing-extension.aspx"&gt;have&lt;/a&gt; &lt;a href="http://blogs.msdn.com/b/visualstudio/archive/2010/02/25/visual-studio-2010-background-flickering-and-customization.aspx"&gt;been&lt;/a&gt; featured on this blog. You too can create extensions for Visual Studio 2010 using the &lt;a href="http://msdn.microsoft.com/en-us/library/bb286983.aspx"&gt;Visual Studio SDK&lt;/a&gt;. If you&amp;rsquo;ve ever created a package with menu items (commands) using the SDK you&amp;rsquo;ll notice that the default wizard-generated package contains a sample image strip that looks like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/0878.image_5F00_54B9F8B2.png"&gt;&lt;img height="20" width="84" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/6747.image_5F00_thumb_5F00_71DFA0BC.png" alt="image" border="0" title="image" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;These are the little 16x16 icons that appear on menu items and toolbar buttons. It&amp;rsquo;s just placeholder artwork for various commands that you might want to implement in your new package. You&amp;rsquo;re supposed to edit the image to add your own artwork. However, the image is in a strange format: It&amp;rsquo;s a 32 bits per pixel image with a .BMP extension (the filename is &amp;ldquo;Images_32bit.bmp&amp;rdquo;). If you try and edit it in Visual Studio, you&amp;rsquo;ll find that the built-in image editor doesn&amp;rsquo;t understand the format. The interesting thing is that this image contains a full 8-bit alpha channel. We&amp;rsquo;ve come across alpha channels before in the &lt;a href="http://blogs.msdn.com/b/visualstudio/archive/2009/11/11/behind-the-scenes-splash-screen.aspx"&gt;discussion of the Splash Screen&lt;/a&gt; and another area where Visual Studio supports full alpha is on menus and toolbars. Unfortunately, the .BMP file specification doesn&amp;rsquo;t officially support this 32bpp ARGB format and many applications will either refuse to recognize it or will drop the alpha channel on saving.&lt;/p&gt;
&lt;h3&gt;&lt;/h3&gt;
&lt;h3&gt;PNG to the rescue&lt;/h3&gt;
&lt;p&gt;Since this 32-bit ARGB format is so hard to work with, I suggested to the planning group that we add support for &lt;a href="http://en.wikipedia.org/wiki/PNG"&gt;.PNG files&lt;/a&gt; to the &lt;a href="http://msdn.microsoft.com/en-us/library/bb491708.aspx"&gt;VSCT compiler&lt;/a&gt; (the compiler which reads your package&amp;rsquo;s &lt;a href="http://msdn.microsoft.com/en-us/library/bb164699.aspx"&gt;command definitions&lt;/a&gt;, including these bitmap strips, and produces binary resources). The owner of the VSCT compiler replied and said that there was no need because it already did support .PNG &amp;ndash; in fact, it accepts any format that &lt;a href="http://msdn.microsoft.com/en-us/library/system.drawing.image.fromfile.aspx"&gt;System.Drawing.Image.FromFile&lt;/a&gt; supports. Sure enough, after a quick experiment, I confirmed that is true and, indeed, MSDN already has the &lt;a href="http://msdn.microsoft.com/en-us/library/bb932539.aspx"&gt;appropriate note&lt;/a&gt; if you know where to look. Somehow, I had assumed that, since the wizard spat out that annoying 32-bit BMP file, that was the only file format supported and, moreover, I don&amp;rsquo;t think I&amp;rsquo;ve ever seen anyone use PNG files internally &amp;ndash; and I&amp;rsquo;ve seen a &lt;em&gt;lot&lt;/em&gt; of VSCT files in my travails/travels.&lt;/p&gt;
&lt;h3&gt;&lt;/h3&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;So, there you have it. Use .PNG files for your bitmap strips. PNG has, in recent years, become the de-facto standard for images with full-transparency and lossless compression and there are many free image editing applications which support it. &lt;/p&gt;
&lt;p&gt;P.S. I wasn&amp;rsquo;t the &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/6abc5145-3782-4438-8f46-a05cdb34c113/"&gt;first to spot this&lt;/a&gt;, and, since I started writing this article and doing a little research, I found a few examples of using .PNG files in VSCT on &lt;a href="http://www.bing.com/search?q=PNG+and+VSCT+site%3Acodeplex.com&amp;amp;form=QBLH&amp;amp;qs=n&amp;amp;sk="&gt;codeplex&lt;/a&gt;. Still I think this little known fact deserves some more visibility. Perhaps in the next version of the SDK we can change the template to emit PNG files by default.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/BehindtheScenesSplashScreen_CC39/clip_image002_2.jpg"&gt;&lt;em&gt;&lt;img height="101" width="101" src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/BehindtheScenesSplashScreen_CC39/clip_image002_thumb.jpg" align="left" alt="clip_image002" border="0" title="clip_image002" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 3px; border-left-width: 0px; margin-right: 3px" /&gt;&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Paul Harrington&lt;/strong&gt; &amp;ndash; Principal Developer, Visual Studio Platform Team. &lt;br /&gt;&lt;strong&gt;Biography: &lt;/strong&gt;Paul has worked on every version of Visual Studio .Net to date. Prior to joining the Visual Studio team in 2000, Paul spent six years working on mapping and trip planning software for what is today known as Bing Maps. For Visual Studio 2010, Paul was the architect for the move to WPF. Paul holds a master&amp;rsquo;s degree from the University of Cambridge, England and lives with his wife and two cats in Seattle, Washington.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10031368" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/Paul+Harrington/">Paul Harrington</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/">extensibility</category></item><item><title>Document Well 2010 Plus</title><link>http://blogs.msdn.com/b/visualstudio/archive/2010/06/10/document-well-2010-plus.aspx</link><pubDate>Wed, 09 Jun 2010 23:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10022640</guid><dc:creator>Visual Studio Blog</dc:creator><slash:comments>54</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/rsscomments.aspx?WeblogPostID=10022640</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/commentapi.aspx?WeblogPostID=10022640</wfw:comment><comments>http://blogs.msdn.com/b/visualstudio/archive/2010/06/10/document-well-2010-plus.aspx#comments</comments><description>&lt;div sizset="0" sizcache="3" id="longDesc"&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:4395803e-7501-4b70-86a8-19a96947d7b7" style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px"&gt;&lt;/div&gt;
&lt;p&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="color: #666666;"&gt;[&lt;b&gt;Update 6/21/2010&lt;/b&gt;]: Please go to &lt;a href="http://blogs.msdn.com/b/visualstudio/archive/2010/06/21/document-well-2010-plus-hidden-options.aspx"&gt;this blog post&lt;/a&gt; where I describe even more configuration options that are available for this extension.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="color: #666666;"&gt;[&lt;b&gt;Update 7/20/2010&lt;/b&gt;]: Updated changes made for version 10.0.10710.22 of the Pro Power Tools. Please take a look at the &lt;a href="#changelog"&gt;changelog&lt;/a&gt;.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;For some time, the behavior of tabs in Visual Studio's document well has been a source of frustration for some users. Whenever behavior is modified, some users are happy with the changes, while others are not. In an attempt to alleviate this problem I have created this extension, which provides configurable behavior for document tabs. It is available in the Visual Studio Gallery, as part of the &lt;a href="http://visualstudiogallery.msdn.microsoft.com/en-us/d0d33361-18e2-46c0-8ff2-4adea1e34fef"&gt;Visual Studio 2010 Pro Power Tools&lt;/a&gt;. All configuration options are accessible by selecting &lt;span style="font-family: courier new,courier,monospace"&gt;Tools/Options.../Pro Power Tools/Document Tab Well&lt;/span&gt;. I encourage you to experiment with all available options, so you can find what works best for you.&lt;/p&gt;
&lt;h2&gt;Configuration Presets&lt;/h2&gt;
&lt;p&gt;This extension provides a fairly large &lt;a href="#featurelist"&gt;feature list&lt;/a&gt;. To provide examples of what is possible, as well as a starting point for users to build their own configurations, we include several different presets that showcase the features available. They are the following:&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Visual Studio 2008&lt;/b&gt;&lt;/p&gt;
&lt;table style="width: 100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="width: 345px;"&gt;&lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/$preset2008[3].png"&gt;&lt;/a&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/6862.preset2008.png" border="0" /&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;This preset mimics the behavior of Visual Studio 2008: The close button will be located in the document well, instead of in each individual tab.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;b&gt;Visual Studio 2010&lt;/b&gt;&lt;/p&gt;
&lt;table style="width: 100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="width: 349px;"&gt;&lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/$preset2010[3].png"&gt;&lt;/a&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/1423.preset2010.png" border="0" /&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;This preset mimics the behavior of Visual Studio 2010.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;b&gt;Web Browser: Scrollable tab well&lt;/b&gt;&lt;/p&gt;
&lt;table style="width: 100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="width: 460px;"&gt;&lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/$presetWebBrowser[3].png"&gt;&lt;/a&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/0310.presetWebBrowser.png" border="0" /&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;This preset mimics the behavior of commonly used web browsers. Tabs will be scrollable, icons and a close button will appear in each tab, and new tabs will be inserted on the right by default. &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;b&gt;Scrollable Tab Well: Sorted by project&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/$presetSortedByProject[3].png"&gt;&lt;/a&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/1000x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/6835.presetSortedByProject.png" border="0" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This preset will have scrollable tabs, sort them and color them according to the project they belong to. This is useful if you regularly work in a solution with several projects.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Vertical Tab Well: Color coded and sorted by project&lt;/b&gt;&lt;/p&gt;
&lt;table style="width: 100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="width: 306px;"&gt;&lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/$presetVertical[3].png"&gt;&lt;/a&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/8206.presetVertical.png" border="0" /&gt;&amp;nbsp;&lt;/td&gt;
&lt;td style="vertical-align: top"&gt;
&lt;p&gt;This preset is similar to the previous one, but additionally tabs are shown vertically. This allows showing more tabs than is normally possible when laid out horizontally.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;b&gt;Dynamic Tab Well: Removes tabs based on usage&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;This preset showcases a modification to standard Visual Studio 2010 behavior. Instead of hiding tabs that are on the right of the tab well when there is no more space available for them, it will hide the least recently used tab.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;a name="featurelist"&gt;&lt;/a&gt;
&lt;h2&gt;Feature List&lt;/h2&gt;
&lt;p&gt;At the moment the extension provides the following configurable behavior features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#tabwellui"&gt;Tab Well UI&lt;/a&gt; 
&lt;ul&gt;
&lt;li&gt;&lt;a href="#scrollable"&gt;Scrollable tabs&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="#vertical"&gt;Vertical tabs&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="#pinned"&gt;Pinned tabs&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="#closebuttoninwell"&gt;Show close button in tab well&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#tabbehavior"&gt;Tab Behavior&lt;/a&gt; 
&lt;ul&gt;
&lt;li&gt;&lt;a href="#lru"&gt;Remove tabs by usage order (LRU)&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="#insertright"&gt;Insert tabs at right&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="#pinnedtabsseparate"&gt;Show pinned tabs in a separate row/column&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#sorting"&gt;Sorting&lt;/a&gt; 
&lt;ul&gt;
&lt;li&gt;&lt;a href="#sortbyproject"&gt;Sort tabs by project&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="#sortalphabetically"&gt;Sort tabs alphabetically&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="#sortdropdownalphabetically"&gt;Sort tab well dropdown alphabetically&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#tabui"&gt;Tab UI&lt;/a&gt; 
&lt;ul&gt;
&lt;li&gt;&lt;a href="#coloringtabs"&gt;Color tabs according to their project or according to regular expressions&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="#miscellaneousuioptions"&gt;Miscellaneous options that modify tab UI&lt;/a&gt; 
&lt;ul&gt;
&lt;li&gt;Show document/toolwindow icon in tab &lt;/li&gt;
&lt;li&gt;Show close button in tab &lt;/li&gt;
&lt;li&gt;Show pin button in unpinned tabs&lt;/li&gt;
&lt;li&gt;Modify dirty indicator style &lt;/li&gt;
&lt;li&gt;Modify minimum and maximum tab size&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#misccommands"&gt;Useful Commands&lt;/a&gt; 
&lt;ul&gt;
&lt;li&gt;Close all but pinned&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;Tab Well UI&lt;/h1&gt;
&lt;h2&gt;&lt;a name="scrollable"&gt;&lt;/a&gt;Scrollable Tabs&lt;/h2&gt;
&lt;p&gt;By default, VS 2010 hides tabs when there is not enough space to display all those that are open. When a hidden tab needs to be visible, it is inserted at the beginning or the end of the tab well, according to preferences.&lt;/p&gt;
&lt;p&gt;We provide the ability to instead scroll tabs, thus avoiding the need to change their position in the tab well whenever they become visible:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/$scrollable1[3].png"&gt;&lt;/a&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/0336.scrollable1.png" border="0" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note the arrow button on the right of the tab well. Clicking it will scroll the tabs one at a time. Keeping it pressed will continually scroll tabs until it is released.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/$scrollable2[3].png"&gt;&lt;/a&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/1000x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/7875.scrollable2.png" border="0" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The selected file has been scrolled to the left and is now not visible in the document well. In order to find out now what is the selected tab, we can simply press the document well drop down button:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/4382.dropdown1.png" border="0" /&gt;&lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/$dropdown1[3].png"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Note that the selected tab appears in &lt;b&gt;bold&lt;/b&gt;, and all hidden tabs appear in &lt;i&gt;italics&lt;/i&gt;. Note that in this example the files in the drop down appear in visual order, instead of alphabetically sorted, which is the default behavior of VS 2010. This is configurable through the &lt;a href="#sortdropdownalphabetically"&gt;sorting&lt;/a&gt; options.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;a name="vertical"&gt;&lt;/a&gt;
&lt;h2&gt;Vertical Tabs&lt;/h2&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="328"&gt;&lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/$verticalTabs[3].png"&gt;&lt;/a&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/6765.verticalTabs.png" border="0" /&gt;&amp;nbsp;&lt;/td&gt;
&lt;td width="779" style="margin-left: 20px; vertical-align: top"&gt;
&lt;div style="margin-left: 20px; vertical-align: top"&gt;
&lt;p&gt;If you work with many open documents at once, you might find that showing tabs vertically allows you to have a larger number of tabs visible. You will be able to open more documents before any of them needs to be hidden.&lt;/p&gt;
&lt;p&gt;Please note that you cannot reorder tabs when displayed vertically. My personal recommendation would be to keep them sorted alphabetically so they are easy to find.&lt;/p&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;&lt;a name="pinned"&gt;&lt;/a&gt;Pinned Tabs&lt;/h2&gt;
&lt;p&gt;While the objective of LRU mode is to keep your most recently used tabs available, you might want to always have some documents easily accessible, no matter how often you access them. By pinning a tab, it will always be readily available.&lt;/p&gt;
&lt;p&gt;Let's say you have 4 files open in your project: &lt;span style="font-family: courier new,courier,monospace"&gt;Class1.cs&lt;/span&gt;, &lt;span style="font-family: courier new,courier,monospace"&gt;Class2.cs&lt;/span&gt;, &lt;span style="font-family: courier new,courier,monospace"&gt;Class3.cs&lt;/span&gt; and &lt;span style="font-family: courier new,courier,monospace"&gt;Program.cs&lt;/span&gt;. You might have something like the following image:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/$pinnedtabs1[3].png"&gt;&lt;/a&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/6505.pinnedtabs1.png" border="0" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Notice that only 3 tabs are visible, as there is no space to show all of them. If you are mainly working on &lt;span style="font-family: courier new,courier,monospace"&gt;Program.cs&lt;/span&gt;, but have to constantly switch to the other tabs, there is a chance that the tab you mainly work on might become hidden. You will probably want to have this document always available. If a tab has to be hidden, it should be any of the others. When you hover the mouse pointer over a tab, you will notice that a pin button becomes visible. Pressing this button will pin the tab. Alternatively, press the right mouse button over the tab, in order to bring up its context menu, and select "&lt;span style="font-family: courier new,courier,monospace"&gt;Pin Tab&lt;/span&gt;" (This command is also available through the menu option &lt;span style="font-family: courier new,courier,monospace"&gt;Window/Pin Tab&lt;/span&gt;):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/$pinnedhover[2].png"&gt;&lt;/a&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/3125.pinnedhover.png" border="0" /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/7181.pinnedCtxtMenu.png" border="0" /&gt;&lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/$pinnedCtxtMenu[3].png"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;After selecting this command, the selected tab will become pinned. Notice that the tab has been brought to the front of the document well, and that it has a pin button to indicate its status. You can press this button to unpin the tab, or alternatively use either the tab's context menu or the &lt;span style="font-family: courier new,courier,monospace"&gt;Window/Pin Tab&lt;/span&gt; menu option:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/$pinnedtabs2[3].png"&gt;&lt;/a&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/2625.pinnedtabs2.png" border="0" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;An important note&lt;/b&gt;: At the moment you cannot reorder pinned tabs. They will appear in the same order they had in the regular tab strip. If you attempt to move a pinned tab it will become a floating window.&lt;/p&gt;
&lt;a name="pinnedtabsseparate"&gt;&lt;/a&gt;
&lt;h3&gt;Show Pinned Tabs in a Separate Row/Column&lt;/h3&gt;
&lt;p&gt;If you have several tabs pinned, you might soon run out of space in the document well to display unpinned tabs. The extension also provides an option that will use a separate row for showing only pinned tabs. If this option is turned on, our previous example will appear as follows:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/$pinnedSeparateRow[3].png"&gt;&lt;/a&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/8662.pinnedSeparateRow.png" border="0" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Notice that now all our tabs are visible.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;a name="closebuttoninwell"&gt;&lt;/a&gt;
&lt;h2&gt;Show close button in tab well&lt;/h2&gt;
&lt;p&gt;This setting brings back the close button that was present in the document well in Visual Studio 2008. It will close the currently active tab in the document well.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;a name="tabbehavior"&gt;&lt;/a&gt;
&lt;h1&gt;Tab Behavior&lt;/h1&gt;
&lt;h2&gt;&lt;a name="lru"&gt;&lt;/a&gt;Remove Tabs By Usage Order&lt;/h2&gt;
&lt;p&gt;This behavior extends the default VS 2010 fixed document well. Tabs that do not fit in the available space will be hidden, but instead of hiding the tab on the right or the left of the tab well (according to preferences), the tab that will be hidden is the least recently used tab. This makes commonly used tabs available.&lt;/p&gt;
&lt;p&gt;In the following example we have 4 tabs open. The order in which they were shown is &lt;span style="font-family: courier new,courier,monospace"&gt;Class1.cs&lt;/span&gt;, &lt;span style="font-family: courier new,courier,monospace"&gt;Class2.cs&lt;/span&gt;, &lt;span style="font-family: courier new,courier,monospace"&gt;Class3.cs&lt;/span&gt; and &lt;span style="font-family: courier new,courier,monospace"&gt;Class4.cs&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/$lru1[3].png"&gt;&lt;/a&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/1033.lru1.png" border="0" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When the space available is reduced, the least recently used tab (&lt;span style="font-family: courier new,courier,monospace"&gt;Class1.cs&lt;/span&gt;) is hidden. If we show the tab well drop down, we can confirm that &lt;span style="font-family: courier new,courier,monospace"&gt;Class3.cs&lt;/span&gt; has been hidden but still remains between &lt;span style="font-family: courier new,courier,monospace"&gt;Class2.cs&lt;/span&gt; and &lt;span style="font-family: courier new,courier,monospace"&gt;Class4.cs&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/$lru2[3].png"&gt;&lt;/a&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/7120.lru2.png" border="0" /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/2251.dropdown2.png" border="0" /&gt;&lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/$dropdown2[2].png"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;If we select &lt;span style="font-family: courier new,courier,monospace"&gt;Class1.cs&lt;/span&gt; from the drop down to make it visible, the tab that will be now hidden is &lt;span style="font-family: courier new,courier,monospace"&gt;Class2.cs&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/6740.lru3.png" border="0" /&gt;&lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/$lru3[3].png"&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/5265.dropdown3.png" border="0" /&gt;&lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/$dropdown3[2].png"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;a name="insertright"&gt;&lt;/a&gt;
&lt;h2&gt;Insert Tabs At Right&lt;/h2&gt;
&lt;p&gt;By default Visual Studio 2010 inserts new tabs to the left of the document well. Turning on this option will insert new tabs to the right instead. This option will have no effect if alphabetical sorting is turned on.&lt;/p&gt;
&lt;p&gt;Please note this option is the same option that is present in &lt;span style="font-family: courier new,courier,monospace"&gt;Tools/Options.../Environment/Documents&lt;/span&gt;. It is presented in our options dialog as a convenience to our users.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;a name="sorting"&gt;&lt;/a&gt;
&lt;h1&gt;Sorting&lt;/h1&gt;
&lt;a name="sortbyproject"&gt;&lt;/a&gt;
&lt;h2&gt;Sort Tabs By Project&lt;/h2&gt;
&lt;p&gt;Documents that belong to the same project will be grouped together in the tab well. When alphabetical sorting is on, tabs will be sorted by project first and then by name. Having this option turned on and alphabetical sort off will allow tab reordering, but only within the project group.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;a name="sortalphabetically"&gt;&lt;/a&gt;
&lt;h2&gt;Sort Tabs Alphabetically&lt;/h2&gt;
&lt;p&gt;Whenever a tab is added to the tab well it will be inserted in its corresponding alphabetically ordered position. Naturally, this precludes tab reordering.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;a name="sortdropdownalphabetically"&gt;&lt;/a&gt;
&lt;h2&gt;Sort Drop Down Alphabetically&lt;/h2&gt;
&lt;p&gt;Default Visual Studio 2010 behavior is to display the document well drop down in alphabetical order. This option allows the dropdown to appear in the same order in which the tabs are laid out. This is particularly useful when Removal by Usage Order is turned on.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;a name="tabui"&gt;&lt;/a&gt;
&lt;h1&gt;Tab UI&lt;/h1&gt;
&lt;a name="coloringtabs"&gt;&lt;/a&gt;
&lt;h2&gt;Coloring Tabs&lt;/h2&gt;
&lt;div id="longDesc0"&gt;
&lt;p&gt;The extension provides the ability to set custom colors for document well tabs. Tabs can be colored according to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Regular Expressions &lt;/li&gt;
&lt;li&gt;Project they belong to &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Select &lt;span style="font-family: courier new,courier,monospace"&gt;Tools/Options.../Environment/Document Tab Behavior/Color Coding &lt;/span&gt;to configure the colors that will be used for tabs according to the project they belong to, as well as regular expressions that will be used to color tabs. Matching for these regular expressions is case-insensitive.&lt;/p&gt;
We provide by default 15 colors for coloring tabs according to their project. If your solution has more than 15 projects, colors will be reused. You can always add more custom colors if you need to.
&lt;p&gt;In the following example a red color is used for tabs that match "&lt;span style="font-family: courier new,courier,monospace"&gt;.*\.xaml$&lt;/span&gt;", a blue color is used for tabs that match "&lt;span style="font-family: courier new,courier,monospace"&gt;.*\[design\].*&lt;/span&gt;", and a green color is used for tabs that match "&lt;span style="font-family: courier new,courier,monospace"&gt;.*\.txt$&lt;/span&gt;":&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/$regexcolorsflat[3].png"&gt;&lt;/a&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/7142.regexcolorsflat.png" border="0" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the following example we can see a solution that contains 3 projects, with coloring according to project turned on. This feature is specially useful when used with "sort tabs by project":&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/7041.projectcolors.png" border="0" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;a name="miscellaneousuioptions"&gt;&lt;/a&gt;
&lt;h2&gt;Miscellaneous Tab UI Options&lt;/h2&gt;
&lt;p&gt;The extension provides the following options for configuring the UI of individual tabs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Close button presence&lt;/b&gt; - Allows to configure whether the Close button appears in the tab or not. &lt;/li&gt;
&lt;li&gt;&lt;b&gt;Dirty Indicator style&lt;/b&gt; - Allows to use a red dot or a disk icon as alternatives to the old text asterisk to indicate that a file is dirty.&amp;nbsp;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/$dirties[3].png"&gt;&lt;/a&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/2555.dirties.png" border="0" /&gt; &lt;/li&gt;
&lt;li&gt;&lt;b&gt;Show document/toolwindow icon&lt;/b&gt;: If selected, the icon corresponding to the current open document or toolwindow will be shown in the tab.&amp;nbsp;&lt;br /&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/6724.TabItemIcons.png" border="0" /&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Show pin button in unpinned tabs&lt;/b&gt; - When unchecked, will hide the pin button that appears on hover in unpinned tabs.&lt;br /&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/7827.pinbuttonvisible.png" border="0" /&gt;&amp;nbsp;&amp;nbsp;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/3201.pinbuttonnotvisible.png" border="0" /&gt; &lt;/li&gt;
&lt;li&gt;&lt;b&gt;Set minimum and maximum tab sizes&lt;/b&gt; - If you think tabs in VS are too big or too small, you can configure their maximum and minimum sizes here. Try making the minimum size the same as the maximum size, and you will have evenly spaced tabs:&amp;nbsp;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/$SameSizeTabs[7].png"&gt;&lt;/a&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/4643.SameSizeTabs.png" border="0" /&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;a name="misccommands"&gt;&lt;/a&gt;
&lt;h1&gt;Useful Commands&lt;/h1&gt;
&lt;p&gt;&lt;b&gt;Close all but pinned&lt;/b&gt; - This command (accessible through a document tab's context menu) will close all document tabs that are not currently pinned.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/0525.closeallbutpinned.png" border="0" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;&lt;a name="changelog"&gt;&lt;/a&gt;Changelog&lt;/h1&gt;
&lt;h2&gt;Version 10.0.10710.22&lt;br /&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Added configuration option in UI for showing/hiding pin button in unpinned tabs&lt;/li&gt;
&lt;li&gt;Made selected tab use a color gradient by default in order to make it more distinguishable when using custom colors&lt;/li&gt;
&lt;li&gt;Added configurable colors for text in selected and unselected tabs, as in some instances the text was not readable&lt;/li&gt;
&lt;li&gt;Added command: "Close all but pinned".&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;h1&gt;Tell Us What You Think&lt;/h1&gt;
&lt;p&gt;Please be sure to tell us your opinion about this extension and the features provided. There is a chance that the most-liked and/or useful features will be included in the next version of Visual Studio, and of course we would like to improve on any feature that our users don't find useful. You will find a hyperlink in our options dialog which you can use to provide us with feedback. You can also add comments to this post directly,&amp;nbsp;add/contribute to a discussion in the Visual Studio Gallery page for the &lt;a href="http://visualstudiogallery.msdn.microsoft.com/en-us/d0d33361-18e2-46c0-8ff2-4adea1e34fef"&gt;Visual Studio 2010 Pro Power Tools&lt;/a&gt;, or send us feedback directly at docwell2010plus [at] microsoft.com.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Note&lt;/b&gt;: We have received reports of problems with this extension when the &lt;a href="http://www.tabsstudio.com"&gt;Tabs Studio&lt;/a&gt; plug-in is installed, as they both replace default behavior in the document tab well. &lt;a href="http://blog.tabsstudio.com/2010/06/09/visual-studio-2010-pro-power-tools-support/"&gt;Their latest version&lt;/a&gt; has been updated to work with the Pro Power Tools. As you might imagine, Tabs Studio will supercede almost all functionality of this extension.&lt;/p&gt;
&lt;p&gt;However, if for some reason you cannot upgrade, you can still install the Pro Power Tools and disable this extension by running the following command (from a regular command prompt, or pressing Win+R): &lt;br /&gt;&lt;span style="font-family: courier new,courier,monospace"&gt;reg add HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\DialogPage\Microsoft.DocWellBehavior.GeneralOptions /v Behavior /t REG_SZ /d Default&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;table cellpadding="2" cellspacing="0" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="112" valign="top"&gt;&lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/$radames[2].png"&gt;&lt;/a&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92/5353.radames.png" border="0" /&gt;&amp;nbsp;&lt;/td&gt;
&lt;td width="1001" valign="top"&gt;&lt;b&gt;Radames Cruz Moreno&lt;/b&gt; &amp;ndash; Software Developer, Visual Studio Platform Team &lt;br /&gt;&lt;b&gt;Biography&lt;/b&gt;: Radames arrived at Microsoft in 2008, just in time to help with development of Visual Studio 2010 since its early stages. He worked mainly helping develop the new WPF window docking system. Prior to that he worked in several interesting projects in Mexico using every technology and language imaginable, from C++ and Java to COBOL (shudder).&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10022640" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/">extensibility</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/features/">features</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VS+Gallery/">VS Gallery</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/Tab+Well/">Tab Well</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extension/">extension</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/Radames+Cruz+Moreno/">Radames Cruz Moreno</category></item><item><title>Walkthrough-- Publishing an Extensibility Web Control Project Template (Part 2 of 2)</title><link>http://blogs.msdn.com/b/visualstudio/archive/2010/06/01/walkthrough-publishing-an-extensibility-web-control-project-template-part-2-of-2.aspx</link><pubDate>Tue, 01 Jun 2010 18:32:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10018390</guid><dc:creator>Visual Studio Blog</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/rsscomments.aspx?WeblogPostID=10018390</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/commentapi.aspx?WeblogPostID=10018390</wfw:comment><comments>http://blogs.msdn.com/b/visualstudio/archive/2010/06/01/walkthrough-publishing-an-extensibility-web-control-project-template-part-2-of-2.aspx#comments</comments><description>&lt;h4&gt;Introduction&lt;/h4&gt;
&lt;p&gt;In &lt;b&gt;&lt;a href="http://blogs.msdn.com/b/visualstudio/archive/2010/05/25/walkthrough-publishing-a-custom-web-control-part-1-of-2.aspx"&gt;Walkthrough-- Publishing a Custom Web Control (Part 1 of 2)&lt;/a&gt;&lt;/b&gt; you learned to create and publish a custom web control. You created the extensibility project manually, a procedure with many steps. Now that you have an extensibility project template, you can publish it to the Visual Studio gallery. Anyone who wants to create and publish a custom web control can download and install your template and create the project in one step. &lt;/p&gt;
&lt;p&gt;In the second part of this walkthrough, you will learn to&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create a VSIX project template extension. &lt;/li&gt;
&lt;li&gt;Publish the project template to the Visual Studio Gallery. &lt;/li&gt;
&lt;li&gt;Install the project template from the Visual Studio Gallery. &lt;/li&gt;
&lt;li&gt;Test the installed project template. &lt;/li&gt;
&lt;li&gt;Remove the project template from the Visual Studio Gallery. &lt;/li&gt;
&lt;li&gt;Add a debug action to the project template. &lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Prerequisites&lt;/h4&gt;
&lt;p&gt;To follow this walkthrough, you must have a working knowledge of web controls, creating new projects, setting project properties, and using the Visual Studio experimental instance. You must have both Visual Studio 2010 and the Visual Studio 2010 SDK installed on your computer. In addition, you must have completed the first part of this walkthrough.&lt;/p&gt;
&lt;h4&gt;Creating and Publishing an Extensibility Web Control Template&lt;/h4&gt;
&lt;p&gt;To create an extensibility web control project template, start with the custom web control project that you created in the first part of this walkthrough. Because this project includes the ColorTextControl web control, you can use this template to create custom web controls that render as colored text. &lt;/p&gt;
&lt;p&gt;To publish a project template to the Visual Studio gallery, you must create the project template as a VSIX extension and provide it with an icon and a screenshot. The easiest way to do this is to use the &lt;b&gt;Export Template as VSIX&lt;/b&gt; wizard.&lt;/p&gt;
&lt;p&gt;1. Open the MyWebControls project in Visual Studio.&lt;/p&gt;
&lt;p&gt;2. Use the Extension Manager to download the &lt;a href="http://visualstudiogallery.msdn.microsoft.com/en-us/57320b20-34a2-42e4-b97e-e615c71aca24"&gt;&lt;b&gt;Export Template as VSIX wizard&lt;/b&gt;&lt;/a&gt; from the Visual Studio gallery. This adds the &lt;b&gt;Export Template as VSIX &amp;hellip;&lt;/b&gt; item to the File menu when a project is open. &lt;/p&gt;
&lt;p&gt;3. Select the &lt;b&gt;Export Template as VSIX&lt;/b&gt; menu item.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/3581.clip_5F00_image002_5F00_3171C0B4.jpg"&gt;&lt;img height="244" width="192" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/2746.clip_5F00_image002_5F00_thumb_5F00_75D1B1F3.jpg" alt="clip_image002" border="0" title="clip_image002" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;4. In the &lt;b&gt;Choose Template Type&lt;/b&gt; page, make sure that &lt;b&gt;Project Template&lt;/b&gt; is selected, and that the MyWebControls.csproj check box is checked. Click Next.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/8625.clip_5F00_image004_5F00_42294595.jpg"&gt;&lt;img height="194" width="244" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/0285.clip_5F00_image004_5F00_thumb_5F00_649DD450.jpg" alt="clip_image004" border="0" title="clip_image004" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;5. In the &lt;b&gt;Select Template Options&lt;/b&gt; page, set the &lt;b&gt;Template Name&lt;/b&gt; to &lt;i&gt;Extensibility Color Text Web Toolbox Control&lt;/i&gt; and the &lt;b&gt;Template Description&lt;/b&gt; to &lt;i&gt;Color text web control project that produces a VSIX extension&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;6. In the&lt;b&gt; Icon Image&lt;/b&gt; text box, &lt;b&gt;Browse&lt;/b&gt; to and select the Color.bmp file. You must set the file filter to All Files (*.*) to see this file.&lt;/p&gt;
&lt;p&gt;7. In the &lt;b&gt;Preview Image&lt;/b&gt; text box, &lt;b&gt;Browse&lt;/b&gt; to and select the ScreenShot.bmp file. You must set the file filter to All Files (*.*) to see this file. Click Next.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/6562.clip_5F00_image006_5F00_433E2EB4.jpg"&gt;&lt;img height="182" width="244" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/5504.clip_5F00_image006_5F00_thumb_5F00_36D00B8B.jpg" alt="clip_image006" border="0" title="clip_image006" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;8. In the &lt;b&gt;Select VSIX Options&lt;/b&gt; page, change the &lt;b&gt;Product Name&lt;/b&gt; to &lt;i&gt;Extensibility Color Text Web Control Template&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;9. Change the &lt;b&gt;Company Name&lt;/b&gt;, and so forth, as desired.&lt;/p&gt;
&lt;p&gt;10. Uncheck the &lt;b&gt;Automatically import the template into Visual Studio&lt;/b&gt; check box, then click Finish.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/1768.clip_5F00_image008_5F00_48406C63.jpg"&gt;&lt;img height="38" width="244" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/7651.clip_5F00_image008_5F00_thumb_5F00_0EBD5C6C.jpg" alt="clip_image008" border="0" title="clip_image008" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In a moment, the Windows Explorer opens to display the Extensibility Color Text Web Control Template.vsix file in the &amp;lt;Users&amp;gt;\My Documents\Visual Studio 2010\My Exported Templates folder.&lt;/p&gt;
&lt;h4&gt;Publishing the web control project template VSIX file&lt;/h4&gt;
&lt;p&gt;You are now ready to publish your project template to the Visual Studio gallery.&lt;/p&gt;
&lt;p&gt;1. Launch your web browser and navigate to &lt;a href="http://visualstudiogallery.msdn.microsoft.com"&gt;http://visualstudiogallery.msdn.microsoft.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;2. Click the &lt;b&gt;sign in&lt;/b&gt; link in the upper right-hand corner.&lt;/p&gt;
&lt;p&gt;3. Sign in with your Windows Live ID. If you don&amp;rsquo;t have one, you can create one here.&lt;/p&gt;
&lt;p&gt;4. Click the &lt;b&gt;Upload&lt;/b&gt; button in the upper right-hand corner.&lt;/p&gt;
&lt;p&gt;5. In &lt;b&gt;Step 1:&lt;/b&gt; &lt;b&gt;Extension Type&lt;/b&gt;, select &lt;b&gt;Project or Item Template&lt;/b&gt;, then click Next.&lt;/p&gt;
&lt;p&gt;6. In &lt;b&gt;Step 2: Upload&lt;/b&gt;, click the &lt;b&gt;Browse&lt;/b&gt; button and select the Extensibility Color Text Web Control Template.vsix file located in the My Exported Templates folder. Click Next.&lt;/p&gt;
&lt;p&gt;7. In &lt;b&gt;Step 3:&lt;/b&gt; &lt;b&gt;Basic Information&lt;/b&gt;, the information you entered into the &lt;b&gt;Export Template as VSIX&lt;/b&gt; wizard appears. &lt;/p&gt;
&lt;p&gt;8. Set the &lt;b&gt;Category&lt;/b&gt; to &lt;i&gt;ASP.NET&lt;/i&gt; and the &lt;b&gt;Tags&lt;/b&gt; to &lt;i&gt;toolbox, web control, templates&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;9. Read and agree to the &lt;b&gt;Contribution Agreement&lt;/b&gt;, then type the text image into the text box. &lt;/p&gt;
&lt;p&gt;10. Click &lt;b&gt;Create Contribution&lt;/b&gt;, then click &lt;b&gt;Publish&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;11. Search the Visual Studio Gallery for &lt;i&gt;extensibility color text web control template&lt;/i&gt;. The new template listing appears.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/6175.clip_5F00_image010_5F00_6063D6BE.jpg"&gt;&lt;img height="56" width="244" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/5001.clip_5F00_image010_5F00_thumb_5F00_1BB73C7D.jpg" alt="clip_image010" border="0" title="clip_image010" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;Installing the web control project template&lt;/h4&gt;
&lt;p&gt;Now that your web control project template is published, install it in Visual Studio and test it there.&lt;/p&gt;
&lt;p&gt;1. Return to Visual Studio.&lt;/p&gt;
&lt;p&gt;2. From the &lt;b&gt;Tools&lt;/b&gt; menu, select &lt;b&gt;Extension Manager&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;3. Click &lt;b&gt;Online Gallery&lt;/b&gt;, then search for &lt;i&gt;extensibility color text web control template&lt;/i&gt;. The &lt;b&gt;Extensibility Color Text Web Control Template&lt;/b&gt; listing appears.&lt;/p&gt;
&lt;p&gt;4. Click the &lt;b&gt;Download&lt;/b&gt; button. After the extension downloads, click the &lt;b&gt;Install&lt;/b&gt; button. Your project template is now installed in Visual Studio.&lt;/p&gt;
&lt;h4&gt;Testing the web control project template&lt;/h4&gt;
&lt;p&gt;You no longer have to create a custom web control the manual way, as you did in the first part of this walkthrough. Instead, you can use the &lt;b&gt;Extensibility Color Text Web Control&lt;/b&gt; project template. In this section, you use the template to create a BlueColorTextControl web control.&lt;/p&gt;
&lt;p&gt;1. Select the &lt;b&gt;File/New Project&lt;/b&gt; menu item, then click the &lt;b&gt;Online Templates&lt;/b&gt; tag in the left pane.&lt;/p&gt;
&lt;p&gt;2. Select the ASP.NET node, then click &lt;b&gt;Extensibility Color Text Web Control Template &lt;/b&gt;in the middle pane.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/1881.clip_5F00_image012_5F00_3446D9CD.jpg"&gt;&lt;img height="71" width="244" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/1616.clip_5F00_image012_5F00_thumb_5F00_259C2DE8.jpg" alt="clip_image012" border="0" title="clip_image012" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;3. Set the &lt;b&gt;Name&lt;/b&gt; to MoreWebControls, then click OK.&lt;/p&gt;
&lt;p&gt;4. Rename the ColorTextControl.cs file to be BlueColorTextControl.cs.&lt;/p&gt;
&lt;p&gt;5. Open the BlueColorTextControl.cs file.&lt;/p&gt;
&lt;p&gt;6. In the &lt;b&gt;ToolboxData&lt;/b&gt; attribute, replace both occurrences of ColorTextControl with BlueColorTextControl.&lt;/p&gt;
&lt;p&gt;These values specify the opening and closing tags generated for the control when it is dragged from the Toolbox into a web page at design time. They must match the name of the control class, which is also the name of the control that appears in the toolbox. &lt;/p&gt;
&lt;p&gt;The start of the control class source code now looks like this:&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;namespace &lt;/span&gt;MoreWebControls
{
    [&lt;span style="color: #2b91af"&gt;DefaultProperty&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"Text"&lt;/span&gt;)]
    [&lt;span style="color: #2b91af"&gt;ToolboxData&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"&amp;lt;{0}:BlueColorTextControl runat=server&amp;gt;&amp;lt;/{0}:BlueColorTextControl&amp;gt;"&lt;/span&gt;)]
    [ProvideToolboxControl(&lt;span style="color: #a31515"&gt;"MoreWebControls"&lt;/span&gt;, &lt;span style="color: blue"&gt;false&lt;/span&gt;)]
    &lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;BlueColorTextControl &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;WebControl
    &lt;/span&gt;{&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;7. In the&lt;b&gt; get &lt;/b&gt;method, Change the color &amp;ldquo;green&amp;rdquo; to &amp;ldquo;blue&amp;rdquo;.&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;get
&lt;/span&gt;{
    &lt;span style="color: #2b91af"&gt;String &lt;/span&gt;s = (&lt;span style="color: #2b91af"&gt;String&lt;/span&gt;)ViewState[&lt;span style="color: #a31515"&gt;"Text"&lt;/span&gt;];
    &lt;span style="color: blue"&gt;return &lt;/span&gt;&lt;span style="color: #a31515"&gt;"&amp;lt;span style='color:blue'&amp;gt;' &lt;/span&gt;+ s + &lt;span style="color: #a31515"&gt;"&amp;lt;/span&amp;gt;"&lt;/span&gt;;
}&lt;/pre&gt;
&lt;pre class="code"&gt;&lt;span style="font-family: Arial;"&gt;This surrounds the text with a span tag that colors it blue.&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;8. Build the MoreWebControls project.&lt;/p&gt;
&lt;h4&gt;Testing the new web control&lt;/h4&gt;
&lt;p&gt;Do not press F5 to launch an experimental instance of Visual Studio. Instead, launch it by following the steps below. You will learn more about adding a debug action to a project template in a later section.&lt;/p&gt;
&lt;p&gt;1. Launch an experimental instance of Visual Studio explicitly by selecting the menu &lt;b&gt;item Start/All Programs/Microsoft Visual Studio 2010 SDK/Tools/Start Experimental Instance of Microsoft Visual Studio 2010&lt;/b&gt;. For convenience, you can create a shortcut to this executable. &lt;/p&gt;
&lt;p&gt;2. Create a new web application project.&lt;/p&gt;
&lt;p&gt;3. Open default.aspx in &lt;b&gt;Source&lt;/b&gt; mode.&lt;/p&gt;
&lt;p&gt;4. Open the toolbox. You should see BlueColorTextControl in the category MoreWebControls.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/7673.clip_5F00_image014_5F00_1A0670A9.jpg"&gt;&lt;img height="64" width="174" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/4540.clip_5F00_image014_5F00_thumb_5F00_4472A1C6.jpg" alt="clip_image014" border="0" title="clip_image014" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;5. Drag a BlueColorTextControl to the body of the web page.&lt;/p&gt;
&lt;p&gt;6. Add a &lt;b&gt;Text&lt;/b&gt; attribute with the value &lt;i&gt;Think Blue!&lt;/i&gt; to the BlueColorTextControl tag. The resulting tag should look like this:&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;cc1&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: maroon"&gt;BlueColorTextControl &lt;/span&gt;&lt;span style="color: red"&gt;ID&lt;/span&gt;&lt;span style="color: blue"&gt;="BlueColorTextControl1" &lt;/span&gt;&lt;span style="color: red"&gt;Text&lt;/span&gt;&lt;span style="color: blue"&gt;="Think Blue!" &lt;/span&gt;&lt;span style="color: red"&gt;runat&lt;/span&gt;&lt;span style="color: blue"&gt;="server" /&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;7. Press F5 to launch the ASP.NET Development Server. &lt;/p&gt;
&lt;p&gt;The BlueColorTextControl should render something like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/8640.clip_5F00_image016_5F00_51D8B4CC.jpg"&gt;&lt;img height="69" width="244" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/5428.clip_5F00_image016_5F00_thumb_5F00_38047E9D.jpg" alt="clip_image016" border="0" title="clip_image016" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;8. Close the ASP.NET Development Server.&lt;/p&gt;
&lt;p&gt;9. Close the experimental instance of Visual Studio.&lt;/p&gt;
&lt;h4&gt;Removing the project template&lt;/h4&gt;
&lt;p&gt;To add a debug action to your project template, you must delete the current template and recreate it. To delete the project template and the project it generated, follow these steps.&lt;/p&gt;
&lt;p&gt;1. Return to your web browser. &lt;/p&gt;
&lt;p&gt;2. Click the &lt;b&gt;My Contributions&lt;/b&gt; link in the upper left-hand corner. The Extensibility Color Text Web Control Template listing appears.&lt;/p&gt;
&lt;p&gt;3. Click &lt;b&gt;Delete&lt;/b&gt; to permanently remove your project template from the Visual Studio Gallery.&lt;/p&gt;
&lt;p&gt;4. Close the browser and return to Visual Studio.&lt;/p&gt;
&lt;p&gt;5. From the &lt;b&gt;Tools&lt;/b&gt; menu, select &lt;b&gt;Extension Manager&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;6. Select Extensibility Color Text Web Control Template, then click &lt;b&gt;Uninstall&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;7. Close the Extension Manager. &lt;/p&gt;
&lt;p&gt;8. Close the MoreWebControls solution.&lt;/p&gt;
&lt;p&gt;9. Close Visual Studio.&lt;/p&gt;
&lt;p&gt;10. Delete the MoreWebControls project folder.&lt;/p&gt;
&lt;p&gt;11. Start Visual Studio to complete the uninstall process.&lt;/p&gt;
&lt;h4&gt;Adding a debug action to the project template&lt;/h4&gt;
&lt;p&gt;If you press F5 while the MoreWebControls solution is open, you will see the error message &amp;ldquo;A project with an Output Type of Class Library cannot be started directly&amp;rdquo;. Your project template does not set a debug action because the location of the experimental instance of Visual Studio is unknown until the project template is installed on the target machine.&lt;/p&gt;
&lt;p&gt;Microsoft extensibility project templates include an invisible wizard that runs during project template installation. This wizard determines the location of the experimental instance of Visual Studio and sets the debug action accordingly. You can create your own wizard to do the same. You only need to create this wizard once. You can use the same wizard with every extensibility project template you create.&lt;/p&gt;
&lt;p&gt;The extensibility project template wizard must have a public implementation of Microsoft.VisualStudio.TemplateWizard.IWizard, and must be signed with a strong assembly name.&lt;/p&gt;
&lt;h5&gt;Creating the wizard&lt;/h5&gt;
&lt;p&gt;1. Create a new Visual C#/Windows/Class Library project named MyWizard.&lt;/p&gt;
&lt;p&gt;2. Rename the file class1.cs to be MyWizard.cs.&lt;/p&gt;
&lt;p&gt;3. Replace the MyWizard.cs file content with the following code.&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;System;
&lt;span style="color: blue"&gt;using &lt;/span&gt;System.Collections.Generic;
&lt;span style="color: blue"&gt;using &lt;/span&gt;System.Linq;
&lt;span style="color: blue"&gt;using &lt;/span&gt;System.Text;
&lt;span style="color: blue"&gt;using &lt;/span&gt;Microsoft.VisualStudio.TemplateWizard;
&lt;span style="color: blue"&gt;using &lt;/span&gt;System.Globalization;
&lt;span style="color: blue"&gt;using &lt;/span&gt;EnvDTE;

&lt;span style="color: blue"&gt;namespace &lt;/span&gt;MyWizard
{
    &lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;MyWizard &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;IWizard
    &lt;/span&gt;{
        &lt;span style="color: blue"&gt;public void &lt;/span&gt;BeforeOpeningFile(&lt;span style="color: #2b91af"&gt;ProjectItem &lt;/span&gt;projectItem)
        {
        }
        &lt;span style="color: blue"&gt;public void &lt;/span&gt;ProjectFinishedGenerating(&lt;span style="color: #2b91af"&gt;Project &lt;/span&gt;project)
        {
            &lt;span style="color: blue"&gt;foreach &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Configuration &lt;/span&gt;config &lt;span style="color: blue"&gt;in &lt;/span&gt;project.ConfigurationManager)
            {
                &lt;span style="color: green"&gt;//Set up the debug options to run "devenv /rootsuffix Exp";
                &lt;/span&gt;config.Properties.Item(&lt;span style="color: #a31515"&gt;"StartAction"&lt;/span&gt;).Value = 1;
                &lt;span style="color: green"&gt;//Get the full path to devenv.exe through DTE.FullName
                &lt;/span&gt;config.Properties.Item(&lt;span style="color: #a31515"&gt;"StartProgram"&lt;/span&gt;).Value =
                    project.DTE.FullName;
                config.Properties.Item(&lt;span style="color: #a31515"&gt;"StartArguments"&lt;/span&gt;).Value =
                    &lt;span style="color: #a31515"&gt;"/rootsuffix Exp"&lt;/span&gt;;
            }
        }
        &lt;span style="color: blue"&gt;public void &lt;/span&gt;ProjectItemFinishedGenerating(&lt;span style="color: #2b91af"&gt;ProjectItem &lt;/span&gt;projectItem)
        {
        }
        &lt;span style="color: blue"&gt;public void &lt;/span&gt;RunFinished()
        {
        }
        &lt;span style="color: blue"&gt;public void &lt;/span&gt;RunStarted(&lt;span style="color: blue"&gt;object &lt;/span&gt;automationObject,
            &lt;span style="color: #2b91af"&gt;Dictionary&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;, &lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt; replacementsDictionary,
            &lt;span style="color: #2b91af"&gt;WizardRunKind &lt;/span&gt;runKind, &lt;span style="color: blue"&gt;object&lt;/span&gt;[] customParams)
        {
        }
        &lt;span style="color: blue"&gt;public bool &lt;/span&gt;ShouldAddProjectItem(&lt;span style="color: blue"&gt;string &lt;/span&gt;filePath)
        {
            &lt;span style="color: blue"&gt;return true&lt;/span&gt;;
        }
    }
}&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;4. Add the following references to the project. If there is more than one choice, choose the reference that has a path to Visual Studio 2010:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;EnvDTE &lt;/li&gt;
&lt;li&gt;Microsoft.VisualStudio.TemplateWizardInterface &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;5. In the &lt;b&gt;Signing&lt;/b&gt; tab of the project properties dialog box, check the &lt;b&gt;Sign the assembly&lt;/b&gt; check box.&lt;/p&gt;
&lt;p&gt;6. In the &lt;b&gt;Choose a strong name key file&lt;/b&gt; dropdown list, select &lt;b&gt;&amp;lt;New&amp;hellip;&amp;gt;&lt;/b&gt;. The &lt;b&gt;Create Strong Name Key&lt;/b&gt; dialog box appears.&lt;/p&gt;
&lt;p&gt;7. Set the &lt;b&gt;Key file name&lt;/b&gt; to &lt;i&gt;key.snk&lt;/i&gt; and uncheck the &lt;b&gt;Protect my key file with a password&lt;/b&gt; check box.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/6082.clip_5F00_image018_5F00_223A9640.jpg"&gt;&lt;img height="135" width="244" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/8244.clip_5F00_image018_5F00_thumb_5F00_5A0CDA63.jpg" alt="clip_image018" border="0" title="clip_image018" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;8. Click OK. The key.snk file is added to the project.&lt;/p&gt;
&lt;p&gt;9. Build the MyWizard project as a &lt;b&gt;Release&lt;/b&gt; build. Your wizard is now ready to use.&lt;/p&gt;
&lt;p&gt;10. Close the MyWizard solution.&lt;/p&gt;
&lt;h5&gt;Incorporating the wizard into the project template.&lt;/h5&gt;
&lt;p&gt;To incorporate the wizard into the project template VSIX extension, you must backtrack and set the path to your wizard in the &lt;b&gt;Export Template as VSIX&lt;/b&gt; wizard &lt;b&gt;Wizard&lt;/b&gt; text box.&lt;/p&gt;
&lt;p&gt;Follow the steps beginning with the section &lt;b&gt;Creating and Publishing an Extensibility Web Control Template&lt;/b&gt;, with these exceptions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You do not have to download the &lt;b&gt;Export Template as VSIX&lt;/b&gt; wizard again. &lt;/li&gt;
&lt;li&gt;In the &lt;b&gt;Wizard&lt;/b&gt; text box of the &lt;b&gt;Select VSIX Options&lt;/b&gt; page of the &lt;b&gt;Export Template as VSIX&lt;/b&gt; wizard, &lt;b&gt;Browse&lt;/b&gt; to and select the bin/Release/MyWizard.dll file you created in the section above. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/7563.clip_5F00_image020_5F00_794F8136.jpg"&gt;&lt;img height="46" width="244" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/2476.clip_5F00_image020_5F00_thumb_5F00_2D83AA7D.jpg" alt="clip_image020" border="0" title="clip_image020" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When asked to overwrite the existing VSIX extension output file, click Yes. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When you reach the section &lt;b&gt;Testing the new web control&lt;/b&gt;, you can now launch the experimental instance of Visual Studio by pressing F5.&lt;/p&gt;
&lt;h4&gt;Summary&lt;/h4&gt;
&lt;p&gt;Congratulations! You have come full circle, from creating a web control project from scratch, to creating an extensibility web control project template.&lt;/p&gt;
&lt;p&gt;Note that in this walkthrough, you use the &lt;b&gt;Export Template as VSIX&lt;/b&gt; wizard to simplify the task of creating and publishing a project template. If you need more control of the project template, for example, to choose the icon that appears in the New Project dialog box, you must explicitly create the project template and wrap it in a VSIX extension. For more information, see Aaron Marten&amp;rsquo;s &lt;a href="http://blogs.msdn.com/visualstudio/archive/2010/03/04/creating-and-sharing-project-item-templates.aspx"&gt;Creating and Sharing Project and Item Templates&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span style="mso-ascii-font-family: calibri; mso-hansi-font-family: calibri"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/3377.REDMOND_5F00_martintr_5F00_LThumb_5F00_thumb_5F00_33CA810B.jpg"&gt;&lt;img height="100" width="76" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/3377.REDMOND_5F00_martintr_5F00_LThumb_5F00_thumb_5F00_33CA810B.jpg" alt="Martin Tracy" border="0" title="Martin Tracy photo" style="padding-bottom: 4px; border-right-width: 0px; padding-left: 4px; padding-right: 4px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 4px" /&gt;&lt;/a&gt;&lt;strong&gt;Short Bio:&lt;/strong&gt; Martin Tracy is a senior programmer writer for the Visual Studio Project and Build team. As part of VS 2010, he has documented numerous features of the MSBuild system and Visual Studio platform. His long term focus is on developing infrastructure to build richly featured web applications. Martin has a long career in real-time software development, from artificial hearts and smart prosthetics to adaptive aeronautic controls. Martin holds a Masters degree in Dance Ethnology from the University of California, Los Angeles (UCLA), and a Bachelors degree in Asian Culture from Brown University, Rhode Island. He lives in Snohomish, WA with his extended family and loves to play accordion and watch anime in his spare time.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10018390" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/toolbox/">toolbox</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VS2010/">VS2010</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/">extensibility</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/Project/">Project</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VSIX/">VSIX</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VS+Gallery/">VS Gallery</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/walkthrough/">walkthrough</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/web/">web</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/control/">control</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/ASP-NET/">ASP.NET</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/template/">template</category></item><item><title>Walkthrough-- Publishing a Custom Web Control (Part 1 of 2)</title><link>http://blogs.msdn.com/b/visualstudio/archive/2010/05/25/walkthrough-publishing-a-custom-web-control-part-1-of-2.aspx</link><pubDate>Tue, 25 May 2010 21:12:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10015104</guid><dc:creator>Visual Studio Blog</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/rsscomments.aspx?WeblogPostID=10015104</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/commentapi.aspx?WeblogPostID=10015104</wfw:comment><comments>http://blogs.msdn.com/b/visualstudio/archive/2010/05/25/walkthrough-publishing-a-custom-web-control-part-1-of-2.aspx#comments</comments><description>&lt;p&gt;The Visual Studio 2010 SDK adds several project templates to Visual Studio that let you create and share custom controls. These are called extensibility projects. In addition to compiling the control, the extensibility project prepares it for publication by incorporating it into a VSIX extension. A VSIX control extension can be shared by publishing it to the Visual Studio gallery, or by sending it directly to interested developers.&lt;/p&gt;
&lt;p&gt;There is currently no extensibility web control project template in the Visual Studio SDK, but you can make your own by following the steps in this walkthrough. The walkthrough is divided into two parts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Creating and publishing a custom web control the manual way. &lt;/li&gt;
&lt;li&gt;Creating and publishing an extensibility web control project template. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On completion of the second part, you will have an extensibility project template that makes creating and publishing a web control a straightforward process.&lt;/p&gt;
&lt;p&gt;In the first part of this walkthrough, you will learn to&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create a custom web control. &lt;/li&gt;
&lt;li&gt;Test the web control in the Visual Studio experimental instance. &lt;/li&gt;
&lt;li&gt;Prepare the web control for publication. &lt;/li&gt;
&lt;li&gt;Publish the web control to the Visual Studio Gallery. &lt;/li&gt;
&lt;li&gt;Install the web control from the Visual Studio Gallery. &lt;/li&gt;
&lt;li&gt;Remove the web control from the Visual Studio Gallery. &lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Prerequisites&lt;/h4&gt;
&lt;p&gt;To follow this walkthrough, you must have a working knowledge of web controls, creating new projects, setting project properties, and using the Visual Studio experimental instance. You must have both Visual Studio 2010 and the Visual Studio 2010 SDK installed on your computer.&lt;/p&gt;
&lt;h4&gt;Creating and publishing your web control from scratch&lt;/h4&gt;
&lt;p&gt;To create and publish your custom web control when no project template is available, start with an existing extensibility control project and modify it to create an extensibility web control project. &lt;/p&gt;
&lt;p&gt;1. Open Visual Studio and create a new &lt;strong&gt;Visual C#/Extensibility/Windows Forms Toolbox Control&lt;/strong&gt; project named MyWebControls. Check &lt;strong&gt;Create directory for solution&lt;/strong&gt; before clicking OK.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/2816.clip_5F00_image002_5F00_65213324.jpg"&gt;&lt;img height="184" width="244" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/5556.clip_5F00_image002_5F00_thumb_5F00_43C18D88.jpg" alt="clip_image002" border="0" title="clip_image002" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2. Add a new &lt;strong&gt;Visual C#/ASP.NET Server Control&lt;/strong&gt; project named Temp to the solution.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/5140.clip_5F00_image004_5F00_4DA67EF3.jpg"&gt;&lt;img height="175" width="244" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/4863.clip_5F00_image004_5F00_thumb_5F00_5314EF97.jpg" alt="clip_image004" border="0" title="clip_image004" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h5&gt;Merging the project files.&lt;/h5&gt;
&lt;p&gt;1. Rename the file Temp/ServerControl1.cs to Temp/ColorTextControl.cs. &lt;/p&gt;
&lt;p&gt;2. Delete the file MyWebControls/ToolboxControl.cs.&lt;/p&gt;
&lt;p&gt;3. Copy the file Temp/ ColorTextControl.cs to the MyWebControls project.&lt;/p&gt;
&lt;p&gt;4. Remove the Temp project from the solution.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/1830.clip_5F00_image0024_5F00_2044E923.jpg"&gt;&lt;img height="163" width="244" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/8512.clip_5F00_image0024_5F00_thumb_5F00_31B549FB.jpg" alt="clip_image002[4]" border="0" title="clip_image002[4]" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h5&gt;Merging the project references&lt;/h5&gt;
&lt;p&gt;1. Add the following references to the project:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Microsoft.CSharp &lt;/li&gt;
&lt;li&gt;System.Data.DataSetExtensions &lt;/li&gt;
&lt;li&gt;System.Web &lt;/li&gt;
&lt;li&gt;System.Xml.Linq &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;2. Remove the following references from the project:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;System.Data &lt;/li&gt;
&lt;li&gt;System.Windows.Forms &lt;/li&gt;
&lt;li&gt;System.Xml &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/2337.clip_5F00_image0044_5F00_3F1B5D01.jpg"&gt;&lt;img height="135" width="244" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/0272.clip_5F00_image0044_5F00_thumb_5F00_77C6070E.jpg" alt="clip_image004[4]" border="0" title="clip_image004[4]" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h5&gt;Creating the web control&lt;/h5&gt;
&lt;p&gt;1. Open the file ColorTextControl.cs in the code editor.&lt;/p&gt;
&lt;p&gt;2. Change the namespace to MyWebControls.&lt;/p&gt;
&lt;p&gt;3. In the &lt;b&gt;ToolboxData&lt;/b&gt; attribute, replace both occurrences of ServerControl1 with ColorTextControl.&lt;/p&gt;
&lt;p&gt;These values specify the opening and closing tags generated for the control when it is dragged from the Toolbox into a web page at design time. They must match the name of the control class, which is also the name of the control that will appear in the toolbox. &lt;/p&gt;
&lt;p&gt;4. Add a &lt;b&gt;ProvideToolBoxControl&lt;/b&gt; attribute to the control class. &lt;br /&gt;The first argument to this attribute is the name of the assembly, which is the same as the namespace when the project is generated. The color text control will appear in a category in the toolbox with this name.&lt;/p&gt;
&lt;p&gt;The start of the control class source code now looks like this:&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;namespace &lt;/span&gt;MyWebControls
{
    [&lt;span style="color: #2b91af"&gt;DefaultProperty&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"Text"&lt;/span&gt;)]
    [&lt;span style="color: #2b91af"&gt;ToolboxData&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"&amp;lt;{0}:ColorTextControl runat=server&amp;gt;&amp;lt;/{0}:ColorTextControl&amp;gt;"&lt;/span&gt;)]
    [&lt;span style="color: #2b91af"&gt;ProvideToolboxControl&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"MyWebControls"&lt;/span&gt;, &lt;span style="color: blue"&gt;false&lt;/span&gt;)]
    &lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ColorTextControl &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;WebControl
    &lt;/span&gt;{&lt;/pre&gt;
&lt;p&gt;5. Replace the &lt;b&gt;get&lt;/b&gt; method of the default &lt;b&gt;Text&lt;/b&gt; property with this code:&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;get
&lt;/span&gt;{
    &lt;span style="color: #2b91af"&gt;String &lt;/span&gt;s = (&lt;span style="color: #2b91af"&gt;String&lt;/span&gt;)ViewState[&lt;span style="color: #a31515"&gt;"Text"&lt;/span&gt;];
    &lt;span style="color: blue"&gt;return &lt;/span&gt;&lt;span style="color: #a31515"&gt;"&amp;lt;span style='color:green'&amp;gt;' &lt;/span&gt;+ s + &lt;span style="color: #a31515"&gt;"&amp;lt;/span&amp;gt;"&lt;/span&gt;;
}&lt;/pre&gt;
&lt;p&gt;This surrounds the text with a span tag that colors it green.&lt;/p&gt;
&lt;p&gt;6. Open the file Properties/AssemblyInfo.cs in the code editor.&lt;/p&gt;
&lt;p&gt;7. Replace the &lt;b&gt;AssemblyVersion&lt;/b&gt; Revision number with the &amp;ldquo;*&amp;rdquo; character.&lt;/p&gt;
&lt;pre class="code"&gt;[&lt;span style="color: blue"&gt;assembly&lt;/span&gt;: &lt;span style="color: #2b91af"&gt;AssemblyVersion&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"1.0.0.*"&lt;/span&gt;)]&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Custom toolbox controls are cached and refreshed only when the assembly signature changes. By incrementing the assembly revision number with each build, the cache is always refreshed.&lt;/p&gt;
&lt;h4&gt;Testing your web control&lt;/h4&gt;
&lt;p&gt;Before publishing your web control, test it out in an experimental instance of Visual Studio.&lt;/p&gt;
&lt;p&gt;1. Press F5 to launch an experimental instance of Visual Studio.&lt;/p&gt;
&lt;p&gt;2. From the &lt;b&gt;Tools&lt;/b&gt; menu, select the &lt;b&gt;Extension Manager&lt;/b&gt;. The MyWebControls extension appears and is enabled.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/1680.clip_5F00_image006_5F00_7759D419.jpg"&gt;&lt;img height="56" width="244" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/1273.clip_5F00_image006_5F00_thumb_5F00_093667E7.jpg" alt="clip_image006" border="0" title="clip_image006" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;3. Close the &lt;b&gt;Extension Manager&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;4. Create a new ASP.NET web application project.&lt;/p&gt;
&lt;p&gt;5. Open default.aspx in &lt;b&gt;Source&lt;/b&gt; mode.&lt;/p&gt;
&lt;p&gt;6. Open the toolbox. You should see ColorTextControl in the category MyWebControls.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/3324.clip_5F00_image008_5F00_3DD6C422.jpg"&gt;&lt;img height="180" width="153" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/2350.clip_5F00_image008_5F00_thumb_5F00_169C7AED.jpg" alt="clip_image008" border="0" title="clip_image008" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;7. Drag a ColorTextControl to the body of the web page.&lt;/p&gt;
&lt;p&gt;8. Add a &lt;b&gt;Text&lt;/b&gt; attribute with the value &lt;i&gt;Think Green!&lt;/i&gt; to the ColorTextControl tag. The resulting tag should look like this:&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;cc1&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: maroon"&gt;ColorTextControl &lt;/span&gt;&lt;span style="color: red"&gt;ID&lt;/span&gt;&lt;span style="color: blue"&gt;="ColorTextControl1" &lt;/span&gt;&lt;span style="color: red"&gt;Text&lt;/span&gt;&lt;span style="color: blue"&gt;="Think Green!" &lt;/span&gt;&lt;span style="color: red"&gt;runat&lt;/span&gt;&lt;span style="color: blue"&gt;="server" /&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;9. Press F5 to launch the ASP.NET Development Server. &lt;/p&gt;
&lt;p&gt;The ColorTextControl should render something like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/7450.clip_5F00_image010_5F00_364B54B5.jpg"&gt;&lt;img height="65" width="244" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/2766.clip_5F00_image010_5F00_thumb_5F00_6E89CBCD.jpg" alt="clip_image010" border="0" title="clip_image010" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;10. Close the ASP.NET Development Server. &lt;/p&gt;
&lt;p&gt;11. Close the experimental instance of Visual Studio.&lt;/p&gt;
&lt;h4&gt;Preparing your web control for publication&lt;/h4&gt;
&lt;p&gt;Before you can publish your control to the Visual Studio Gallery, you need an icon and a screen shot. The icon you supply appears next to the extension in the Extension Manager.&lt;/p&gt;
&lt;p&gt;1. If you have an icon image file, add it to your project as an existing item. Otherwise, add a new image file to your project and edit the image to represent the control. In this walkthrough, we use an icon called Color.bmp, which shows the Color letter &amp;ldquo;A&amp;rdquo; on a yellow field.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/6560.clip_5F00_image012_5F00_232A2809.jpg"&gt;&lt;img height="70" width="71" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/5086.clip_5F00_image012_5F00_thumb_5F00_4E028C1B.jpg" alt="clip_image012" border="0" title="clip_image012" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2. If you have a screenshot image file, add it to your project as an existing item. Otherwise, create a screenshot image file and add it to your project. In this walkthrough, we use a screen shot called ScreenShot.bmp, which shows the control as it appears in a web page.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/7446.clip_5F00_image014_5F00_0DCC72A1.jpg"&gt;&lt;img height="167" width="244" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/1373.clip_5F00_image014_5F00_thumb_5F00_65B9C381.jpg" alt="clip_image014" border="0" title="clip_image014" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;3. Open the file source.extension.vsixmanifest for editing.&lt;/p&gt;
&lt;p&gt;4. Change the &lt;b&gt;Description&lt;/b&gt; to &lt;i&gt;Color Text Web Control&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/7462.clip_5F00_image016_5F00_1A5A1FBD.jpg"&gt;&lt;img height="24" width="244" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/5315.clip_5F00_image016_5F00_thumb_5F00_453283CF.jpg" alt="clip_image016" border="0" title="clip_image016" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;5. Set the &lt;b&gt;Icon&lt;/b&gt; to &lt;i&gt;Color.bmp&lt;/i&gt; and the &lt;b&gt;Preview Image&lt;/b&gt; to &lt;i&gt;ScreenShot.bmp&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/6560.clip_5F00_image018_5F00_20A0F64B.jpg"&gt;&lt;img height="51" width="244" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/2671.clip_5F00_image018_5F00_thumb_5F00_7247709D.jpg" alt="clip_image018" border="0" title="clip_image018" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;6. Change the Author, Version, and so forth, as desired.&lt;/p&gt;
&lt;p&gt;7. Save and close the manifest file, then rebuild the project as a &lt;b&gt;Release&lt;/b&gt; build. Publishing your web control&lt;/p&gt;
&lt;h5&gt;Publishing your web control&lt;/h5&gt;
&lt;p&gt;You are now ready to publish your web control to the Visual Studio gallery.&lt;/p&gt;
&lt;p&gt;1. Launch your web browser and navigate to &lt;a href="http://visualstudiogallery.msdn.microsoft.com"&gt;http://visualstudiogallery.msdn.microsoft.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;2. Click the &lt;b&gt;sign in&lt;/b&gt; link in the upper right-hand corner.&lt;/p&gt;
&lt;p&gt;3. Sign in with your Windows Live ID. If you don&amp;rsquo;t have one, you can create one here.&lt;/p&gt;
&lt;p&gt;4. Click the &lt;b&gt;Upload&lt;/b&gt; button in the upper right-hand corner.&lt;/p&gt;
&lt;p&gt;5. In &lt;b&gt;Step 1:&lt;/b&gt; &lt;b&gt;Extension Type&lt;/b&gt;, select &lt;b&gt;Control&lt;/b&gt;, then click Next.&lt;/p&gt;
&lt;p&gt;6. In &lt;b&gt;Step 2: Upload&lt;/b&gt;, select &lt;b&gt;I would like to upload my control&lt;/b&gt;. The &lt;b&gt;Select your control&lt;/b&gt; text box appears.&lt;/p&gt;
&lt;p&gt;7. Click the &lt;b&gt;Browse&lt;/b&gt; button and select the MyWebControls.vsix file located in the project bin/Release folder. Click Next.&lt;/p&gt;
&lt;p&gt;8. In &lt;b&gt;Step 3:&lt;/b&gt; &lt;b&gt;Basic Information&lt;/b&gt;, you see the information you entered into the manifest editor. The description you entered appears in the &lt;b&gt;Summary&lt;/b&gt; field.&lt;/p&gt;
&lt;p&gt;9. Set the &lt;b&gt;Category&lt;/b&gt; to &lt;i&gt;ASP.NET&lt;/i&gt; and the &lt;b&gt;Tags&lt;/b&gt; to &lt;i&gt;toolbox, web control&lt;/i&gt;. You can enter a more detailed description at this time.&lt;/p&gt;
&lt;p&gt;10. Read and agree to the &lt;b&gt;Contribution Agreement&lt;/b&gt;, then type the text image into the text box. &lt;/p&gt;
&lt;p&gt;11. Click &lt;b&gt;Create Contribution&lt;/b&gt;. A warning appears that &lt;b&gt;This page has not yet been published&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;12. Click &lt;b&gt;Publish&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;13. Search the Visual Studio Gallery for MyWebControls. The MyWebControls extension listing appears.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/4745.clip_5F00_image020_5F00_1FC89061.jpg"&gt;&lt;img height="104" width="244" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/8623.clip_5F00_image020_5F00_thumb_5F00_716F0AB3.jpg" alt="clip_image020" border="0" title="clip_image020" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;Installing your web control&lt;/h4&gt;
&lt;p&gt;Now that your web control is published, install it in Visual Studio and test it there.&lt;/p&gt;
&lt;p&gt;1. Return to Visual Studio.&lt;/p&gt;
&lt;p&gt;2. From the &lt;b&gt;Tools&lt;/b&gt; menu, select &lt;b&gt;Extension Manager&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;3. Click &lt;b&gt;Online Gallery&lt;/b&gt;, then search for &lt;i&gt;MyWebControls&lt;/i&gt;. The MyWebControls extension listing appears.&lt;/p&gt;
&lt;p&gt;4. Click the &lt;b&gt;Download&lt;/b&gt; button. After the extension downloads, click the &lt;b&gt;Install&lt;/b&gt; button.&amp;nbsp; Your web control is now installed in Visual Studio.&lt;/p&gt;
&lt;p&gt;6. Create a new ASP.NET web application project.&lt;/p&gt;
&lt;p&gt;7. Open default.aspx in &lt;b&gt;Source&lt;/b&gt; mode.&lt;/p&gt;
&lt;p&gt;8. Open the toolbox. You should see ColorTextControl in the category MyWebControls.&lt;/p&gt;
&lt;h4&gt;Removing your control from the Visual Studio Gallery&lt;/h4&gt;
&lt;p&gt;In the next part of this walkthrough, you will create your web control from a project template. In preparation, delete your web control.&lt;/p&gt;
&lt;p&gt;1. Return to your web browser.&lt;/p&gt;
&lt;p&gt;2. Click the &lt;b&gt;My Contributions&lt;/b&gt; link in the upper left-hand corner. The MyWebControls listing appears.&lt;/p&gt;
&lt;p&gt;3. Click &lt;b&gt;Delete&lt;/b&gt; to remove your web control until you upload it again.&lt;/p&gt;
&lt;p&gt;4. Return to Visual Studio.&lt;/p&gt;
&lt;p&gt;5. From the &lt;b&gt;Tools&lt;/b&gt; menu, select &lt;b&gt;Extension Manager&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;6. Select MyWebControls, then click &lt;b&gt;Uninstall&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;7. Restart Visual Studio to complete the uninstall process. &lt;/p&gt;
&lt;p&gt;This is the end of part one of this walkthrough. Part two shows you how to create and publish an extensibility web control project template based on the web control project you created above. To continue, please see &lt;b&gt;&lt;a href="http://blogs.msdn.com/b/visualstudio/archive/2010/06/01/walkthrough-publishing-an-extensibility-web-control-project-template-part-2-of-2.aspx"&gt;Walkthrough-- Publishing an Extensibility Web Control Project Template (Part 2 of 2)&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span style="mso-ascii-font-family: calibri; mso-hansi-font-family: calibri"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/1373.REDMOND_5F00_martintr_5F00_MThumb_5F00_thumb_5F00_05F45A32.jpg"&gt;&lt;img height="100" width="76" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/1373.REDMOND_5F00_martintr_5F00_MThumb_5F00_thumb_5F00_05F45A32.jpg" alt="Martin Tracy" border="0" title="Martin Tracy photo" style="padding-bottom: 4px; border-right-width: 0px; padding-left: 4px; padding-right: 4px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 4px" /&gt;&lt;/a&gt;&lt;strong&gt;Short Bio:&lt;/strong&gt; Martin Tracy is a senior programmer writer for the Visual Studio Project and Build team. As part of VS 2010, he has documented numerous features of the MSBuild system and Visual Studio platform. His long term focus is on developing infrastructure to support richly featured web applications. Martin has a long career in real-time software development, from artificial hearts and smart prosthetics to adaptive aeronautic controls. Martin holds a Masters degree in Dance Ethnology from the University of California, Los Angeles (UCLA), and a Bachelors degree in Asian Culture from Brown University, Rhode Island. He lives in Snohomish, WA with his extended family and loves to play accordion and watch anime in his spare time.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10015104" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/toolbox/">toolbox</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VS2010/">VS2010</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/">extensibility</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VSIX/">VSIX</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VS+Gallery/">VS Gallery</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/walkthrough/">walkthrough</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/web/">web</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/control/">control</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/ASP-NET/">ASP.NET</category></item><item><title>Three New Managed Package Framework features for Visual Studio 2010</title><link>http://blogs.msdn.com/b/visualstudio/archive/2010/05/17/three-new-managed-package-framework-features-for-visual-studio-2010.aspx</link><pubDate>Sun, 16 May 2010 23:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10013853</guid><dc:creator>Visual Studio Blog</dc:creator><slash:comments>7</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/rsscomments.aspx?WeblogPostID=10013853</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/commentapi.aspx?WeblogPostID=10013853</wfw:comment><comments>http://blogs.msdn.com/b/visualstudio/archive/2010/05/17/three-new-managed-package-framework-features-for-visual-studio-2010.aspx#comments</comments><description>&lt;P&gt;This post describes three new features that have been added to the &lt;A href="http://msdn.microsoft.com/en-us/library/bb164709(VS.100).aspx"&gt;Managed Package Framework&lt;/A&gt; (MPF) version 10.0 in Visual Studio 2010. These features are available to anyone developing extensions in managed code for Visual Studio 2010. To get started building extensions for Visual Studio, start by visiting the &lt;A href="http://msdn.microsoft.com/en-us/vsx/default.aspx"&gt;Visual Studio Extensibility Developer Center&lt;/A&gt; on MSDN and then go and download the &lt;A href="http://www.microsoft.com/downloads/details.aspx?familyid=47305CF4-2BEA-43C0-91CD-1B853602DCC5" mce_href="http://www.microsoft.com/downloads/details.aspx?familyid=47305CF4-2BEA-43C0-91CD-1B853602DCC5"&gt;Visual Studio 2010 SDK&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;To use these features, your extension must reference the assembly Microsoft.VisualStudio.Shell.10.0.&lt;/P&gt;
&lt;H3&gt;1. &lt;A href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.serviceprovider.globalprovider(VS.100).aspx"&gt;ServiceProvider.GlobalProvider&lt;/A&gt;&lt;/H3&gt;
&lt;P&gt;This new static property on the &lt;A href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.serviceprovider(VS.100).aspx"&gt;ServiceProvider&lt;/A&gt; class allows access to the global service provider from any code, &lt;STRONG&gt;as long as it is called from the main UI thread&lt;/STRONG&gt;. This property is closely related to the &lt;A href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.package.getglobalservice(VS.100).aspx"&gt;Package.GetGlobalService&lt;/A&gt; static method which was available in previous versions of the MPF. The problem with Package.GetGlobalService was that it would fail if a package had not yet been initialized. This led to subtle ordering bugs in code that used the MPF libraries without initializing a package of their own. Sometimes they would work only because another package had already initialized the global ServiceProvider on their behalf. If that &lt;EM&gt;other &lt;/EM&gt;package was uninstalled, or perhaps moved to a different version of the MPF, that static would no longer be initialized causing Package.GetGlobalService to fail.&lt;/P&gt;
&lt;P&gt;Now, in MPF 10, you can call ServiceProvider.GlobalProvider at any time as long as you are calling from the UI thread. For compatibility, this mechanism will still use the ServiceProvider created by the first &lt;A href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.package(VS.100).aspx"&gt;Package&lt;/A&gt; to be &lt;A href="http://msdn.microsoft.com/en-us/library/bb685879(VS.100).aspx"&gt;sited&lt;/A&gt; but, in the case where no Package has yet been &lt;A href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.package.initialize(VS.100).aspx"&gt;initialized&lt;/A&gt;, MPF 10.0 now has the ability to obtain the global provider from the registered &lt;A href="http://msdn.microsoft.com/en-us/library/ms693324(VS.85).aspx"&gt;COM message filter&lt;/A&gt;. Package.GetGlobalService() is also hooked up to this new mechanism.&lt;/P&gt;
&lt;H3&gt;2. &lt;A href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.activitylog(VS.100).aspx"&gt;ActivityLog&lt;/A&gt;&lt;/H3&gt;
&lt;P&gt;The &lt;A href="http://msdn.microsoft.com/en-us/library/ms241272(VS.100).aspx"&gt;activity log&lt;/A&gt; is a feature first introduced in Visual Studio 2005 for diagnosing package load failures. In Visual Studio 2010, we started to log a few &lt;A href="http://blogs.msdn.com/visualstudio/archive/2010/02/24/troubleshooting-with-the-activity-log.aspx"&gt;more things&lt;/A&gt; to the activity log and would like to promote it as the service for all extensions to use for low-frequency diagnostics. To that end, we created a very simple-to-use &lt;A href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.activitylog(VS.100).aspx"&gt;ActivityLog&lt;/A&gt; class. It’s small enough to post the public interface here.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: gray"&gt;&lt;FONT size=2 face=Consolas&gt;/// &amp;lt;summary&amp;gt;
/// &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;&lt;FONT size=2 face=Consolas&gt;Class which provides convenient managed methods for logging messages to the IVsActivityLog.
&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT size=2&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: gray"&gt;/// &amp;lt;/summary&amp;gt;
&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static class &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: #2b91af"&gt;ActivityLog
&lt;/SPAN&gt;{
    &lt;/FONT&gt;&lt;/FONT&gt;&lt;SPAN style="COLOR: gray"&gt;&lt;FONT size=2 face=Consolas&gt;/// &amp;lt;summary&amp;gt;
    /// &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;&lt;FONT size=2 face=Consolas&gt;Gets the path to the activity log for the current application.
    &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT size=2&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: gray"&gt;/// &amp;lt;/summary&amp;gt;
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static string &lt;/SPAN&gt;LogFilePath { &lt;SPAN style="COLOR: blue"&gt;get&lt;/SPAN&gt;; }

    &lt;/FONT&gt;&lt;/FONT&gt;&lt;SPAN style="COLOR: gray"&gt;&lt;FONT size=2 face=Consolas&gt;/// &amp;lt;summary&amp;gt;
    /// &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;&lt;FONT size=2 face=Consolas&gt;Logs an error message in the activity log with the given source.
    &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT size=2&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: gray"&gt;/// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name="source"&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;A name associated with the source contributing the message.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: gray"&gt;&amp;lt;/param&amp;gt;
    /// &amp;lt;param name="message"&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;The message to be written to the activity log.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: gray"&gt;&amp;lt;/param&amp;gt;
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static void &lt;/SPAN&gt;LogError(&lt;SPAN style="COLOR: blue"&gt;string &lt;/SPAN&gt;source, &lt;SPAN style="COLOR: blue"&gt;string &lt;/SPAN&gt;message);

    &lt;/FONT&gt;&lt;/FONT&gt;&lt;SPAN style="COLOR: gray"&gt;&lt;FONT size=2 face=Consolas&gt;/// &amp;lt;summary&amp;gt;
    /// &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;&lt;FONT size=2 face=Consolas&gt;Logs a warning message in the activity log with the given source.
    &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT size=2&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: gray"&gt;/// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name="source"&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;A name associated with the source contributing the message.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: gray"&gt;&amp;lt;/param&amp;gt;
    /// &amp;lt;param name="message"&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;The message to be written to the activity log.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: gray"&gt;&amp;lt;/param&amp;gt;
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static void &lt;/SPAN&gt;LogWarning(&lt;SPAN style="COLOR: blue"&gt;string &lt;/SPAN&gt;source, &lt;SPAN style="COLOR: blue"&gt;string &lt;/SPAN&gt;message);

    &lt;/FONT&gt;&lt;/FONT&gt;&lt;SPAN style="COLOR: gray"&gt;&lt;FONT size=2 face=Consolas&gt;/// &amp;lt;summary&amp;gt;
    /// &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;&lt;FONT size=2 face=Consolas&gt;Logs an information message in the activity log with the given source.
    &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT size=2&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: gray"&gt;/// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name="source"&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;A name associated with the source contributing the message.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: gray"&gt;&amp;lt;/param&amp;gt;
    /// &amp;lt;param name="message"&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;The message to be written to the activity log.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: gray"&gt;&amp;lt;/param&amp;gt;
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static void &lt;/SPAN&gt;LogInformation(&lt;SPAN style="COLOR: blue"&gt;string &lt;/SPAN&gt;source, &lt;SPAN style="COLOR: blue"&gt;string &lt;/SPAN&gt;message);
}&lt;/FONT&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;All public methods and properties on the class are static which makes it incredibly easy to use from your own code. e.g.:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: #2b91af; FONT-SIZE: 9.5pt"&gt;ActivityLog&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;.LogInformation(&lt;SPAN style="COLOR: #a31515"&gt;"ACME Widget Package"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: #a31515"&gt;"The widget is disconnected"&lt;/SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Internally, of course, ActivityLog uses ServiceProvider.GlobalProvider to locate the global service provider.&lt;/P&gt;
&lt;P&gt;I have to give credit and thanks for this idea to &lt;A href="http://friendfeed.com/istvan-novak"&gt;István Novák&lt;/A&gt;, one of our &lt;A href="http://mvp.support.microsoft.com/"&gt;MVPs&lt;/A&gt;, who regularly visits us in Redmond to attend and also present at our Visual Studio developer clinics. István has developed a set of managed classes called “&lt;A href="http://vsxtra.codeplex.com/"&gt;VSXtra&lt;/A&gt;” for easing the development of managed packages by providing a useful set of helper classes. This new class was inspired by a discussion I had with him at the &lt;A href="http://msdn.microsoft.com/en-us/vstudio/cc512752.aspx"&gt;Developer Tools Summit&lt;/A&gt; last October and was incorporated into MPF 10.0 with his permission.&lt;/P&gt;
&lt;H3&gt;3. &lt;A href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.threadhelper(VS.100).aspx"&gt;ThreadHelper&lt;/A&gt;&lt;/H3&gt;
&lt;P&gt;The ThreadHelper class allows managed code running on any thread to run operations on the UI thread. This may be necessary if you are calling into a component that is not thread-safe and must be called on the UI thread. This mechanism is preferred over other existing techniques like &lt;A href="http://msdn.microsoft.com/en-us/library/system.windows.threading.dispatcher.invoke(VS.100).aspx"&gt;Dispatcher.Invoke&lt;/A&gt; from WPF or &lt;A href="http://msdn.microsoft.com/en-us/library/zyzhdc6b(VS.100).aspx"&gt;Control.Invoke&lt;/A&gt; from Windows Forms because neither of these is “&lt;A href="http://msdn.microsoft.com/en-us/library/aa378651(VS.85).aspx"&gt;RPC&lt;/A&gt; aware” and using them may result in deadlocks in some scenarios. As you may know, Visual Studio is heavily rooted in COM and RPC is the primary mechanism used by components to communicate across threads or processes.&lt;/P&gt;
&lt;P&gt;Under the covers, ThreadHelper makes a private cross-apartment COM call to the UI thread where the ‘invokable’ operation completes. By using a genuine COM call, we maintain what’s known as “&lt;A href="http://msdn.microsoft.com/en-us/library/ms693805"&gt;logical thread identity&lt;/A&gt;” throughout the call. If the call to the UI thread is itself part of a cross-thread COM call, then it will be recognized as part of the same call (&lt;A href="http://msdn.microsoft.com/en-us/library/ms680554(VS.85).aspx"&gt;CALLTYPE_NESTED&lt;/A&gt;) and not a new top-level call. Both WPF’s and Windows Forms’ invoke operations post private messages to the UI thread and this breaks the chain of logical thread identity.&lt;/P&gt;
&lt;P&gt;ThreadHelper really has only one interesting method, &lt;A href="http://msdn.microsoft.com/en-us/library/ee197798.aspx"&gt;Invoke&lt;/A&gt;, although it takes two forms:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;PRE class=code&gt;&lt;FONT size=2&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: blue"&gt;public void &lt;/SPAN&gt;Invoke(&lt;SPAN style="COLOR: #2b91af"&gt;Action &lt;/SPAN&gt;action);
&lt;SPAN style="COLOR: blue"&gt;public &lt;SPAN style="COLOR: #2b91af"&gt;TResult &lt;/SPAN&gt;&lt;/SPAN&gt;Invoke&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;TResult&lt;/SPAN&gt;&amp;gt;(&lt;SPAN style="COLOR: #2b91af"&gt;Func&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;TResult&lt;/SPAN&gt;&amp;gt; method);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The argument passed to Invoke is a delegate for the operation you want to perform on the UI thread. If the caller is already on the UI thread, then the delegate is invoked directly. If the operation throws an exception, then the exception is re-raised on the calling thread.&lt;/P&gt;
&lt;P&gt;Using ThreadHelper in your own code is straightforward, but note that ThreadHelper itself is abstract to allow for advanced extensibility. Most of the time, you’ll use the general purpose implementation accessed through the static property &lt;A href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.threadhelper.generic(v=VS.100).aspx"&gt;ThreadHelper.Generic&lt;/A&gt;. Here’s an example:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;FONT size=2 face=Consolas&gt;public class &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT size=2&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: #2b91af"&gt;MyComponent
&lt;/SPAN&gt;{
    &lt;SPAN style="COLOR: blue"&gt;public string &lt;/SPAN&gt;Name 
    {
        &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: blue"&gt;get
        &lt;/SPAN&gt;{
            &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: green"&gt;// The Name property may be accessed from any thread, but the
            // implementation requires that the call comes in on the UI thread.
            &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return &lt;/SPAN&gt;&lt;FONT size=2&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: #2b91af"&gt;ThreadHelper&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;.Generic.Invoke(() =&amp;gt; GetName());
        }
    }

    &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: green"&gt;// Must be called on the UI thread
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;private string &lt;/SPAN&gt;GetName()
    {
        &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: green"&gt;// ...
    &lt;/SPAN&gt;}

    &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: green"&gt;// ...
&lt;/SPAN&gt;}&lt;/FONT&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;
&lt;H3&gt;Conclusion&lt;/H3&gt;
&lt;P&gt;I hope you’ll find these three new features useful when developing your own managed extensions to Visual Studio 2010. As always, please feel free to use the comment stream to ask questions.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/BehindtheScenesSplashScreen_CC39/clip_image002_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/BehindtheScenesSplashScreen_CC39/clip_image002_2.jpg"&gt;&lt;EM&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN-LEFT: 3px; BORDER-LEFT-WIDTH: 0px; MARGIN-RIGHT: 3px" title=clip_image002 border=0 alt=clip_image002 align=left src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/BehindtheScenesSplashScreen_CC39/clip_image002_thumb.jpg" width=101 height=101 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/BehindtheScenesSplashScreen_CC39/clip_image002_thumb.jpg"&gt;&lt;/EM&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Paul Harrington&lt;/STRONG&gt; – Principal Developer, Visual Studio Platform Team. &lt;BR&gt;&lt;STRONG&gt;Biography: &lt;/STRONG&gt;Paul has worked on every version of Visual Studio .Net to date. Prior to joining the Visual Studio team in 2000, Paul spent six years working on mapping and trip planning software for what is today known as Bing Maps. For Visual Studio 2010, Paul designed and helped write the code that enabled the Visual Studio Shell team to move from a native, Windows 32-based implementation to a modern, fully managed presentation layer based on the Windows Presentation Foundation (WPF). Paul holds a master’s degree from the University of Cambridge, England and lives with his wife and two cats in Seattle, Washington.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10013853" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VS2010/">VS2010</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/Paul+Harrington/">Paul Harrington</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/">extensibility</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/features/">features</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/MPF/">MPF</category></item><item><title>Announcing: Collapse Selection in Solution Explorer extension</title><link>http://blogs.msdn.com/b/visualstudio/archive/2010/05/13/announcing-collapse-selection-in-solution-explorer-extension.aspx</link><pubDate>Thu, 13 May 2010 21:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10009247</guid><dc:creator>Visual Studio Blog</dc:creator><slash:comments>25</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/rsscomments.aspx?WeblogPostID=10009247</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/commentapi.aspx?WeblogPostID=10009247</wfw:comment><comments>http://blogs.msdn.com/b/visualstudio/archive/2010/05/13/announcing-collapse-selection-in-solution-explorer-extension.aspx#comments</comments><description>&lt;P&gt;We have received much feedback asking for a feature that would recursively collapse nodes in the solution explorer. We are happy to announce the Collapse Selection in Solution Explorer extension!&lt;/P&gt;
&lt;H5&gt;What is the Collapse Selection in Solution Explorer extension?&lt;/H5&gt;
&lt;P&gt;Many Visual Studio users have a solution tree structure with multiple projects and solution folders that are organized as a deep hierarchy. To avoid visual pollution, users want only those projects expanded that are being actively developed (often with many of the project’s child nodes recursively collapsed). To accomplish this task, they have to manually collapse each node recursively – an onerous chore if one has a deeply nested solution tree. The Collapse Selection in Solution Explorer extension addresses this particular issue by enabling the user to recursively collapse multiple nodes with a single click.&lt;/P&gt;
&lt;H5&gt;How do I install the extension?&lt;/H5&gt;
&lt;P&gt;1. You can &lt;A href="http://visualstudiogallery.msdn.microsoft.com/en-us/cb0ec47d-05a4-40a7-ba39-9a2da6492f1c" mce_href="http://visualstudiogallery.msdn.microsoft.com/en-us/cb0ec47d-05a4-40a7-ba39-9a2da6492f1c"&gt;download the extension&lt;/A&gt; from the VS Gallery. Double-click the downloaded VSIX file and the extension will be installed.&lt;/P&gt;
&lt;P&gt;2. You can navigate to Tools –&amp;gt; Extension Manager, and search for “Collapse Selection in Solution Explorer” in the Online Gallery. Simply download and click Install.&lt;/P&gt;
&lt;H5&gt;How does the extension work?&lt;/H5&gt;
&lt;P&gt;Once the extension is installed, you will see a button appear in the Solution Explorer bar. Choose any collapsible node (any node with children nodes; i.e. parent node) in the Solution Explorer and click the Collapse Selection button. All the children nodes will be recursively collapsed to show only the parent node. When you click the expand/collapse icon next to the just collapsed parent node, the parent node will expand to list all the children nodes which will appear collapsed if they have their own children nodes (see figure below). You can select the solution node and click the Collapse Selection button to recursively collapse all nodes in the solution tree. You can also select multiple collapsible nodes and click the Collapse Selection button to recursively collapse each of them.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/AnnouncingCollapseSelectioninSolutionExp_F287/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/AnnouncingCollapseSelectioninSolutionExp_F287/image_4.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/AnnouncingCollapseSelectioninSolutionExp_F287/image_thumb_1.png" width=887 height=214 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/AnnouncingCollapseSelectioninSolutionExp_F287/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;H5&gt;I prefer using my keyboard. Is it possible to use this extension through keyboard shortcuts?&lt;/H5&gt;
&lt;P&gt;Definitely. Ensure that the focus is on the Solution Explorer and press Alt + Num(-) to collapse selected nodes. You can also use the Command Window by entering the following command: View.CollapseSelectionInSolutionExplorer.&lt;/P&gt;
&lt;H5&gt;Is this extension limited to certain project types?&lt;/H5&gt;
&lt;P&gt;No. This extension should work with all project types.&lt;/P&gt;
&lt;H5&gt;How can I provide feedback?&lt;/H5&gt;
&lt;P&gt;We love feedback!&lt;/P&gt;
&lt;P&gt;1. Comment on this blog post.&lt;/P&gt;
&lt;P&gt;2. Log onto &lt;A href="http://connect.microsoft.com/visualstudio" mce_href="http://connect.microsoft.com/visualstudio"&gt;Connect&lt;/A&gt; and file a bug.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhydoesVisualStudio2010convertmyprojects_E8BD/Luau%20in%20Hawaii_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhydoesVisualStudio2010convertmyprojects_E8BD/Luau%20in%20Hawaii_2.jpg"&gt;&lt;IMG title="Luau in Hawaii" border=0 alt="Luau in Hawaii" align=left src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhydoesVisualStudio2010convertmyprojects_E8BD/Luau%20in%20Hawaii_thumb.jpg" width=50 height=80 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhydoesVisualStudio2010convertmyprojects_E8BD/Luau%20in%20Hawaii_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;Richa Prasad&lt;/STRONG&gt; – Program Manager, Visual Studio Project Team&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;Short Bio: &lt;/STRONG&gt;I am a PM on the Visual Studio Project System team. I work on many Project features such as conversion, solution load, references, project properties and others. Prior to joining Microsoft, I was a graduate student at University of Washington.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10009247" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VS2010/">VS2010</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/">extensibility</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/Project/">Project</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/Richa+Prasad/">Richa Prasad</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extension/">extension</category></item><item><title>Open thread: Extensibility is the future?</title><link>http://blogs.msdn.com/b/visualstudio/archive/2010/05/06/open-thread-extensibility-is-the-future.aspx</link><pubDate>Thu, 06 May 2010 19:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10008706</guid><dc:creator>Visual Studio Blog</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/rsscomments.aspx?WeblogPostID=10008706</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/commentapi.aspx?WeblogPostID=10008706</wfw:comment><comments>http://blogs.msdn.com/b/visualstudio/archive/2010/05/06/open-thread-extensibility-is-the-future.aspx#comments</comments><description>&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;With the release of Visual Studio 2010 came a major improvement to the overall extensibility story of Visual Studio; the new editor. With the new editor VS was introduced to a Managed Extensibility Framework (MEF) based API that opened up possibilities you could barely dream of in previous versions of VS. Inside of the editor you’re able to do nearly anything, from adding visualizations to using multiple fonts in the same file. For us, the extensibility we present with the editor is an important step forward, especially when you consider what &lt;/FONT&gt;&lt;A href="http://www.scottberkun.com/blog/2010/the-end-of-the-killer-feature/" mce_href="http://www.scottberkun.com/blog/2010/the-end-of-the-killer-feature/"&gt;&lt;FONT size=3 face=Calibri&gt;people&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face=Calibri&gt; in the &lt;/FONT&gt;&lt;A href="http://www.tmcnet.com/channels/voip-developer/articles/59089-extensibility-next-killer-application.htm" mce_href="http://www.tmcnet.com/channels/voip-developer/articles/59089-extensibility-next-killer-application.htm"&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;industry&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt; are starting to say about the future of software. As such, I want to ask you, our users/followers/critics, is extensibility the future? What do you think of the steps we’ve taken with the new MEF extensibility in the editor? How do you feel about the VSIX format? And lastly, where do you think we should go?&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;FONT size=3 face=Calibri&gt;(Open threads are designed to be a discussion seeded by some little blurb, so comment away!)&lt;/FONT&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;o:p&gt;Cheers,&lt;BR&gt;&lt;/o:p&gt;&lt;o:p&gt;Chris Granger&lt;/o:p&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10008706" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/">extensibility</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/Open+thread/">Open thread</category></item><item><title>Custom Build Steps, Tools, and Events</title><link>http://blogs.msdn.com/b/visualstudio/archive/2010/04/26/custom-build-steps-tools-and-events.aspx</link><pubDate>Mon, 26 Apr 2010 18:51:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10002716</guid><dc:creator>Andrew L Arnott</dc:creator><slash:comments>15</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/rsscomments.aspx?WeblogPostID=10002716</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/commentapi.aspx?WeblogPostID=10002716</wfw:comment><comments>http://blogs.msdn.com/b/visualstudio/archive/2010/04/26/custom-build-steps-tools-and-events.aspx#comments</comments><description>&lt;p&gt;The VC++ build system is of course MSBuild based in VS 2010.&amp;#160; This automatically gives you a great deal more flexibility to customize your build than you had with .vcproj project files in prior releases.&amp;#160; We went out of our way to ensure that the .targets files that drive the build of a .vcxproj file in VS 2010 leverage as much MSBuild flexibility as possible.&amp;#160; &lt;/p&gt;  &lt;p&gt;Some build extensions are very simple: just execute a hard-coded command at a given place and time during the build.&amp;#160; Others are more complex: any time you see a *.crt file run a custom tool on it, setting parameters based on properties on that item, etc.&amp;#160; We wanted to keep the simple scenarios simple, and save the complexity that comes with flexibility for only those scenarios that needed it.&amp;#160; This post will discuss a couple of the simple build extension options you have, and how they’ve changed since VS 2008.&lt;/p&gt;  &lt;p&gt;In VS 2008, Visual C++ had a couple of the simple scenarios called Custom Build Step and Custom Build Tool.&amp;#160; Actually these ideas ran together in not so obvious ways in 2008 which made them a bit confusing despite their intention to support the simple scenarios.&amp;#160; So let’s just look at what they are in VS 2010.&lt;/p&gt;  &lt;h4&gt;Foreword about build extensions&lt;/h4&gt;  &lt;p&gt;First some overall truths about these build extensions:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;For each of these build extensions, the command line that is executed is stored in the MSBuild project file as item [definition] metadata, which means you can use any existing project property you want in assembling the command line.&amp;#160; &lt;/li&gt;    &lt;li&gt;The command gets emitted into a batch file and executed, so your command line is processed as one command per line, allowing multiple commands to be executed.&lt;/li&gt;    &lt;li&gt;Any command works, even “echo”, since the command is actually passed to cmd.exe for processing. &lt;/li&gt;    &lt;li&gt;The command executes synchronously, so the rest of the project’s build is held up while your command is executing.&lt;/li&gt;    &lt;li&gt;If the command you execute returns a failing error code, the entire build fails.&lt;/li&gt;    &lt;li&gt;The command runs with the VC environment variables and path set (unless you go out of your way to schedule the command to run before the SetEnv target).&lt;/li&gt;    &lt;li&gt;There is a :VCEnd label emitted at the end of the generated command file, which can be used to skip the rest of your commands with “goto VCEnd”&lt;/li&gt;    &lt;li&gt;You can see the output of the executed command in the Visual Studio Output window under normal verbosity, and can see the actual command itself with verbosity set to detailed.&lt;/li&gt; &lt;/ul&gt;  &lt;h4&gt;Custom Build Step&lt;/h4&gt;  &lt;p&gt;Custom Build Steps are the quick (but not dirty) way to get an arbitrary command executed at a specific point during the build.&amp;#160; The Custom Build Step is a &lt;b&gt;project level &lt;/b&gt;build step (meaning it runs only once during a project build rather than once per file). &lt;/p&gt;  &lt;p&gt;The way the Execute After and Execute Before properties work may not be totally obvious.&amp;#160; It hooks into MSBuild’s new “before and after” targets feature, which allows an MSBuild target to declare any arbitrary target included in the project (or its imports) that this target should run before or after.&amp;#160; Important ramifications of this include:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;The custom build step only runs when one of the targets you select are run as a normal part of the build.&amp;#160; So if you select “Execute After: CLCompile”, and the CLCompile target doesn’t run because the target’s Condition evaluates to false then will your custom build step won’t run either. Note that if CLCompile’s Condition evaluates to true, but is skipped anyway because MSBuild deems the target is up to date already, its before and after targets execute anyway.&lt;/li&gt;    &lt;li&gt;You can list multiple targets as a semi-colon delimited list. &lt;/li&gt;    &lt;li&gt;The custom build step runs &lt;i&gt;only once &lt;/i&gt;during the build, at the first qualifying opportunity – not before &lt;i&gt;and &lt;/i&gt;after every target you listed.&amp;#160; So if you say “Execute Before: CLCompile” and “Execute After: Build”, then during the build, whichever of those happens first will determine when your custom build step runs, and the second qualifying point in the build (if there is one) will &lt;i&gt;not&lt;/i&gt; execute the custom build step a second time. &lt;/li&gt; &lt;/ol&gt;  &lt;h5&gt;When your Custom Build Step runs (or doesn’t!)&lt;/h5&gt;  &lt;p&gt;Custom Build Steps are included as part of the intelligence that drives incremental build using the “Additional Dependencies” and “Outputs” properties.&amp;#160; If a file in your “Additional Dependencies” property is touched, then your Custom Build Step will be considered out of date and will build with your next build (as long as the .targets it runs before/after are also run).&amp;#160; &lt;/p&gt;  &lt;p&gt;The Outputs property is a semicolon-delimited list of files, and must list whatever files are generated as part of the execution of your custom build step.&amp;#160; &lt;i&gt;If you leave your Outputs property empty, your Custom Build Step will never execute&lt;/i&gt;, since MSBuild will determine that no outputs are out of date.&amp;#160; If your step doesn’t generate files but you still want it to execute with every build, making up a fake filename will do the trick, since that file will never exist and MSBuild will always determine that the custom build step is out of date. However, before you do this, consider Build Events (below).&lt;/p&gt;  &lt;h4&gt;Custom Build Tool&lt;/h4&gt;  &lt;p&gt;Custom Build Tools allow you to execute a custom command line for an individual source file as part of the build.&amp;#160; Custom Build Tool is a &lt;b&gt;file level&lt;/b&gt; build extension, and without a source item being marked CustomBuild, this tool won’t do anything.&amp;#160; You can right-click a CustomBuild project item in Solution Explorer and click Compile to invoke your custom build tool.&lt;/p&gt;  &lt;p&gt;Any source item (read: file in your project) can have a custom command line executed during the build by setting its Item Type property in the property pages for that item to “Custom Build Tool” (or CustomBuild in the project file directly).&amp;#160; If using the UI, be sure to click Apply to see the Custom Build Tool property page appear.&lt;/p&gt;  &lt;p&gt;In the Custom Build Tool property page, you may notice it looks &lt;i&gt;very&lt;/i&gt; similar to the Custom Build Step property page.&amp;#160; This is more by coincidence than design.&amp;#160; But there is a legacy-compatibility link between Custom Build Step and Custom Build Tool in VS2010: custom build tools always run at the time the custom build step would run; except when it doesn’t.&amp;#160; When no value is specified for Execute Before and Execute After for the Custom Build Step, the before and after targets for custom build step and custom build tool vary (go figure) in order to maintain compatibility with VS 2008.&amp;#160; In all other ways these two build extensions are totally unrelated.&lt;/p&gt;  &lt;p&gt;Custom Build Tool is targeted at the exceptional source item case (you have just one source item that needs this kind of command executed on it) rather than a group of files.&amp;#160; If you’re trying to set up a command that runs on all .&lt;i&gt;customextension&lt;/i&gt; files, you should consider using a Custom Build Rule (now called Build Customization) rather than a Custom Build Tool, as that is exactly what custom build rules are for.&lt;/p&gt;  &lt;p&gt;If Custom Build Tool is file-level, why do you see Custom Build Tool in your project level property pages?&amp;#160; Because just like any other tool (i.e. CL or Link), you can set project-level defaults for its properties.&amp;#160; But these properties have no impact on the project itself… only on project source items that are of the CustomBuild type.&lt;/p&gt;  &lt;h4&gt;Build Events&lt;/h4&gt;  &lt;p&gt;Nothing much changed here since VS2008.&amp;#160; These three events (Pre-build, Pre-link, and Post-build) fire during the course of a normal build and allow you to execute arbitrary &lt;b&gt;project-level&lt;/b&gt; commands. &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10002716" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/">extensibility</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VC_2B002B00_/">VC++</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/MSBuild/">MSBuild</category></item><item><title>Start Extending Visual Studio 2010!</title><link>http://blogs.msdn.com/b/visualstudio/archive/2010/04/21/extending-visual-studio-2010.aspx</link><pubDate>Wed, 21 Apr 2010 16:05:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9996267</guid><dc:creator>Visual Studio Blog</dc:creator><slash:comments>8</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/rsscomments.aspx?WeblogPostID=9996267</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/commentapi.aspx?WeblogPostID=9996267</wfw:comment><comments>http://blogs.msdn.com/b/visualstudio/archive/2010/04/21/extending-visual-studio-2010.aspx#comments</comments><description>&lt;P&gt;Visual Studio not only boasts a wide variety of tools to improve developer productivity, but it is also extremely extensible so that it can be tailored and customized to serve specifically &lt;I&gt;your&lt;/I&gt; needs. In fact, one of the key benefits of Visual Studio 2010 is its improved extensibility story. With an easier deployment experience, more extensive yet simpler extensibility API, and ability to create advanced visuals directly on the Editor’s surface, you can extend Visual Studio more easily and quickly than ever before! &lt;/P&gt;
&lt;P&gt;We have many great resources to help you get started with writing Visual Studio extensions:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=47305cf4-2bea-43c0-91cd-1b853602dcc5&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=47305cf4-2bea-43c0-91cd-1b853602dcc5&amp;amp;displaylang=en"&gt;Visual Studio 2010 SDK&lt;/A&gt; (explore at &lt;A href="http://msdn.microsoft.com/en-us/library/bb166441.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb166441.aspx"&gt;MSDN&lt;/A&gt;) includes project templates to help you create tool windows, menu commands, isolated shell projects, and editor extensions. The SDK also includes build tasks to help you build and debug extensions.&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=0def949d-2933-49c3-ac50-e884e0ff08a7&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=0def949d-2933-49c3-ac50-e884e0ff08a7&amp;amp;displaylang=en"&gt;Visualization and Modeling SDK&lt;/A&gt; (explore at &lt;A href="http://msdn.microsoft.com/en-us/library/bb126259.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb126259.aspx"&gt;MSDN&lt;/A&gt;) provides tools and templates for building Visual Studio Domain Specific Language designers for Visual Studio 2010 and extending UML and Layer designers. By using this SDK, you can build your own graphical or form-based designers for Visual Studio 2010 and extend existing tools.&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn.com/vstudio" mce_href="http://msdn.com/vstudio"&gt;Visual Studio Developer Center&lt;/A&gt; is the nexus for any Visual Studio related information. It links to downloads, explains how to write and publish your own extensions, hosts forums to discuss best practices and development issues, points to documentation on any and all Visual Studio features, and surfaces many other useful sources of information.&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://code.msdn.microsoft.com/vsx" mce_href="http://code.msdn.microsoft.com/vsx"&gt;Visual Studio Extensibility Code Gallery&lt;/A&gt; presents many Visual Studio 2010 code samples that illustrate how to write extensions. Examples include writing your own debug engine, language service, or custom source control, among many other Debugger,&amp;nbsp;Editor, Shell, Project, and MSBuild samples.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;We hope these resources will be of great help to you. As always, we are happy to hear your feedback. Please comment on this blog post to do so.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhydoesVisualStudio2010convertmyprojects_E8BD/Luau%20in%20Hawaii_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhydoesVisualStudio2010convertmyprojects_E8BD/Luau%20in%20Hawaii_2.jpg"&gt;&lt;IMG title="Luau in Hawaii" border=0 alt="Luau in Hawaii" align=left src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhydoesVisualStudio2010convertmyprojects_E8BD/Luau%20in%20Hawaii_thumb.jpg" width=50 height=80 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhydoesVisualStudio2010convertmyprojects_E8BD/Luau%20in%20Hawaii_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;Richa Prasad&lt;/STRONG&gt; – Program Manager, Visual Studio Project Team&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;Short Bio: &lt;/STRONG&gt;I am a PM on the Visual Studio Project System team. I work on many Project features such as conversion, solution load, references, project properties and others. Prior to joining Microsoft, I was a graduate student at University of Washington.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9996267" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VS2010/">VS2010</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/">extensibility</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/release/">release</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/vsvmsdk/">vsvmsdk</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/vssdk/">vssdk</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/Richa+Prasad/">Richa Prasad</category></item><item><title>Custom Extension Types with VSIX</title><link>http://blogs.msdn.com/b/visualstudio/archive/2010/04/16/custom-extension-types-with-vsix.aspx</link><pubDate>Fri, 16 Apr 2010 21:23:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9994763</guid><dc:creator>Aaron Marten</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/rsscomments.aspx?WeblogPostID=9994763</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/commentapi.aspx?WeblogPostID=9994763</wfw:comment><comments>http://blogs.msdn.com/b/visualstudio/archive/2010/04/16/custom-extension-types-with-vsix.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;DISCLAIMER: &lt;em&gt;While the following technique is supported in Visual Studio 2010, the interfaces and methods exposed by Microsoft.VisualStudio.ExtensionManager.dll are likely to change in future Visual Studio releases. If you create an extension that relies on Microsoft.VisualStudio.ExtensionManager.dll, there is no guarantee that your extension binary will work on future Visual Studio releases without code changes.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you’ve &lt;a href="http://blogs.msdn.com/visualstudio/archive/2010/01/19/using-the-vsix-manifest-editor.aspx" mce_href="http://blogs.msdn.com/visualstudio/archive/2010/01/19/using-the-vsix-manifest-editor.aspx"&gt;used the VSIX Manifest editor&lt;/a&gt; when creating an extension for Visual Studio 2010, you may have noticed the various options when you add content to the VSIX container. Clicking the “Add Content” button will bring up a dialog that allows you to select a content type.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CustomVSIXExtensionTypes_DEFA/AddContentDialog_2.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CustomVSIXExtensionTypes_DEFA/AddContentDialog_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="AddContentDialog" border="0" alt="AddContentDialog" src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CustomVSIXExtensionTypes_DEFA/AddContentDialog_thumb.png" width="304" height="222" mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CustomVSIXExtensionTypes_DEFA/AddContentDialog_thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Most of the choices are well-known types that Visual Studio already knows how to consume:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Project/Item Template: A collection of &lt;a href="http://msdn.microsoft.com/en-us/library/ms247064(VS.100).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms247064(VS.100).aspx"&gt;VSTemplate&lt;/a&gt; zip files from which a user can create projects and project items. &lt;/li&gt;    &lt;li&gt;Template Wizard: An assembly (distributed with one or more VSTemplates) that contains a &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.templatewizard.iwizard.aspx" mce_href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.templatewizard.iwizard.aspx"&gt;template wizard extension&lt;/a&gt; to show UI or perform custom logic at template instantiation time. &lt;/li&gt;    &lt;li&gt;VS Package: A &lt;a href="http://blogs.msdn.com/visualstudio/archive/2009/12/18/what-s-a-pkgdef-and-why.aspx" mce_href="http://blogs.msdn.com/visualstudio/archive/2009/12/18/what-s-a-pkgdef-and-why.aspx"&gt;PkgDef file&lt;/a&gt; containing configuration information for &lt;a href="http://msdn.microsoft.com/en-us/library/bb165146.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb165146.aspx"&gt;a VSPackage&lt;/a&gt;. &lt;/li&gt;    &lt;li&gt;MEF Component: An assembly to be queried and consumed by the VS MEF Host for &lt;a href="http://msdn.microsoft.com/en-us/library/dd885013(VS.100).aspx" mce_href="http://msdn.microsoft.com/en-us/library/dd885013(VS.100).aspx"&gt;extending the core text editor&lt;/a&gt; and other MEF-based subsystems in the IDE. &lt;/li&gt;    &lt;li&gt;Toolbox Control: An assembly containing one or more controls to publish on the Toolbox for use in the various UI designers in Visual Studio. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;You may be wondering what the “Custom Extension Type” entry (highlighted above) is and why you would want to use it.&lt;/p&gt;  &lt;p&gt;Let’s say you want to ship an extension to Visual Studio that is itself extensible. If the extensibility points you are exposing involve managed code, a MEF-based solution would be a reasonable option to consider. However, imagine that what you consume from your extenders is more like data or content rather than code. [For a real world example, consider the built-in Project/Item Template extension content types.] In this case, having these extension authors create an assembly (and having Visual Studio load and manage it at runtime) simply to provide data or content is too heavyweight.&lt;/p&gt;  &lt;p&gt;This is where the content with a Custom Extension Type comes in handy. “OK”, you may be thinking. “But why couldn’t I just have end-users put these content files into a certain directory on the local machine where my extension would find them?” You certainly could. However, the advantage of using VSIX content with a Custom Extension Type is that the content can be managed by the end-user via the &lt;a href="http://blogs.msdn.com/visualstudio/archive/2010/02/19/how-vsix-extensions-are-discovered-and-loaded-in-vs-2010.aspx" mce_href="http://blogs.msdn.com/visualstudio/archive/2010/02/19/how-vsix-extensions-are-discovered-and-loaded-in-vs-2010.aspx"&gt;Extension Manager&lt;/a&gt;. Installing and removing the content is exactly the same user experience as for any other extension.&lt;/p&gt;  &lt;h2&gt;Walkthrough: Consuming Custom Extension Content&lt;/h2&gt;  &lt;p&gt;Let’s create an extension to demonstrate consuming custom content distributed in a VSIX. In this walkthrough, we’ll create a tool window called Image Browser that queries the Extension Manager for content of type &lt;em&gt;WalkthroughImage&lt;/em&gt;. Then, we’ll create another extension that provides the content that our tool window will consume. (&lt;strong&gt;&lt;em&gt;You must have the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=47305cf4-2bea-43c0-91cd-1b853602dcc5" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=47305cf4-2bea-43c0-91cd-1b853602dcc5"&gt;Visual Studio 2010 SDK&lt;/a&gt; installed to complete the walkthrough.&lt;/em&gt;&lt;/strong&gt;)&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Open the New Project dialog to create a new Visual Studio Package from the Extensibility category under Visual C# called “ImageBrowser”. &lt;/li&gt;    &lt;li&gt;In the Visual Studio Package Wizard, select the “Tool Window” option on Page 3. &lt;/li&gt;    &lt;li&gt;Rename “My Tool Window” to “Image Browser” on Page 5. &lt;/li&gt;    &lt;li&gt;After completing the wizard, replace the content inside the &amp;lt;Grid&amp;gt; element in MyControl.xaml with the following:      &lt;br /&gt;      &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;       &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ScrollViewer&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;WrapPanel&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;wrapPanel1&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ScrollViewer&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

      &lt;br /&gt;&lt;/div&gt;
  &lt;/li&gt;

  &lt;li&gt;Add a reference to Microsoft.VisualStudio.ExtensionManager.dll (located in &amp;lt;VSInstallDirectory&amp;gt;\Common7\IDE\PrivateAssemblies) &lt;/li&gt;

  &lt;li&gt;In MyControl.xaml.cs, add the following method:&amp;#160; &lt;br /&gt;

    &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;internal&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; AddImageFromPath(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; path)&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; ImageWidth = 250;&lt;br /&gt;    BitmapImage bitmapImage = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; BitmapImage();&lt;br /&gt;    bitmapImage.BeginInit(); &lt;br /&gt;    bitmapImage.UriSource = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Uri(path); &lt;br /&gt;    bitmapImage.DecodePixelWidth = ImageWidth; &lt;br /&gt;    bitmapImage.EndInit(); &lt;br /&gt;    &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.wrapPanel1.Children.Add(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Image() &lt;br /&gt;    { &lt;br /&gt;        Source = bitmapImage, MaxWidth = ImageWidth &lt;br /&gt;    });&lt;br /&gt;}&lt;/pre&gt;

      &lt;br /&gt;&lt;/div&gt;
 &lt;/li&gt;

  &lt;li&gt;Close MyControl.xaml.cs &lt;/li&gt;

  &lt;li&gt;Open &lt;strong&gt;&lt;em&gt;MyToolWindow.cs&lt;/em&gt;&lt;/strong&gt; and add the following using statement: 

    &lt;br /&gt;

    &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Microsoft.VisualStudio.ExtensionManager;&lt;/pre&gt;

      &lt;br /&gt;&lt;/div&gt;
  &lt;/li&gt;

  &lt;li&gt;Add the following code at the end of the MyToolWindow constructor:
    &lt;br /&gt;

    &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #008000"&gt;//Query the Extension Manager for content of type &amp;quot;WalkthroughImage&amp;quot; const string WalkthroughImageContentType = &amp;quot;WalkthroughImage&amp;quot;; &lt;/span&gt;&lt;br /&gt;IVsExtensionManager extensionManager = ServiceProvider.GlobalProvider.GetService(&lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(SVsExtensionManager)) &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; IVsExtensionManager;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (extensionManager != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; image &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; extensionManager.GetEnabledExtensionContentLocations(WalkthroughImageContentType)) &lt;br /&gt;    { &lt;br /&gt;        ((MyControl)&lt;span style="color: #0000ff"&gt;base&lt;/span&gt;.Content).AddImageFromPath(image); &lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;

      &lt;br /&gt;&lt;/div&gt;
  &lt;/li&gt;

  &lt;li&gt;Press F5 to debug the extension in the Experimental instance. You can show the tool window you just created from Views –&amp;gt; Other Windows –&amp;gt; Image Browser, but there won’t be any images in the tool window just yet. &lt;/li&gt;

  &lt;li&gt;Close the Experimental instance and return to your previous VS instance. &lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;Walkthrough: Creating an Extension with Custom Content&lt;/h2&gt;

&lt;p mce_keep="true"&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Now let’s create another extension that will provide content to our tool window we just created. We’ll create a VSIX containing the sample images included in Windows 7 so that they display in our Image Browser tool window.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;In the Solution you created in the previous walkthrough, add a New Project to the solution. &lt;/li&gt;

  &lt;li&gt;In the New Project dialog, select the “VSIX Project” template from under Visual C# –&amp;gt; Extensibility or Visual Basic –&amp;gt; Extensibility. (There won’t be any code to compile, so the language choice here doesn’t matter.) &lt;/li&gt;

  &lt;li&gt;Name the project &lt;strong&gt;SampleImagePack &lt;/strong&gt;and Click OK. &lt;/li&gt;

  &lt;li&gt;In the VSIX Manifest Designer after the project is created, click the “Add Content” button. &lt;/li&gt;

  &lt;li&gt;Choose “Custom Extension Type” for the content type. &lt;/li&gt;

  &lt;li&gt;In the Type field, enter “WalkthroughImage”.&amp;#160;&amp;#160; (without the quotes) &lt;/li&gt;

  &lt;li&gt;For the source, choose the File radio button and navigate to the Sample Pictures in Windows. (They are located in the Public Pictures folder.) &lt;/li&gt;

  &lt;li&gt;Select one of the images in the folder. &lt;/li&gt;

  &lt;li&gt;Click OK in the Add Content dialog. &lt;/li&gt;

  &lt;li&gt;Repeat steps 4-9 for each image you wish to add. &lt;/li&gt;

  &lt;li&gt;Press F5 to debug both the Image Browser tool window extension and the SampleImagePack extension in the Experimental instance. &lt;/li&gt;

  &lt;li&gt;Show the image browser tool window from View –&amp;gt; Other Windows –&amp;gt; Image Browser and notice that the images added to the SampleImagePack are now displayed in the ImageBrowser control. &lt;/li&gt;

  &lt;li&gt;(optional) You can repeat the steps above to create multiple image pack VSIX’s which will be merged together in the Image Browser tool window. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When you bring up the tool window, you should see something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CustomVSIXExtensionTypes_DEFA/ImageBrowser_2.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CustomVSIXExtensionTypes_DEFA/ImageBrowser_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Image Browser" border="0" alt="Image Browser" src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CustomVSIXExtensionTypes_DEFA/ImageBrowser_thumb.png" width="244" height="177" mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CustomVSIXExtensionTypes_DEFA/ImageBrowser_thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We’re looking forward to seeing how you use this functionality for your own extensions! As always, please let us know what you think.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CustomVSIXExtensionTypes_DEFA/aaronm3_2%5B1%5D_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CustomVSIXExtensionTypes_DEFA/aaronm3_2%5B1%5D_2.jpg"&gt;&lt;img style="border-right-width: 0px; margin: 0px 15px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="aaronm3_2[1]" border="0" alt="aaronm3_2[1]" align="left" src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CustomVSIXExtensionTypes_DEFA/aaronm3_2%5B1%5D_thumb.jpg" width="109" height="109" mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CustomVSIXExtensionTypes_DEFA/aaronm3_2%5B1%5D_thumb.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Aaron Marten -&lt;/b&gt; Developer, Visual Studio Platform&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Short Bio&lt;/b&gt;: Aaron has been on the Visual Studio team for over 6 years with a focus on extensibility. For Visual Studio 2010, Aaron worked on the Extension Manager and the Visual Studio SDK. In addition to contributing to the Visual Studio blog, he also writes about extending the IDE on his own blog at &lt;a href="http://blogs.msdn.com/aaronmar" mce_href="http://blogs.msdn.com/aaronmar"&gt;http://blogs.msdn.com/aaronmar&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9994763" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VS2010/">VS2010</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/">extensibility</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VSIX/">VSIX</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/walkthrough/">walkthrough</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/Aaron+Marten/">Aaron Marten</category></item><item><title>Troubleshooting pkgdef Files</title><link>http://blogs.msdn.com/b/visualstudio/archive/2010/03/22/troubleshooting-pkgdef-files.aspx</link><pubDate>Mon, 22 Mar 2010 13:35:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9980043</guid><dc:creator>Visual Studio Blog</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/rsscomments.aspx?WeblogPostID=9980043</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/commentapi.aspx?WeblogPostID=9980043</wfw:comment><comments>http://blogs.msdn.com/b/visualstudio/archive/2010/03/22/troubleshooting-pkgdef-files.aspx#comments</comments><description>&lt;H1&gt;&lt;/H1&gt;
&lt;P&gt;For those using the Visual Studio 2010 SDK to create extensions for Visual Studio, you should find the creation and use of &lt;STRONG&gt;.pkgdef&lt;/STRONG&gt; files to be mostly automatic (see &lt;A href="http://blogs.msdn.com/visualstudio/archive/2009/12/18/what-s-a-pkgdef-and-why.aspx" mce_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;). However, like anything involving computers and software, there are occasions that require manual intervention because they aren’t covered by the automatic settings or things can go wrong. This article illustrates some possible issues with .pkgdef files and provides techniques for discovering what’s wrong and correcting them.&lt;/P&gt;
&lt;P&gt;Please note that these techniques apply not only to the Visual Studio 2010 IDE, but also to applications built using the Visual Studio 2010 Shell (Isolated) (or Integrated). All of the examples assume the case of VS 2010 running on 32-bit Windows 7. For other cases, substitute the appropriate file locations and names and registry root key.&lt;/P&gt;
&lt;H3&gt;What Could Go Wrong?&lt;/H3&gt;
&lt;P&gt;First of all, how do you know if something goes wrong? A problem with a .pkgdef file usually manifests itself in one of two ways:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;All or part of a Visual Studio extension, such as a VS Package, simply fails to load or an error message is displayed about needing to reinstall Visual Studio. &lt;/LI&gt;
&lt;LI&gt;Your Visual Studio extension tries to retrieve a registry value it expected to be included in the install and does not find it. The result can be anything from using an appropriate default to displaying a message about an exception. &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Either of these symptoms can be caused by one or more of the issues listed below. The list is by no means intended to be exhaustive.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/visualstudio/archive/2010/03/22/troubleshooting-pkgdef-files.aspx#peruserextension"&gt;Per-user Extension Is Not Enabled&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/visualstudio/archive/2010/03/22/troubleshooting-pkgdef-files.aspx#filenotfound"&gt;pkgdef File Is Not Found&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/visualstudio/archive/2010/03/22/troubleshooting-pkgdef-files.aspx#invalidsyntax"&gt;Invalid Syntax&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/visualstudio/archive/2010/03/22/troubleshooting-pkgdef-files.aspx#substitutionstring"&gt;Unrecognized Substitution String&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/visualstudio/archive/2010/03/22/troubleshooting-pkgdef-files.aspx#invalidkey"&gt;Invalid Registry Key&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/visualstudio/archive/2010/03/22/troubleshooting-pkgdef-files.aspx#registrycollision"&gt;Registry Value Collisions&lt;/A&gt; &lt;/LI&gt;&lt;/UL&gt;
&lt;H3&gt;Issue: &lt;A title=peruserextension name=peruserextension&gt;&lt;/A&gt;Per-user Extension Is Not Enabled&lt;/H3&gt;
&lt;P&gt;Pkgdef files that are installed as part of a user extension deployed using the new VSIX format are copied to a sub-folder of %LocalAppData%\Microsoft\VisualStudio\10.0\Extensions. The pkgdef loader does not automatically search for pkgdef files here. Rather, it loads pkgdef files for &lt;A href="http://blogs.msdn.com/visualstudio/archive/2010/02/19/how-vsix-extensions-are-discovered-and-loaded-in-vs-2010.aspx"&gt;user extensions that have been enabled&lt;/A&gt;, which the Extension Manager and the stand-alone VSIX installer both do automatically. If you choose to unpack a VSIX file yourself, or otherwise do a manual xcopy-style deployment, it’s easy to forget the step that enables the extension. This is easily fixed.&lt;/P&gt;
&lt;H3&gt;Remedy: Use the Extension Manager to enable per-user extensions&lt;/H3&gt;
&lt;P&gt;It’s entirely possible that if you manually deployed the contents of a VSIX file, you simply need to enable it in the Extension Manager dialog and restart Visual Studio before the pkgdef loader will pick it up.&lt;/P&gt;
&lt;H3&gt;Remedy: Enable per-user extensions when running as administrator&lt;/H3&gt;
&lt;P&gt;On a related note, there is an option to disable loading of all per-user extensions when running ‘as administrator’ (elevated), regardless of being enabled or not. This is controlled under &lt;STRONG&gt;Tools-Options-Extension Manager&lt;/STRONG&gt; as &lt;STRONG&gt;Load per user extensions when running as administrator&lt;/STRONG&gt;. Make sure this checkbox is checked (when appropriate).&lt;/P&gt;
&lt;H3&gt;Issue: &lt;A title=filenotfound name=filenotfound&gt;&lt;/A&gt;pkgdef File Is Not Found&lt;/H3&gt;
&lt;P&gt;For all other extensions (those that are not per user), the pkgdef loader searches the locations listed in the PkgDefSearchPath of the master pkgdef file. The value of PkgDefSearchPath has three elements:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;$RootFolder$\Common7\IDE\Extensions &lt;/LI&gt;
&lt;LI&gt;$RootFolder$\Common7\IDE\CommonExtensions &lt;/LI&gt;
&lt;LI&gt;$RootFolder$\Common7\IDE\devenv.admin.pkgdef &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;$RootFolder$ is the location where Visual Studio is installed (C:\Program Files\Microsoft Visual Studio 10.0). The first two search elements are folders, which are recursively scanned looking for pkgdef files. The third element is a specific pkgdef file (which does not typically exist, but is kept in the list as a placeholder for system administrators). &lt;/P&gt;
&lt;P&gt;An easy mistake to make is to drop a pkgdef file into either $RootFolder$ or $RootFolder$\Common7\IDE or some other sub-folder and expect the pkgdef loader to just find it. However, these locations are not in the search path.&lt;/P&gt;
&lt;H3&gt;Remedy: Use /log to discover which pkgdef files are loaded&lt;/H3&gt;
&lt;P&gt;You can find out exactly which pkgdef files the loader is finding, using the &lt;A href="http://blogs.msdn.com/visualstudio/archive/2010/02/24/troubleshooting-with-the-activity-log.aspx" mce_href="http://blogs.msdn.com/visualstudio/archive/2010/02/24/troubleshooting-with-the-activity-log.aspx"&gt;/log command line option for Visual Studio&lt;/A&gt;. Among the items the pkgdef loader logs are the full expanded value for the PkgDefSearchPath, a list of all of the pkgdef files found on the search path, and a list of the pkgdef files found for enabled extensions.&lt;/P&gt;
&lt;TABLE border=1 cellSpacing=0 cellPadding=3&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top&gt;&lt;FONT size=+1&gt;&lt;STRONG&gt;Trick&lt;/STRONG&gt;&lt;/FONT&gt; &lt;BR&gt;Since the pkgdef loader will not rebuild the cache if it does not think it is out of date, there is a bit of a trick to using /log to debug pkgdef load issues when you are not sure which files it is finding (and thus which ones to touch). Use Notepad to create a file called “log.pkgdef” that contains a single comment line (“// comment”) and copy it to C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\Extensions. This ensures that the pkgdef loader has a new file to process. If you need to run /log more than once with this file in place, be sure that it gets saved with a new timestamp before each run.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;Run: &lt;STRONG&gt;devenv.exe /log&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;When Visual Studio is finished loading (status bar reads “Ready”), File - Exit, start Windows Explorer, browse to &lt;STRONG&gt;C:\Users\User\AppData\Roaming\Microsoft\VisualStudio\10.0&lt;/STRONG&gt;, and open the file &lt;STRONG&gt;ActivityLog.xml.&lt;/STRONG&gt; It should open in Internet Explorer using the associated XSL to format it in an table. &lt;/P&gt;
&lt;P&gt;Near the top of the file, Visual Studio will list the PkgDefSearchPath:&lt;/P&gt;
&lt;P&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=LogPkgDefSearchPath border=0 alt=LogPkgDefSearchPath src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsWrongWithMyPkgDeforDudeWheresMyRegi_F457/LogPkgDefSearchPath_thumb_2.png" width=743 height=45 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsWrongWithMyPkgDeforDudeWheresMyRegi_F457/LogPkgDefSearchPath_thumb_2.png"&gt; &lt;/P&gt;
&lt;P&gt;This is followed by the number of files found and then the list of those files, for example:&lt;/P&gt;
&lt;P&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=LogFileScanLoad border=0 alt=LogFileScanLoad src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsWrongWithMyPkgDeforDudeWheresMyRegi_F457/LogFileScanLoad_thumb.png" width=609 height=60 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsWrongWithMyPkgDeforDudeWheresMyRegi_F457/LogFileScanLoad_thumb.png"&gt; &lt;/P&gt;
&lt;P&gt;Armed with the knowledge of which folders are being scanned and which pkgdef files were discovered, you should now be able to make sure your pkgdef file is deployed to an appropriate location.&lt;/P&gt;
&lt;H3&gt;Remedy: Install System-wide extensions under the PkgDefSearchPath&lt;/H3&gt;
&lt;P&gt;Any extension that is not installed per-user should be installed in a sub-folder of $RootFolder$\Common7\IDE\Extensions or $RootFolder$\Common7\IDE\CommonExtensions. &lt;/P&gt;
&lt;H3&gt;Issue: &lt;A title=invalidsyntax name=invalidsyntax&gt;&lt;/A&gt;Invalid Syntax&lt;/H3&gt;
&lt;P&gt;This issue is most likely to crop up if you run into a situation where you must create or edit a pkgdef file manually. Like any language, it’s easy to forget a closing quote or insert an extra one. &lt;/P&gt;
&lt;P&gt;The &lt;A href="http://msdn.microsoft.com/en-us/library/cc138553(VS.100).aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc138553(VS.100).aspx"&gt;syntax of a pkgdef file&lt;/A&gt; is actually quite simple. Each line can be one of:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;comment – starts with a semi-colon (‘;’') or double-slash (‘//’) &lt;/LI&gt;
&lt;LI&gt;registry key – starts with a square bracket (‘[‘) and ends with a square bracket (‘]’) that defines a section of values &lt;/LI&gt;
&lt;LI&gt;registry value – starts with a name in double quotes or the at sign (‘@’ not in quotes) for a ‘default’ value of a key, followed by an equals sign, and then a string or numeric value &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Common syntax mistakes include:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Not enclosing a registry value name in double quotes: &lt;BR&gt;incorrect: name=”value” &lt;BR&gt;correct: “name”=”value” &lt;/LI&gt;
&lt;LI&gt;Enclosing the symbol for the default value of a registry key in double quotes: &lt;BR&gt;incorrect: “@”=”value” &lt;BR&gt;correct: @=”value” &lt;/LI&gt;
&lt;LI&gt;Omitting an opening or closing double quote for a name or string value &lt;/LI&gt;
&lt;LI&gt;Adding comments at the end of a line defining a key or value. Comments must be on their own line. &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;The pkgdef loader is not very tolerant of syntax errors and will simply refuse to load a pkgdef file that contains even a single error, rather than risk corruption of the pkgdef cache. When it does reject a pkgdef, this information is written to the activity log.&lt;/P&gt;
&lt;H3&gt;Remedy: Use /log to discover pkgdef file syntax errors&lt;/H3&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/visualstudio/archive/2010/02/24/troubleshooting-with-the-activity-log.aspx" mce_href="http://blogs.msdn.com/visualstudio/archive/2010/02/24/troubleshooting-with-the-activity-log.aspx"&gt;Use /log to generate ActivityLog.xml&lt;/A&gt;. Any syntax errors will be highlighted in red, along with a warning showing the name of the offending file (which is not loaded).&lt;/P&gt;
&lt;P&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=LogSyntaxErr border=0 alt=LogSyntaxErr src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsWrongWithMyPkgDeforDudeWheresMyRegi_F457/LogSyntaxErr_thumb_2.png" width=590 height=125 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsWrongWithMyPkgDeforDudeWheresMyRegi_F457/LogSyntaxErr_thumb_2.png"&gt; &lt;/P&gt;
&lt;P&gt;In this example, the value of “foo” is missing the closing quote expected for strings and the value of bar is given as &lt;EM&gt;word&lt;/EM&gt;, rather than &lt;EM&gt;dword &lt;/EM&gt;or &lt;EM&gt;qword&lt;/EM&gt;. The name for “bax” is not put in quotes. Once you edit the file to make these corrections (and save it and deploy it to the correct location), the pkgdef loader will see that the file has been updated and rebuild the cache automatically (you do not have to force this rebuild by deleting the registry value from the cache again).&lt;/P&gt;
&lt;H3&gt;Remedy: Use the &lt;STRONG&gt;PkgDef Editor extension for &lt;/STRONG&gt;Visual Studio &lt;/H3&gt;
&lt;P&gt;Another way to find and fix syntax errors is to download and install the new editor extension we’ve created to give syntax coloring and error output for pkgdef files. It can be found in the Visual Studio gallery, either through the Extension Manager or &lt;A href="http://visualstudiogallery.msdn.microsoft.com/en-us/bc9bbceb-a17e-4919-9c24-e803e48aa051" mce_href="http://visualstudiogallery.msdn.microsoft.com/en-us/bc9bbceb-a17e-4919-9c24-e803e48aa051"&gt;directly in the gallery&lt;/A&gt;. Just search for “pkgdef” under the &lt;STRONG&gt;Tools&lt;/STRONG&gt; category and download the &lt;STRONG&gt;PkgDef Editor&lt;/STRONG&gt; extension. &lt;/P&gt;
&lt;P&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: block; FLOAT: none; MARGIN-LEFT: auto; BORDER-TOP: 0px; MARGIN-RIGHT: auto; BORDER-RIGHT: 0px" title=EditSyntaxErr border=0 alt=EditSyntaxErr src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsWrongWithMyPkgDeforDudeWheresMyRegi_F457/EditSyntaxErr_thumb.png" width=263 height=119 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsWrongWithMyPkgDeforDudeWheresMyRegi_F457/EditSyntaxErr_thumb.png"&gt;&lt;/P&gt;
&lt;P&gt;In this example, the same errors as above are flagged, along with the pop-up message describing the problem with the value of “foo”. &lt;/P&gt;
&lt;H3&gt;Issue: &lt;A title=substitutionstring name=substitutionstring&gt;&lt;/A&gt;Unrecognized Substitution String&lt;/H3&gt;
&lt;P&gt;pkgdef files are made portable by tokenizing system-specific and user-specific information. These are known as &lt;A href="http://msdn.microsoft.com/en-us/library/ee390882(VS.100).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ee390882(VS.100).aspx"&gt;substitution strings&lt;/A&gt;. Examples are &lt;STRONG&gt;$RootKey$&lt;/STRONG&gt;, which defines the root of the Visual Studio configuration registry, the starting point for all key values, and &lt;STRONG&gt;$PackageFolder$&lt;/STRONG&gt;, which is the full path in the file system to the location from where the current pkgdef file is being loaded.&lt;/P&gt;
&lt;P&gt;Substitution strings are case-sensitive and must be enclosed between two dollar-signs (‘$’). Common mistakes related to tokens are:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Omitting the closing dollar-sign" on a substitution string name: &lt;BR&gt;incorrect: [$RootKey\subkey] &lt;BR&gt;correct: [$RootKey$\subkey] &lt;/LI&gt;
&lt;LI&gt;Using incorrect case or spelling: &lt;BR&gt;incorrect: “pathtomyfile”=”$packagefolder$\myfile.dll” or “$pkgfolder$\myfile.dll” &lt;BR&gt;correct: “pathtomyfile”=”$PackageFolder$\myfile.dll” &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;When the pkgdef loader cannot recognize a substitution string, it simply does nothing and uses it ‘as is’. When this happens in a registry key or value name, it means the key or value will not be put in the correct location or get the correct name. &lt;/P&gt;
&lt;H3&gt;Remedy: Search the registry&lt;/H3&gt;
&lt;P&gt;This can be very difficult to debug, except by knowing what to look for. When this happens for a string value, it is a little easier to detect, simply by looking in the registry using regedit.exe:&lt;/P&gt;
&lt;P&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: block; FLOAT: none; MARGIN-LEFT: auto; BORDER-TOP: 0px; MARGIN-RIGHT: auto; BORDER-RIGHT: 0px" title=RegToken border=0 alt=RegToken src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsWrongWithMyPkgDeforDudeWheresMyRegi_F457/RegToken_thumb.png" width=453 height=92 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsWrongWithMyPkgDeforDudeWheresMyRegi_F457/RegToken_thumb.png"&gt; &lt;/P&gt;
&lt;P&gt;In this example, the value for “bax” was specified with “$PkgFolder$”, rather than “$PackageFolder$”.&lt;/P&gt;
&lt;H3&gt;Remedy: Use &lt;STRONG&gt;PkgDef Language Integration for &lt;/STRONG&gt;Visual Studio &lt;/H3&gt;
&lt;P&gt;As seen above, the &lt;STRONG&gt;PkgDef Editor &lt;/STRONG&gt;extension can make it much easier to see problems with pkgdef files. In particular, it knows the valid tokens for string substitution and can flag the ones it does not recognized:&lt;/P&gt;
&lt;P&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: block; FLOAT: none; MARGIN-LEFT: auto; BORDER-TOP: 0px; MARGIN-RIGHT: auto; BORDER-RIGHT: 0px" title=EditTokenErr border=0 alt=EditTokenErr src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsWrongWithMyPkgDeforDudeWheresMyRegi_F457/EditTokenErr_thumb_1.png" width=316 height=167 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsWrongWithMyPkgDeforDudeWheresMyRegi_F457/EditTokenErr_thumb_1.png"&gt; &lt;/P&gt;
&lt;P&gt;In this example, all of the string substitution tokens (anything starting and ending with the dollar-sign) are highlighted (in blue) and the unrecognized tokens are flagged as errors. One string contains a value that was intended to be a string substitution, but is missing the closing dollar-sign, so it is not highlighted. Also in this example, it is easy to see that $RegRoot$ is not a recognized string substitution, but using regedit it was simply missing-in-action.&lt;/P&gt;
&lt;H3&gt;Issue: &lt;A title=invalidkey name=invalidkey&gt;&lt;/A&gt;Invalid Registry Key&lt;/H3&gt;
&lt;P&gt;The pkgdef loader will not write to arbitrary registry locations. It only writes registry entries within the configuration hive of Visual Studio (or an Visual Studio Shell (Isolated) application). This rule is easily followed by starting all key/section names with $RootKey$.&lt;/P&gt;
&lt;H3&gt;Remedy: Use /log to discover invalid registry keys&lt;/H3&gt;
&lt;P&gt;The pkgdef loader will log attempts to write to locations outside of the application’s configuration hive:&lt;/P&gt;
&lt;P&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=LogSection border=0 alt=LogSection src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsWrongWithMyPkgDeforDudeWheresMyRegi_F457/LogSection_thumb.png" width=590 height=65 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsWrongWithMyPkgDeforDudeWheresMyRegi_F457/LogSection_thumb.png"&gt; &lt;/P&gt;
&lt;P&gt;In this example, using the file from the previous example, $RegRoot$ was not recognized as a substitution string, so it did not get replaced with the appropriate root key for the application. And the result is not a valid location for a registry key for the application.&lt;/P&gt;
&lt;H3&gt;Issue: &lt;A title=registrycollision name=registrycollision&gt;&lt;/A&gt;Registry Value Collisions&lt;/H3&gt;
&lt;P&gt;Sometimes the same registry value is being set by more than one pkgdef file. In other cases, a registry value is being set, but it’s not clear which pkgdef file is doing it. You can either scan all of the pkgdef files and discover where the value is being set. Or use /log again.&lt;/P&gt;
&lt;H3&gt;Remedy: Use /log to discover which pkgdef(s) set a value&lt;/H3&gt;
&lt;P&gt;To discover &lt;EM&gt;all&lt;/EM&gt; pkgdef files that are setting a value, use a simple trick: explicitly set that same value by temporarily changing the master pkgdef (C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.pkgdef) to explicitly set the value before all of the other pkgdef files are processed. This will require Administrator rights to edit the file, but is otherwise straightforward. Make a backup copy of devenv.pkgdef, then bring it up in an editor. Below the [$Initialization$] section, add a new section for the parent key of the value. Then add the key value below it, save it, and run devenv.exe with /log. The pkgdef loader will log all of the additional writes to that value, along with the path to the offending pkgdef.&lt;/P&gt;
&lt;P&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=LogCollision border=0 alt=LogCollision src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsWrongWithMyPkgDeforDudeWheresMyRegi_F457/LogCollision_thumb_2.png" width=644 height=50 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsWrongWithMyPkgDeforDudeWheresMyRegi_F457/LogCollision_thumb_2.png"&gt; &lt;/P&gt;
&lt;P&gt;In this example, we caught the blog.pkgdef file writing to the value “foo” under “$RootKey$\MyExtension”. The next step is to determine why and whether this needs to change (be sure to put devenv.pkgdef back the way you found when you’re done).&lt;/P&gt;
&lt;H3&gt;Summary&lt;/H3&gt;
&lt;P&gt;This post has described several tactics for troubleshooting pkgdef issues. The most basic of these is to use /log, along with a trick for forcing PkgDef Management to rebuild the pkgdef cache. You may also find that the &lt;STRONG&gt;PkgDef Editor &lt;/STRONG&gt;extension is helpful when editing pkgdef files.&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN-LEFT: 0px; BORDER-LEFT-WIDTH: 0px; MARGIN-RIGHT: 0px" title=BillWeinberger border=0 alt=BillWeinberger align=left src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsWrongWithMyPkgDeforDudeWheresMyRegi_F457/BillWeinberger_3.jpg" width=108 height=108 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsWrongWithMyPkgDeforDudeWheresMyRegi_F457/BillWeinberger_3.jpg"&gt; Bill Weinberger&lt;/STRONG&gt;: Developer, Visual Studio Platform&lt;/P&gt;
&lt;P&gt;Bill has been with the VS Platform team for about two years, and has more than a few previous years of software industry experience working on IDEs and vertical applications. For Visual Studio 2010, he was a key contributor to PkgDef Management.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9980043" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/">extensibility</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/tips_2600_amp_3B00_tricks/">tips&amp;amp;tricks</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/Bill+Weinberger/">Bill Weinberger</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/pkgdef/">pkgdef</category></item><item><title>Creating and Sharing Project &amp; Item Templates</title><link>http://blogs.msdn.com/b/visualstudio/archive/2010/03/04/creating-and-sharing-project-item-templates.aspx</link><pubDate>Thu, 04 Mar 2010 18:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9971920</guid><dc:creator>Aaron Marten</dc:creator><slash:comments>13</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/rsscomments.aspx?WeblogPostID=9971920</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/commentapi.aspx?WeblogPostID=9971920</wfw:comment><comments>http://blogs.msdn.com/b/visualstudio/archive/2010/03/04/creating-and-sharing-project-item-templates.aspx#comments</comments><description>&lt;p&gt;One of the great new features we added in Visual Studio 2010 is the ability to easily find and consume online Project and Item templates without leaving the New Project/Item dialog. What may not be so obvious is how to go from a piece of code you want to share to a template contained in a VSIX file that can be uploaded to the &lt;a mce_href="http://visualstudiogallery.msdn.microsoft.com/en-us/" href="http://visualstudiogallery.msdn.microsoft.com/en-us/"&gt;Visual Studio Gallery&lt;/a&gt; or shared with others in your organization.&lt;/p&gt;
&lt;p&gt;This post describes two ways (one quick and simple, the other for more complex situations) to create a VSIX file that contains your shareable code templates.&lt;/p&gt;
&lt;h2&gt;Quick, (mostly) Automatic Way: Export Template as VSIX&lt;/h2&gt;
&lt;p&gt;In a series of posts on Visual Studio 2010 Beta 1 (&lt;a mce_href="http://blogs.msdn.com/pedrosilva/archive/2009/06/03/creating-an-item-template-extension-part-1.aspx" href="http://blogs.msdn.com/pedrosilva/archive/2009/06/03/creating-an-item-template-extension-part-1.aspx"&gt;Part 1&lt;/a&gt;, &lt;a mce_href="http://blogs.msdn.com/pedrosilva/archive/2009/06/04/creating-an-item-template-extension-part-2.aspx" href="http://blogs.msdn.com/pedrosilva/archive/2009/06/04/creating-an-item-template-extension-part-2.aspx"&gt;Part 2&lt;/a&gt;, &lt;a mce_href="http://blogs.msdn.com/pedrosilva/archive/2009/06/07/creating-an-item-template-extension-part-3.aspx" href="http://blogs.msdn.com/pedrosilva/archive/2009/06/07/creating-an-item-template-extension-part-3.aspx"&gt;Part 3&lt;/a&gt;, &lt;a title="Addendum" mce_href="http://blogs.msdn.com/pedrosilva/archive/2009/06/08/creating-an-item-template-extension-addendum.aspx" href="http://blogs.msdn.com/pedrosilva/archive/2009/06/08/creating-an-item-template-extension-addendum.aspx"&gt;Addendum&lt;/a&gt;), Pedro Silva walked through the process of using the standard Export Template wizard that has shipped in Visual Studio for several releases in combination with the &lt;a mce_href="http://visualstudiogallery.msdn.microsoft.com/en-us/e3d76792-d1b3-4d0c-9716-1f16c38be8b3" href="http://visualstudiogallery.msdn.microsoft.com/en-us/e3d76792-d1b3-4d0c-9716-1f16c38be8b3"&gt;VSIX Explorer tool&lt;/a&gt; or the &lt;a mce_href="http://blogs.msdn.com/aaronmar/archive/2009/06/09/what-is-the-vsix-project-template.aspx" href="http://blogs.msdn.com/aaronmar/archive/2009/06/09/what-is-the-vsix-project-template.aspx"&gt;VSIX Project template&lt;/a&gt; in the Visual Studio SDK to package up your template. While this does the job, it seemed like a few too many steps for something that should be straightforward.&lt;/p&gt;
&lt;p&gt;&lt;a mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CreatingProjectItemTemplateswiththeVisua_A4C1/ExportAsVSIXDialog_2.png" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CreatingProjectItemTemplateswiththeVisua_A4C1/ExportAsVSIXDialog_2.png"&gt;&lt;img style="margin: 0px 0px 0px 60px; display: inline; border-width: 0px;" title="Export Template As VSIX Wizard" border="0" alt="Export Template As VSIX Wizard" width="244" height="193" mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CreatingProjectItemTemplateswiththeVisua_A4C1/ExportAsVSIXDialog_thumb.png" src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CreatingProjectItemTemplateswiththeVisua_A4C1/ExportAsVSIXDialog_thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To make this process much simpler, we recently published a new &lt;b&gt;&lt;a mce_href="http://visualstudiogallery.msdn.microsoft.com/en-us/57320b20-34a2-42e4-b97e-e615c71aca24" href="http://visualstudiogallery.msdn.microsoft.com/en-us/57320b20-34a2-42e4-b97e-e615c71aca24"&gt;Export Template as VSIX wizard&lt;/a&gt;&lt;/b&gt; that will guide you through the process of turning an existing project into a VSIX file containing your template. After downloading the &lt;a mce_href="http://visualstudiogallery.msdn.microsoft.com/en-us/57320b20-34a2-42e4-b97e-e615c71aca24" href="http://visualstudiogallery.msdn.microsoft.com/en-us/57320b20-34a2-42e4-b97e-e615c71aca24"&gt;Export Template as VSIX wizard&lt;/a&gt; from the Visual Studio Gallery website or the Extension Manager dialog, you will find a new option on the File menu in Visual Studio 2010 for &amp;ldquo;Export Template as VSIX&amp;hellip;&amp;rdquo;. This will bring up the Export Template as VSIX Wizard, which will allow you to configure options for both the template and the VSIX file that will contain it.&lt;/p&gt;
&lt;h2&gt;Longer, (mostly) Manual Way: Template Project + VSIX Project&lt;/h2&gt;
&lt;p&gt;While this is the ideal way to quickly share some starter code with others, it is not ideal for &lt;i&gt;all&lt;/i&gt; situations where you&amp;rsquo;re creating a template. For example, you may be building a series of templates in conjunction with a VSPackage or editor extension. What if you are making frequent changes to the template files? What if you wish to keep the template source files in a version control system? What if you need to make a customization to the templates or the VSIX container not permitted by the Export Template as VSIX wizard?&lt;/p&gt;
&lt;p&gt;&lt;a mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CreatingProjectItemTemplateswiththeVisua_A4C1/CSProjectTemplate_2.png" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CreatingProjectItemTemplateswiththeVisua_A4C1/CSProjectTemplate_2.png"&gt;&lt;img style="display: inline; margin-left: 0px; margin-right: 0px; border-width: 0px;" title="C# Project Template in New Project Dialog" border="0" alt="C# Project Template in New Project Dialog" width="319" height="223" mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CreatingProjectItemTemplateswiththeVisua_A4C1/CSProjectTemplate_thumb.png" src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CreatingProjectItemTemplateswiththeVisua_A4C1/CSProjectTemplate_thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is where the Visual Studio SDK comes in to help. In the &lt;a mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=4659f71d-4e58-4dcd-b755-127539e21147&amp;amp;displaylang=en" href="http://www.microsoft.com/download/en/details.aspx?id=21835"&gt;Visual Studio 2010 SP1 SDK&lt;/a&gt;, we&amp;rsquo;ve included project templates for building project and item templates. (Yes, we&amp;rsquo;ve created templates for templates.) If you go to the &lt;b&gt;Extensibility&lt;/b&gt; node under &lt;b&gt;Visual C#&lt;/b&gt; or &lt;b&gt;Visual Basic&lt;/b&gt; in the &lt;b&gt;New Project&lt;/b&gt; dialog, you&amp;rsquo;ll find two new templates (for either a project template or an item template). Let&amp;rsquo;s walk through the process of creating and packaging a C# Project template using these new templates in the Visual Studio SDK.&lt;/p&gt;
&lt;h3&gt;Walkthrough: Packaging a template with the Visual Studio SDK&lt;/h3&gt;
&lt;p&gt;First, we'll create a project template project&amp;nbsp;which generates a zip file for a single template. Then, we'll create a VSIX project to contain and deploy the generated project template.&lt;/p&gt;
&lt;h3&gt;&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Open the New Project dialog to create a new &amp;ldquo;C# Project Template&amp;rdquo; from the Extensibility category called &amp;ldquo;MyTemplate&amp;rdquo;. There are a few interesting things to note about the generated project:
&lt;ul&gt;
&lt;li&gt;The .vstemplate file has a Build Action of &amp;ldquo;VSTemplate&amp;rdquo;. The .cs, .csproj, and .ico files have a Build Action of &amp;ldquo;None&amp;rdquo;. Since this project is meant to build a .zip file, not a .dll or .exe file, the code files are not compiled or treated as code by the build targets.&lt;/li&gt;
&lt;li&gt;If you open Class1.cs or ProjectTemplate.csproj in the text editor, you&amp;rsquo;ll see that there are several &lt;a mce_href="http://msdn.microsoft.com/en-us/library/eehb4faa.aspx" href="http://msdn.microsoft.com/en-us/library/eehb4faa.aspx"&gt;VSTemplate parameters&lt;/a&gt; ($safeprojectname$, $guid1$, etc&amp;hellip;) that will be replaced when the template is instantiated.&lt;/li&gt;
&lt;li&gt;The files to include in the zip file are discovered at build time by reading the .vstemplate file. Any files not specified in this file will not be included in the template zip file.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Build the project. Note that a .zip file is created for you in a subdirectory of the project output folder. (In our example, the template builds to ProjectTemplates\CSharp\1033\MyTemplate.zip.) The subdirectory in the output folder is determined by looking at a few things at build time:
&lt;ul&gt;
&lt;li&gt;The &amp;ldquo;Type&amp;rdquo; attribute in the .vstemplate file root node. Project templates go under &amp;ldquo;ProjectTemplates&amp;rdquo;. Item templates go under &amp;ldquo;ItemTemplates&amp;rdquo;.&lt;/li&gt;
&lt;li&gt;The &amp;ldquo;Language&amp;rdquo; part of the path (&amp;ldquo;CSharp&amp;rdquo; in our example) is determined by the &amp;lt;ProjectType&amp;gt; node in the .vstemplate file.&lt;/li&gt;
&lt;li&gt;The next part of the sub path is optional (and null by default). This is the OutputSubPath. This can be used for placing the template in a sub-node (e.g. Windows, Web Silverlight) in the New Project dialog. Since we&amp;rsquo;re building a template for targeting Windows, let&amp;rsquo;s specify this additional piece of metadata in the MyTemplate.csproj file. (You can edit the file by right clicking the project node and choosing &amp;ldquo;Unload Project&amp;rdquo;. Then right click the project node again and choose &amp;ldquo;Edit MyTemplate.csproj&amp;rdquo;.) &lt;br /&gt;
&lt;div style="margin: 0px; display: inline; float: none; padding: 0px;" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:ecd39096-430a-4870-baa0-d332729fd46e" class="wlWriterEditableSmartContent"&gt;
&lt;pre style="background-color: #ffffff; font-family: Consolas; word-wrap: break-word; white-space: pre-wrap; font-size: 12px; overflow: auto;"&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;VSTemplate &lt;/span&gt;&lt;span style="color: #ff0000;"&gt;Include&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="MyTemplate.vstemplate"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;OutputSubPath&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Windows&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;OutputSubPath&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;span class="Apple-style-span" style="color: #000000;"&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;VSTemplate&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;The &amp;ldquo;1033&amp;rdquo; in the path is the LCID of the template. The LCID for English (US) is 1033 and this is the default. To change the LCID (for example to 1041 for Japanese), you must edit the MyTemplate.csproj to the following: &lt;br /&gt;
&lt;div style="margin: 0px; display: inline; float: none; padding: 0px;" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:c0fc8a43-b5f5-4195-bcd8-8e49deda6515" class="wlWriterEditableSmartContent"&gt;
&lt;pre style="background-color: #ffffff; font-family: Consolas; word-wrap: break-word; white-space: pre-wrap; font-size: 12px; overflow: auto;"&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;VSTemplate &lt;/span&gt;&lt;span style="color: #ff0000;"&gt;Include&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="MyTemplate.vstemplate"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;OutputSubPath&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Windows&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;OutputSubPath&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;span color="#000000" style="color: #000000;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Culture&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;1041&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;Culture&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;VSTemplate&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Finally, the name of the zip file is taken from the name of the project specified in the New Project dialog.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The project we just created only builds a zip file for you. It does not build a VSIX file, nor does it set up the template for debugging in Visual Studio. To do that, add a new VSIX Project to your solution and call it &amp;ldquo;MyTemplateSetup&amp;rdquo;. (You can find the VSIX Project template also on the Extensibility node in the New Project dialog.)&lt;/li&gt;
&lt;li&gt;When the VSIX project is created, you should see the editor for your source.extension.vsixmanifest file appear. Click the &amp;ldquo;Add Content&amp;rdquo; button to specify that the template file you created in steps 1-2 should be included in the VSIX file built by this project.&lt;a mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CreatingProjectItemTemplateswiththeVisua_A4C1/image_2.png" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CreatingProjectItemTemplateswiththeVisua_A4C1/image_2.png"&gt; &lt;br /&gt;&lt;br /&gt;&lt;img style="display: inline; margin-left: 0px; margin-right: 0px; border-width: 0px;" title="Add Content dialog in VSIX manifest editor" border="0" alt="Add Content dialog in VSIX manifest editor" width="244" height="176" mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CreatingProjectItemTemplateswiththeVisua_A4C1/image_thumb.png" src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CreatingProjectItemTemplateswiththeVisua_A4C1/image_thumb.png" /&gt;&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Select &amp;ldquo;Project Template&amp;rdquo; for the content type&lt;/li&gt;
&lt;li&gt;For the source, select &amp;ldquo;Project&amp;rdquo; and then choose the &amp;ldquo;MyTemplate&amp;rdquo; project.&lt;/li&gt;
&lt;li&gt;Click OK&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Save and close the VSIX manifest editor&lt;/li&gt;
&lt;li&gt;Right click the &amp;ldquo;MyTemplateSetup&amp;rdquo; project and select &amp;ldquo;Set as StartUp Project&amp;rdquo; to debug your template in the Visual Studio Experimental instance.&lt;/li&gt;
&lt;li&gt;Press F5 to start debugging (or CTRL + F5 to launch without the debugger).&lt;/li&gt;
&lt;li&gt;Show the New Project dialog in the Visual Studio and see your template listed under &amp;ldquo;Visual C# \ Windows" (if you added the OutputSubPath from step 2).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;There are a few other interesting points about the support in the SDK for building templates:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a mce_href="http://msdn.microsoft.com/en-us/library/ms185308.aspx" href="http://msdn.microsoft.com/en-us/library/ms185308.aspx"&gt;Multi-project templates&lt;/a&gt; are supported&lt;/li&gt;
&lt;li&gt;If you are building a collection of templates, you can include them all in one VSIX file by repeating the steps above (skipping step 3).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;While not as simple as the &amp;ldquo;Export Template as VSIX&amp;rdquo; wizard, this technique allows you to build templates and deliver them using the VSIX format while still keeping control over the template source files.&lt;/p&gt;
&lt;p&gt;&lt;a mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CreatingProjectItemTemplateswiththeVisua_A4C1/aaronm3_2.jpg" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CreatingProjectItemTemplateswiththeVisua_A4C1/aaronm3_2.jpg"&gt;&lt;img style="margin: 0px 10px 0px 0px; display: inline; border-width: 0px;" title="aaronm3" border="0" alt="aaronm3" align="left" width="109" height="109" mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CreatingProjectItemTemplateswiththeVisua_A4C1/aaronm3_thumb.jpg" src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/CreatingProjectItemTemplateswiththeVisua_A4C1/aaronm3_thumb.jpg" /&gt;&lt;/a&gt;&lt;b&gt;Aaron Marten -&lt;/b&gt; Developer, Visual Studio Platform&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Short Bio&lt;/b&gt;: Aaron has been on the Visual Studio team for 6 years with a focus on extensibility. For Visual Studio 2010, Aaron worked on the Extension Manager and the Visual Studio SDK. In addition to contributing to the Visual Studio blog, he also writes about extending the IDE on his own blog at &lt;a mce_href="http://blogs.msdn.com/aaronmar" href="http://blogs.msdn.com/aaronmar"&gt;http://blogs.msdn.com/aaronmar&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9971920" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VS2010/">VS2010</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/">extensibility</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VSIX/">VSIX</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VS+Gallery/">VS Gallery</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/walkthrough/">walkthrough</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/Aaron+Marten/">Aaron Marten</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/Templates/">Templates</category></item><item><title>Troubleshooting Extensions with the Activity Log</title><link>http://blogs.msdn.com/b/visualstudio/archive/2010/02/24/troubleshooting-with-the-activity-log.aspx</link><pubDate>Wed, 24 Feb 2010 10:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9963808</guid><dc:creator>Visual Studio Blog</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/rsscomments.aspx?WeblogPostID=9963808</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/commentapi.aspx?WeblogPostID=9963808</wfw:comment><comments>http://blogs.msdn.com/b/visualstudio/archive/2010/02/24/troubleshooting-with-the-activity-log.aspx#comments</comments><description>&lt;P&gt;One of the most powerful tools for troubleshooting issues that involve Visual Studio extensions is often overlooked, even though it has been around for quite some time (since &lt;A href="http://msdn.microsoft.com/en-us/library/ms241272(VS.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms241272(VS.80).aspx"&gt;VS 2005&lt;/A&gt;). Anyone wondering what Visual Studio is doing with their VS Package, Extension, MEF Component, or pkgdef file should ask the IDE for an &lt;STRONG&gt;activity log&lt;/STRONG&gt;.&amp;nbsp;In this article, I will show you not only how to generate an activity log file for Visual Studio, but also highlight some of the things you can find in it.&lt;/P&gt;
&lt;P&gt;It’s important to note that this applies not only to the Visual Studio 2010 IDE, but also to applications built using the Visual Studio 2010 Shell (Isolated) (or Integrated). All of the examples will assume the case of Visual Studio running under 32-bit Windows 7. For other cases, substitute the appropriate file locations and names and registry root key. &lt;/P&gt;
&lt;H3&gt;Creating the Activity Log&lt;/H3&gt;
&lt;P&gt;This is as easy as it sounds. Here is the &lt;A href="http://msdn.microsoft.com/en-us/library/ms241272(VS.100).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms241272(VS.100).aspx"&gt;magic incantation required to generate a visual studio activity log&lt;/A&gt; file:&lt;/P&gt;
&lt;P&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=LogCommand border=0 alt=LogCommand src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/DebuggingwiththeActivityLog_9256/LogCommand8.png" width=601 height=99 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/DebuggingwiththeActivityLog_9256/LogCommand8.png"&gt; &lt;/P&gt;
&lt;P&gt;In this case, I’ve started a command prompt and navigated to the folder where the Visual Studio executable is installed before typing “&lt;STRONG&gt;devenv /log&lt;/STRONG&gt;”. &lt;/P&gt;
&lt;P&gt;The same command could also be given:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;from the &lt;STRONG&gt;Visual Studio Command Prompt (2010)&lt;/STRONG&gt; &lt;/LI&gt;
&lt;LI&gt;using the full path to the executable ("&lt;STRONG&gt;C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe&lt;/STRONG&gt;") from either a command prompt under &lt;STRONG&gt;Start - Accessories&lt;/STRONG&gt; or in the &lt;STRONG&gt;Start – Run&lt;/STRONG&gt; dialog &lt;/LI&gt;
&lt;LI&gt;on Windows 7, just by hitting the &lt;STRONG&gt;Windows&lt;/STRONG&gt; key and typing “&lt;STRONG&gt;devenv /log&lt;/STRONG&gt;” in the search box.&lt;/LI&gt;&lt;/UL&gt;
&lt;H3&gt;Finding the Activity Log&lt;/H3&gt;
&lt;P&gt;If “/log” is specified without adding an output path, the file is written to &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;%APPDATA%\Microsoft\VisualStudio\10.0\ActivityLog.xml&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;%APPDATA% resolves to “&lt;STRONG&gt;C:\Users\&lt;/STRONG&gt;&lt;EM&gt;user&lt;/EM&gt;&lt;STRONG&gt;\AppData\Roaming&lt;/STRONG&gt;”&lt;/P&gt;
&lt;P&gt;In previous releases of Visual Studio, there was a required parameter to /log that specified the full path for the output file. In VS 2010, this path is optional. You might find it useful to direct the log file to an easier to find location, such as the desktop:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;devenv /log c:\users\user\desktop\activitylog.xml&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;H3&gt;Reading the Activity Log&lt;/H3&gt;
&lt;P&gt;Once you have reached the point in Visual Studio that you are trying to troubleshoot, it’s a good idea to close Visual Studio. Otherwise, it will continue to write to the log while you are trying to read it. &lt;/P&gt;
&lt;P&gt;Notice that the log file is generated as XML. When Visual Studio starts writing the log, it also writes a corresponding XSL file next to the XML file that makes it easy to read in Internet Explorer. Go ahead and browse to the file’s location and double-click on it.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/DebuggingwiththeActivityLog_9256/LogSample_2.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/DebuggingwiththeActivityLog_9256/LogSample_2.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=LogSample border=0 alt=LogSample src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/DebuggingwiththeActivityLog_9256/LogSample_thumb.png" width=644 height=288 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/DebuggingwiththeActivityLog_9256/LogSample_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;At the top of the file is a summary of how many lines of “infos” (sic), “warnings”, and “errors” are listed. Below that are the actual log items, which have up to 7 columns of information.&lt;/P&gt;
&lt;TABLE border=1 cellSpacing=0 cellPadding=2 width=602&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=77&gt;&lt;EM&gt;column&lt;/EM&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=523&gt;&lt;EM&gt;description&lt;/EM&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=77&gt;&lt;STRONG&gt;#&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=523&gt;sequential item number&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=77&gt;&lt;STRONG&gt;Type&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=523&gt;blank for information, “Warning” (highlighted in yellow), or “Error” (highlighted in red)&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=77&gt;&lt;STRONG&gt;Description&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=523&gt;the activity, which may optionally include a registry or file path&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=77&gt;&lt;STRONG&gt;GUID&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=523&gt;associated GUID, typically for a VS Package&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=77&gt;&lt;STRONG&gt;Hr&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=523&gt;HRESULT value that may be useful for troubleshooting&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=77&gt;&lt;STRONG&gt;Source&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=523&gt;module writing the log item&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=77&gt;&lt;STRONG&gt;Time (UTC)&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=523&gt;timestamp for the item in UTC (not local) time&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;H3&gt;Activity Log Items&lt;/H3&gt;
&lt;P&gt;The activity log is full of more information than can adequately be addressed in any detail by a single blog post. However, several activities are worth noting:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Version of Visual Studio and .NET Framework &lt;/LI&gt;
&lt;LI&gt;Configuration and state information about the pkgdef cache &lt;/LI&gt;
&lt;LI&gt;If the pkgdef cache is found to be out-of-date, each discovered pkgdef file is listed, as it is parsed and loaded &lt;/LI&gt;
&lt;LI&gt;Each VS Package that is loaded, including success and failure &lt;/LI&gt;
&lt;LI&gt;Each VS Extensions loaded through the Extension Manager and whether it is enabled &lt;/LI&gt;
&lt;LI&gt;Each MEF Component loaded and whether it came from the cache &lt;/LI&gt;
&lt;LI&gt;Each category exported by the Profile manager &lt;/LI&gt;&lt;/UL&gt;
&lt;H3&gt;Summary&lt;/H3&gt;
&lt;P&gt;Those are the basics for creating, finding, and reading the Visual Studio Activity Log. Hopefully, this will give you a powerful tool for troubleshooting issues with VS Packages, VS Extensions, MEF Components, and pkgdef files. Try running Visual Studio with /log and see what useful insights you gain into what Visual Studio is doing.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; MARGIN: 0px 10px 0px 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=BillWeinberger border=0 alt=BillWeinberger align=left src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/DebuggingwiththeActivityLog_9256/BillWeinberger_3.jpg" width=112 height=112 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/DebuggingwiththeActivityLog_9256/BillWeinberger_3.jpg"&gt;Bill Weinberger&lt;/STRONG&gt;: Developer, Visual Studio Platform&lt;/P&gt;
&lt;P&gt;Bill is a relative newcomer to Microsoft, but has many years of software industry experience working on IDEs and vertical applications. For Visual Studio 2010, he was a key contributor to PkgDef Management.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9963808" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VS2010/">VS2010</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/">extensibility</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/tips_2600_amp_3B00_tricks/">tips&amp;amp;tricks</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/Bill+Weinberger/">Bill Weinberger</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/pkgdef/">pkgdef</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/MEF/">MEF</category></item><item><title>MSBuild Task Factories: guest starring Windows Powershell</title><link>http://blogs.msdn.com/b/visualstudio/archive/2010/02/20/msbuild-task-factories-guest-starring-windows-powershell.aspx</link><pubDate>Sat, 20 Feb 2010 08:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9966589</guid><dc:creator>Andrew L Arnott</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/rsscomments.aspx?WeblogPostID=9966589</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/commentapi.aspx?WeblogPostID=9966589</wfw:comment><comments>http://blogs.msdn.com/b/visualstudio/archive/2010/02/20/msbuild-task-factories-guest-starring-windows-powershell.aspx#comments</comments><description>&lt;p&gt;One of the cool new features of MSBuild 4.0 is the extensible task factory.&amp;#160; Task factories allow you to include scripts directly in your project file (or an imported .targets file) and have those scripts parsed and executed by your favorite interpreter.&amp;#160; Those scripts might even be C# or VB.NET code snippets that get compiled into assemblies and executed on-the-fly during the build.&amp;#160; This significantly lowers the bar to doing specialized work in your build for which there is no built-in MSBuild Task, since you don’t have to check into your source control repository a precompiled .dll with your custom task any more.&amp;#160; You may still want to do that for performance reasons or for the design-time experience of writing MSBuild tasks in C# and get all the C# Intellisense that you only get in a C# project, but for short tasks, “inline tasks” that are built and executed on-the-fly may be just the ticket you need.&lt;/p&gt;  &lt;p&gt;MSBuild 4.0 ships with C#, VB.NET and XAML task factories built-in, so you can define a custom task in C# or VB.NET inline today.&amp;#160; But writing your own task factory will allow you to write inline tasks in Perl, Python, or in this case… Windows Powershell script.&lt;/p&gt;  &lt;p&gt;Consider, for the sake of example, that there is no MSBuild task that sends an email at the conclusion of a build.&amp;#160; Fixing that with a custom MSBuild task, compiled into a .dll, seems a bit heavyweight.&amp;#160; But defining that task right there in your project file is easy.&amp;#160; Here’s how you might write a Powershell inline task using the Windows Powershell task factory.&amp;#160; Notice below how we first define the task in terms of the code it executes and its input and output parameters.&amp;#160; Then in a standard MSBuild Target we invoke that inline task as we would any other MSBuild task.&amp;#160; &lt;/p&gt;  &lt;pre&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;
&amp;lt;Project ToolsVersion=&amp;quot;4.0&amp;quot; DefaultTargets=&amp;quot;Build&amp;quot; xmlns=&amp;quot;http://schemas.microsoft.com/developer/msbuild/2003&amp;quot;&amp;gt;
  &amp;lt;UsingTask
    TaskFactory=&amp;quot;WindowsPowershellTaskFactory&amp;quot;
    TaskName=&amp;quot;SendMail&amp;quot;
    AssemblyFile=&amp;quot;$(TaskFactoryPath)WindowsPowershellTaskFactory.dll&amp;quot;&amp;gt;
    &amp;lt;ParameterGroup&amp;gt;
      &amp;lt;From Required=&amp;quot;true&amp;quot; ParameterType=&amp;quot;System.String&amp;quot; /&amp;gt;
      &amp;lt;Recipients Required=&amp;quot;true&amp;quot; ParameterType=&amp;quot;System.String&amp;quot; /&amp;gt;
      &amp;lt;Subject Required=&amp;quot;true&amp;quot; ParameterType=&amp;quot;System.String&amp;quot; /&amp;gt;
      &amp;lt;Body Required=&amp;quot;true&amp;quot; ParameterType=&amp;quot;System.String&amp;quot; /&amp;gt;
      &amp;lt;RecipientCount Output=&amp;quot;true&amp;quot; /&amp;gt;
    &amp;lt;/ParameterGroup&amp;gt;
    &amp;lt;Task&amp;gt;
      &amp;lt;![CDATA[
        $smtp = New-Object System.Net.Mail.SmtpClient
        $smtp.Host = &amp;quot;mail.microsoft.com&amp;quot;
        $smtp.Credentials = [System.Net.CredentialCache]::DefaultCredentials&lt;credentials here&gt;
        $smtp.Send($From, $Recipients, $Subject, $Body)
        $RecipientCount = $Recipients.Split(';').Length
        $log.LogMessage([Microsoft.Build.Framework.MessageImportance]&amp;quot;High&amp;quot;, &amp;quot;Send mail to {0} recipients.&amp;quot;, $recipientCount)
      ]]&amp;gt;
    &amp;lt;/Task&amp;gt;
  &amp;lt;/UsingTask&amp;gt;

  &amp;lt;PropertyGroup&amp;gt;
    &amp;lt;BuildLabEmail&amp;gt;buildlab@yourcompany.com&amp;lt;/BuildLabEmail&amp;gt;
    &amp;lt;BuildRecipients&amp;gt;interested@party.com;boss@guy.com&amp;lt;/BuildRecipients&amp;gt;
  &amp;lt;/PropertyGroup&amp;gt;
  
  &amp;lt;Target Name=&amp;quot;Build&amp;quot;&amp;gt;
    &amp;lt;SendMail From=&amp;quot;$(BuildLabEmail)&amp;quot; Recipients=&amp;quot;$(BuildRecipients)&amp;quot; Subject=&amp;quot;Build status&amp;quot; Body=&amp;quot;Build completed&amp;quot;&amp;gt;
      &amp;lt;Output TaskParameter=&amp;quot;RecipientCount&amp;quot; PropertyName=&amp;quot;RecipientCount&amp;quot; /&amp;gt;
    &amp;lt;/Add&amp;gt;
  &amp;lt;/Target&amp;gt;
&amp;lt;/Project&amp;gt;&lt;/pre&gt;

&lt;p&gt;This project would build, and send a built completion email to recipients determined by the project itself.&amp;#160; The only assembly you need is the Windows Powershell task factory itself, which can be reused for all your projects that include inline Windows Powershell scripts.&lt;/p&gt;

&lt;p&gt;Note that the inline task above will not run without the task factory .dll that it points to, which in this case is &lt;em&gt;not&lt;/em&gt; shipped with VS2010.&amp;#160; The &lt;a href="http://code.msdn.microsoft.com/PowershellFactory"&gt;Windows Powershell task factory is available&lt;/a&gt; as a sample task factory on the MSDN Code Gallery.&amp;#160; Feel free to check it out, and give feedback.&amp;#160; It’s just a sample, so all the “no guarantees for fitness to any particular task” limitations apply.&amp;#160; But you get the source code, so you can tweak it or file bugs if you wish.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9966589" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/">extensibility</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/MSBuild/">MSBuild</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/andrew+arnott/">andrew arnott</category></item><item><title>How VSIX extensions are discovered and loaded in VS 2010</title><link>http://blogs.msdn.com/b/visualstudio/archive/2010/02/19/how-vsix-extensions-are-discovered-and-loaded-in-vs-2010.aspx</link><pubDate>Fri, 19 Feb 2010 10:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9956690</guid><dc:creator>Visual Studio Blog</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/rsscomments.aspx?WeblogPostID=9956690</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/commentapi.aspx?WeblogPostID=9956690</wfw:comment><comments>http://blogs.msdn.com/b/visualstudio/archive/2010/02/19/how-vsix-extensions-are-discovered-and-loaded-in-vs-2010.aspx#comments</comments><description>&lt;P&gt;&lt;A href="http://blogs.msdn.com/quanto/archive/2009/05/26/what-is-a-vsix.aspx" mce_href="http://blogs.msdn.com/quanto/archive/2009/05/26/what-is-a-vsix.aspx"&gt;VSIX&lt;/A&gt; is the new technology used for deploying extensions in Visual Studio 2010. The primary goal of this new technology is to encourage extension creation and consumption by easing the management (“management” meaning Browsing/Installing/Uninstalling/Enabling/Disabling) of Visual Studio extensions. To take full advantage of the VSIX installer for deploying your extensions, it helps to know a little bit more about how Visual Studio decides which extensions to load.&lt;/P&gt;
&lt;P&gt;Dmitry Goncharenko provided a good high-level overview of how these VSIX extensions are discovered and loaded in his post &lt;A href="http://blogs.msdn.com/visualstudio/archive/2009/12/07/Bootstrapping-of-VS-packages-and-VSIX-extensions-in-VS2010.aspx" mce_href="http://blogs.msdn.com/visualstudio/archive/2009/12/07/Bootstrapping-of-VS-packages-and-VSIX-extensions-in-VS2010.aspx"&gt;Bootstrapping of VS packages and VSIX extensions in VS2010&lt;/A&gt;. Let’s now take a more in-depth look at how this process works.&lt;/P&gt;
&lt;P&gt;An extension consists of:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;an extension.vsixmanifest file, which contains metadata about the extension &lt;/LI&gt;
&lt;LI&gt;any additional files that represent the extension content. This could include MEF assemblies, VS Package assemblies, VS Template ZIP files, PkgDef files, etc.. &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;The simplest vsix extension would contain only the extension.vsixmanifest file, though that would admittedly be a very uninteresting extension.&lt;/P&gt;
&lt;H3&gt;Extension Discovery&lt;/H3&gt;
&lt;P&gt;In accordance with the goal of simplicity, a VSIX extension install consists of only copying the extension files into one of a few well-known locations. These locations are defined in the “Master PkgDef” file, located at &amp;lt;VsInstallRootFolder&amp;gt;\Common7\IDE\devenv.pkgdef and pictured below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;A href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/HowVSIXextensionsarediscoveredandloadedi_D347/MasterPkgDef_4.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/HowVSIXextensionsarediscoveredandloadedi_D347/MasterPkgDef_4.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=MasterPkgDef border=0 alt=MasterPkgDef src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/HowVSIXextensionsarediscoveredandloadedi_D347/MasterPkgDef_thumb_1.png" width=969 height=121 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/HowVSIXextensionsarediscoveredandloadedi_D347/MasterPkgDef_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;The relevant values are described below.&lt;/P&gt;
&lt;TABLE border=1 cellSpacing=0 cellPadding=0 width=830&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=184&gt;
&lt;P&gt;&lt;B&gt;Variable&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=644&gt;
&lt;P&gt;&lt;B&gt;Description&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=184&gt;
&lt;P&gt;ApplicationExtensionsFolder&lt;/P&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=644&gt;
&lt;P&gt;The root folder under which machine wide VSIXs are deployed.&lt;/P&gt;
&lt;P&gt;(This is set as &amp;lt;VsInstallRootFolder&amp;gt;\Common7\IDE\Extensions)&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=184&gt;
&lt;P&gt;UserExtensionsRootFolder&lt;/P&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=644&gt;
&lt;P&gt;The root folder under which user specific VSIXs are deployed.&lt;/P&gt;
&lt;P&gt;(This is set as %LocalAppData%\Microsoft\VisualStudio\10.0\Extensions)&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=184&gt;
&lt;P&gt;PkgDefSearchPath&lt;/P&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=644&gt;
&lt;P&gt;A list of additional folders where extensions will be searched for. The name for this property was originally defined by the PkgDef subsystem. This list is shared with vsix extensions so that any extensions that contain .pkgdef files will be properly loaded. Note that this includes ApplicationExtensionsFolder.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Upon initialization, the Extension Manager service, &lt;A href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.extensionmanager.svsextensionmanager(VS.100).aspx" mce_href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.extensionmanager.svsextensionmanager(VS.100).aspx"&gt;SVsExtensionManager&lt;/A&gt;, will search the above locations for extension.vsixmanifest files. The PkgDefSearchPath folders are searched first, followed by the UserExtensionsRootFolder.&lt;/P&gt;
&lt;H3&gt;Extension Loading Rules&lt;/H3&gt;
&lt;P&gt;At this point, each extension must pass a few trials before being considered installed by the Extension Manager. Before diving into the details, here’s a quick summary of these:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The extension.vsixmanifest XML conforms to the XSD. &lt;/LI&gt;
&lt;LI&gt;The extension has not been marked for deletion. &lt;/LI&gt;
&lt;LI&gt;The extension’s identifier cannot conflict with any other previously discovered extensions. &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;First, if the extension.vsixmanifest XML does not conform to the VSIX manifest XSD schema, it is ignored. If the manifest XML passes schema validation, then it will be deserialized into an object model in memory. Second, the Extension Manager needs to verify that the extension is not marked for deletion. Before going any further, it would be helpful to discuss what exactly this means.&lt;/P&gt;
&lt;P&gt;If you’ve uninstalled an extension through the Extension Manager dialog in Visual Studio, you may have noticed that the uninstall occurs extremely fast. This is because the extension is only marked for deletion at that time. On a subsequent initialization of the Extension Manager (the next time Visual Studio or the VSIX Installer are launched), all of the pending deletions are cleaned up on a background thread *&lt;EM&gt;after&lt;/EM&gt;* all installed extensions have been discovered. Therefore, any extension that is marked for deletion should be discarded and no longer considered installed.&lt;/P&gt;
&lt;P&gt;Third, if the extension contains the same ID as another extension that has already been discovered, it will be discarded. This is where the search order becomes important. The UserExtensionsRootFolder is searched last in order to give precedence to machine wide extensions when an ID conflict is encountered.&lt;/P&gt;
&lt;P&gt;Once an extension has passed these checks, it is considered “installed” by the Extension Manager service. Figuring out whether an extension is not installed because of one of the above reasons is easy since the Extension Manager logs this information to the Visual Studio activity log. The activity log can be enabled by running the Visual Studio process (&amp;lt;VsInstallRootFolder&amp;gt;\Common7\IDE\devenv.exe) with the ‘/log’ switch, as follows:&lt;/P&gt;
&lt;P&gt;devenv.exe /log &amp;lt;path_to_log_file&amp;gt;&lt;/P&gt;
&lt;H3&gt;The Mechanics of Enabled/Disabled Extensions&lt;/H3&gt;
&lt;P&gt;So your extension is successfully “installed”, but how does the Extension Manager determine whether it’s “Enabled”? The answer depends upon where your extension is installed. Extensions installed to any directory in the PkgDefSearchPath list of folders are always enabled. Extensions installed to the UserExtensionsRootFolder path must be individually enabled through a list maintained in the HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\ExtensionManager\EnabledExtensions registry key. The &lt;A href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.extensionmanager.ivsextensionmanager.install(VS.100).aspx" mce_href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.extensionmanager.ivsextensionmanager.install(VS.100).aspx"&gt;Extension Manager Install API&lt;/A&gt;, used by the extension install dialog as well as the VSIX installer, will write the entry in the EnabledExtensions key for any newly installed extension so that extensions installed in this manner are automatically enabled. You’ll notice that if you manually install an extension by copying the extension files to a subfolder in the UserExtensionsRootFolder path, it will be disabled at first because the corresponding entry in EnabledExtensions has not been added. Enabling the extension can also be accomplished through the Extension Manager dialog.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/HowVSIXextensionsarediscoveredandloadedi_D347/Enable_2.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/HowVSIXextensionsarediscoveredandloadedi_D347/Enable_2.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=Enable border=0 alt=Enable src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/HowVSIXextensionsarediscoveredandloadedi_D347/Enable_thumb.png" width=784 height=319 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/HowVSIXextensionsarediscoveredandloadedi_D347/Enable_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Lastly, extensions in the UserExtensionsRootFolder path will all be disabled when running Visual Studio as an administrator, if the following option is not checked under Tools-&amp;gt;Options-&amp;gt;Environment-&amp;gt;Extension Manager&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/HowVSIXextensionsarediscoveredandloadedi_D347/Options_2.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/HowVSIXextensionsarediscoveredandloadedi_D347/Options_2.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=Options border=0 alt=Options src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/HowVSIXextensionsarediscoveredandloadedi_D347/Options_thumb.png" width=802 height=176 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/HowVSIXextensionsarediscoveredandloadedi_D347/Options_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;This option was likely the most common culprit for why users (particularly administrators running WindowsXP) found that their extensions were not enabled in Beta2 and prior builds of Visual Studio, since the default value for the option was ‘False’. Due to the frequency with which customers ran into this problem, we’ve changed the default value for this option to ‘True’. Note that the Extension Manager dialog provides a warning if you’re running Visual Studio elevated, but do not have this option checked.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/HowVSIXextensionsarediscoveredandloadedi_D347/AdminMessage_2.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/HowVSIXextensionsarediscoveredandloadedi_D347/AdminMessage_2.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=AdminMessage border=0 alt=AdminMessage src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/HowVSIXextensionsarediscoveredandloadedi_D347/AdminMessage_thumb.png" width=889 height=615 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/HowVSIXextensionsarediscoveredandloadedi_D347/AdminMessage_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When in doubt about why an extension does not seem to be loaded or enabled, you should consult the Visual Studio activity log, which will output various diagnostics during the loading process. You may also want to check out the following posts related to extension loading:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/visualstudio/archive/2009/12/18/what-s-a-pkgdef-and-why.aspx" mce_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;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/visualstudio/archive/2009/12/07/Bootstrapping-of-VS-packages-and-VSIX-extensions-in-VS2010.aspx" mce_href="http://blogs.msdn.com/visualstudio/archive/2009/12/07/Bootstrapping-of-VS-packages-and-VSIX-extensions-in-VS2010.aspx"&gt;Bootstrapping of VS packages and VSIX extensions in VS2010&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&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; &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/HowVSIXextensionsarediscoveredandloadedi_D347/MarianoB_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/HowVSIXextensionsarediscoveredandloadedi_D347/MarianoB_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; MARGIN: 0px 5px 0px 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=MarianoB border=0 alt=MarianoB align=left src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/HowVSIXextensionsarediscoveredandloadedi_D347/MarianoB_thumb.jpg" width=74 height=97 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/HowVSIXextensionsarediscoveredandloadedi_D347/MarianoB_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Mariano Blanco&lt;/STRONG&gt;: Developer, Visual Studio Platform&lt;/P&gt;
&lt;P&gt;Mariano started in the Visual Studio Ecosystem team at Microsoft in 2007. He now works on the Visual Studio Platform Extensibility team and is responsible for the Extension Manager API and the VSIX installer tool shipping in Visual Studio 2010.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9956690" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VS2010/">VS2010</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/">extensibility</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/Mariano+Blanco/">Mariano Blanco</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VSIX/">VSIX</category></item><item><title>CodeBlog: Writing a Blogging Extension for Visual Studio 2010</title><link>http://blogs.msdn.com/b/visualstudio/archive/2010/02/15/codeblog-writing-a-blogging-extension-for-visual-studio-2010.aspx</link><pubDate>Mon, 15 Feb 2010 22:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9963885</guid><dc:creator>Visual Studio Blog</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/rsscomments.aspx?WeblogPostID=9963885</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/commentapi.aspx?WeblogPostID=9963885</wfw:comment><comments>http://blogs.msdn.com/b/visualstudio/archive/2010/02/15/codeblog-writing-a-blogging-extension-for-visual-studio-2010.aspx#comments</comments><description>&lt;P&gt;Have you ever wanted to quickly share a code sample to Twitter or your blog without leaving Visual Studio?&amp;nbsp; Steve Apiki walks through how to create an extension for Visual Studio 2010 that does just that.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Walkthrough:&lt;/STRONG&gt; &lt;A href="http://www.devx.com/VS_2010/Article/44073" mce_href="http://www.devx.com/VS_2010/Article/44073"&gt;http://www.devx.com/VS_2010/Article/44073&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;His walkthrough touches on a number of extensibility options inside Visual Studio 2010 such as:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;How to add a command to a context menu&lt;/LI&gt;
&lt;LI&gt;How to create text adornments with the new VS 2010 Editor&lt;/LI&gt;
&lt;LI&gt;How to create a Tool Window and add WPF content to it&lt;/LI&gt;
&lt;LI&gt;Managed Extensibility Framework (MEF) basics&lt;/LI&gt;
&lt;LI&gt;Using &lt;A href="http://www.devx.com/VS_2010/Link/44076" mce_href="http://www.devx.com/VS_2010/Link/44076"&gt;XML-RPC.NET&lt;/A&gt; to post to Twitter&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Enjoy!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9963885" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/">extensibility</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/Weston+Hutchins/">Weston Hutchins</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/walkthrough/">walkthrough</category></item><item><title>Announcement: Unpublishing Extensions from Beta 2 to RC</title><link>http://blogs.msdn.com/b/visualstudio/archive/2010/02/04/announcement-unpublishing-extensions-from-beta-2-to-rc.aspx</link><pubDate>Thu, 04 Feb 2010 00:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9957899</guid><dc:creator>Visual Studio Blog</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/rsscomments.aspx?WeblogPostID=9957899</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/commentapi.aspx?WeblogPostID=9957899</wfw:comment><comments>http://blogs.msdn.com/b/visualstudio/archive/2010/02/04/announcement-unpublishing-extensions-from-beta-2-to-rc.aspx#comments</comments><description>&lt;P&gt;&lt;STRONG&gt;UPDATE 2/8&lt;/STRONG&gt;: I forgot to mention a change to the VSIX file format in the Release Candidate that might impact your extensions.&amp;nbsp;&amp;nbsp;The&amp;nbsp;valid &amp;lt;Edition&amp;gt;&amp;nbsp;values (under &amp;lt;SupportedProducts&amp;gt;) have been updated to better reflect our SKU branding.&amp;nbsp; The only valid values for RC and RTM are: IntegratedShell, Pro, Premium, Ultimate, Express_All, VBExpress, VCSExpress, VWDExpress, VCExpress.&amp;nbsp; We have removed VST_All, Pro_All, VSTT, VSTD, and VSTDB from the list of supported values.&amp;nbsp; If your extension lists any of the removed values, you will need to update your VSIX manifest and reupload your extension.&amp;nbsp; If this is not done, your extension will not show up in the Extension Manager or the New Project Dialog since SKU-filtering is applied.&amp;nbsp; Also note, that you only need to include the lowest common denominator supported SKU.&amp;nbsp; For example, if your extension works in Pro, you only need to list "Pro" under the &amp;lt;Edition&amp;gt; element, as Premium and Ultimate are supersets of Pro and will pick up Pro-supported extensions.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When the public Release Candidate (RC) is released later this month, we will be unpublishing all Visual Studio 2010 Beta 2 extensions that are hosted on the &lt;A href="http://www.visualstudiogallery.com/"&gt;http://www.visualstudiogallery.com&lt;/A&gt;. We do this because we want to ensure that all extensions are tested and work on the latest release (RC) so that users aren’t treated to numerous errors either when installing or using the extension. This same process was used to convert Beta 1 to Beta 2 extensions. The extension author will have the responsibility of testing and republishing the extension.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;U&gt;FAQ&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Q:&lt;/B&gt; Will my VS 2008 or VS 2005 extensions be unpublished? &lt;BR&gt;&lt;B&gt;A:&lt;/B&gt; No, this will only affect VS 2010 extensions.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Q:&lt;/B&gt; Will I need to rebuild my extension and then reupload? &lt;BR&gt;&lt;B&gt;A:&lt;/B&gt; Possibly. There have been a few breaking changes in the extensibility APIs from Beta 2 -&amp;gt; RC, so you’ll need to verify that your extension still behaves correctly. If bugs are found, this will require a rebuild. If everything works as expected, a rebuild is not necessary.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Q:&lt;/B&gt; How do I republish my extension? &lt;BR&gt;&lt;B&gt;A:&lt;/B&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Navigate to &lt;A href="http://www.visualstudiogallery.com/"&gt;http://www.visualstudiogallery.com&lt;/A&gt; and sign in&lt;/LI&gt;
&lt;LI&gt;Click on “My Contributions” on the top navigation bar&lt;/LI&gt;
&lt;LI&gt;You’ll see the text “(Unpublished)” next to the title of any contributions that have been unpublished&lt;/LI&gt;
&lt;LI&gt;Simply click on the extension and select “Publish”&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;B&gt;Q:&lt;/B&gt; Will I have to do this for every major VS release? &lt;BR&gt;&lt;B&gt;A:&lt;/B&gt; This will need to be done once more when VS 2010 RTM is released. We’re still examining how best to manage this from release to release (both for Service Packs and next versions). If this process is necessary to repeat, we will look to provide a tool or an automated way to move extensions over. &lt;BR&gt;&lt;BR&gt;&lt;B&gt;Q:&lt;/B&gt; Will my extension work in Beta 2? &lt;BR&gt;&lt;B&gt;A:&lt;/B&gt; After two weeks, we will be disabling online extension manager access for VS 2010 Beta 2. This is because extensions that have been ported to RC may not work on Beta 2 anymore.&lt;/P&gt;
&lt;P&gt;Please let comments if you have any additional questions about this process.&lt;/P&gt;
&lt;TABLE border=0 cellSpacing=0 cellPadding=2&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top&gt;
&lt;TD ="&amp;#13;&amp;#10;&lt;TD"&gt;&lt;A href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/HowtoFixTheapplicationcannotstartError_15094/wespic_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/HowtoFixTheapplicationcannotstartError_15094/wespic_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN-LEFT: 3px; BORDER-LEFT-WIDTH: 0px; MARGIN-RIGHT: 3px" title=wespic border=0 alt=wespic align=left src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/HowtoFixTheapplicationcannotstartError_15094/wespic_thumb.jpg" width=86 height=70 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/HowtoFixTheapplicationcannotstartError_15094/wespic_thumb.jpg"&gt;&lt;/A&gt;&lt;/TD&gt;
&lt;TD vAlign=top&gt;&lt;STRONG&gt;Weston Hutchins&lt;/STRONG&gt; – Program Manager, Visual Studio Shell Team &lt;BR&gt;&lt;STRONG&gt;Short Bio&lt;/STRONG&gt;: I started at Microsoft as an intern in 2005 and have been working in Visual Studio ever since.&amp;nbsp; I’m currently a PM on the VS Shell IDE team and&amp;nbsp;work on the core IDE UI and services as well as the Extension Manager and&amp;nbsp;&lt;A href="http://www.visualstudiogallery.com/" mce_href="http://visualstudiogallery.com"&gt;http://www.visualstudiogallery.com&lt;/A&gt;&amp;nbsp;integration.&amp;nbsp;Prior&amp;nbsp;to my current duties, I was the SKU manager for the Visual Studio Express products.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9957899" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/announcement/">announcement</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/">extensibility</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/Weston+Hutchins/">Weston Hutchins</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VS+Gallery/">VS Gallery</category></item><item><title>How to read/write the new Visual C++ project properties</title><link>http://blogs.msdn.com/b/visualstudio/archive/2010/01/15/how-to-read-write-the-new-visual-c-project-properties.aspx</link><pubDate>Fri, 15 Jan 2010 05:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9948078</guid><dc:creator>Andrew L Arnott</dc:creator><slash:comments>7</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/rsscomments.aspx?WeblogPostID=9948078</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/commentapi.aspx?WeblogPostID=9948078</wfw:comment><comments>http://blogs.msdn.com/b/visualstudio/archive/2010/01/15/how-to-read-write-the-new-visual-c-project-properties.aspx#comments</comments><description>&lt;p&gt;Visual C++ 2010 introduces several new project and tool properties, and deprecates some old ones.&amp;#160; If you’re writing a project template or Visual Studio extension that needs to programmatically read and write the new properties, you will find that these properties are not available on the standard VCConfiguration, VCCLCompilerTool, etc. set of interfaces.&amp;#160; These are COM interfaces and cannot be changed.&amp;#160; Rather than create new interfaces for the new properties, we’ve introduced a single new interface that will provide access to all project and tool properties: IVCRulePropertyStorage.&lt;/p&gt;  &lt;p&gt;Before we dive into IVCRulePropertyStorage, you should take a few minutes to learn about Visual C++ &amp;quot;Rule” XAML files, as Pavan describes in his post: &lt;a href="http://blogs.msdn.com/vsproject/archive/2009/06/10/platform-extensibility-part-1.aspx"&gt;Platform Extensibility – Part 1&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;One new property in Visual C++ 2010 is TargetExt, which specifies the filename extension of the primary output of a Visual C++ project.&amp;#160; This property isn’t available on VCConfiguration.&amp;#160; Let’s read and write it using IVCRulePropertyStorage assuming you’ve got a DTE object for the project.&amp;#160; While we’re in there, we’ll read and write a few other properties at the project and file level.&amp;#160; I’ve written this code as it might be seen in the IDE Macro Editor.&amp;#160; You can try copying and pasting this code into the Macro Editor yourself and running it while you have a new C++ console application open in the IDE.&lt;/p&gt; &lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;style type="text/css"&gt;





.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}

.csharpcode pre { margin: 0em; }

.csharpcode .rem { color: #008000; }

.csharpcode .kwrd { color: #0000ff; }

.csharpcode .str { color: #006080; }

.csharpcode .op { color: #0000c0; }

.csharpcode .preproc { color: #cc6633; }

.csharpcode .asp { background-color: #ffff00; }

.csharpcode .html { color: #800000; }

.csharpcode .attr { color: #ff0000; }

.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}

.csharpcode .lnum { color: #606060; }&lt;/style&gt;  &lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;Public&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt; RulePropertyAccess()
        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; vsPrj &lt;span class="kwrd"&gt;As&lt;/span&gt; VSProject = &lt;span class="kwrd"&gt;CType&lt;/span&gt;(DTE.Solution.Projects.Item(1).&lt;span class="kwrd"&gt;Object&lt;/span&gt;, VSProject)
        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; vcproj &lt;span class="kwrd"&gt;As&lt;/span&gt; VCProject = vsPrj.Project.&lt;span class="kwrd"&gt;Object&lt;/span&gt;
        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; vcconfigs &lt;span class="kwrd"&gt;As&lt;/span&gt; IVCCollection = vcproj.Configurations
        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; vcfiles &lt;span class="kwrd"&gt;As&lt;/span&gt; IVCCollection = vcproj.Files
        &lt;span class="kwrd"&gt;For&lt;/span&gt; &lt;span class="kwrd"&gt;Each&lt;/span&gt; vcconfig &lt;span class="kwrd"&gt;As&lt;/span&gt; VCConfiguration &lt;span class="kwrd"&gt;In&lt;/span&gt; vcconfigs
            &lt;span class="rem"&gt;' Start by accessing a configuration-level property: TargetExt&lt;/span&gt;
            &lt;span class="rem"&gt;' The &amp;quot;ConfigurationGeneral&amp;quot; string comes from the &lt;/span&gt;
            &lt;span class="rem"&gt;' %PROGRAMFILES%\msbuild\Microsoft.Cpp\v4.0\1033\general.xml&lt;/span&gt;
            &lt;span class="rem"&gt;' file's &amp;lt;Rule Name=&amp;quot;ConfigurationGeneral&amp;quot;&amp;gt; tag.&lt;/span&gt;
            &lt;span class="kwrd"&gt;Dim&lt;/span&gt; generalRule &lt;span class="kwrd"&gt;As&lt;/span&gt; IVCRulePropertyStorage = vcconfig.Rules.Item(&lt;span class="str"&gt;&amp;quot;ConfigurationGeneral&amp;quot;&lt;/span&gt;)
            &lt;span class="kwrd"&gt;Dim&lt;/span&gt; oldExtension &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt; = generalRule.GetEvaluatedPropertyValue(&lt;span class="str"&gt;&amp;quot;TargetExt&amp;quot;&lt;/span&gt;)
            generalRule.SetPropertyValue(&lt;span class="str"&gt;&amp;quot;TargetExt&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;.dll&amp;quot;&lt;/span&gt;)
            Debug.Print(&lt;span class="str"&gt;&amp;quot;TargetExt before: {0} and after {1}&amp;quot;&lt;/span&gt;, oldExtension, generalRule.GetEvaluatedPropertyValue(&lt;span class="str"&gt;&amp;quot;TargetExt&amp;quot;&lt;/span&gt;))

            &lt;span class="rem"&gt;' Now let's access a tool-specific property at the project level: WarnAsError&lt;/span&gt;
            &lt;span class="rem"&gt;' This property isn't new, so it's available both through VCLinkerTool and IVCRulePropertyStorage&lt;/span&gt;
            &lt;span class="rem"&gt;' Note however that its MSBuild property name does not match its name on the interface.&lt;/span&gt;
            &lt;span class="kwrd"&gt;Dim&lt;/span&gt; vctools &lt;span class="kwrd"&gt;As&lt;/span&gt; IVCCollection = vcconfig.Tools
            &lt;span class="kwrd"&gt;Dim&lt;/span&gt; cl &lt;span class="kwrd"&gt;As&lt;/span&gt; VCCLCompilerTool = vctools.Item(&lt;span class="str"&gt;&amp;quot;VCCLCompilerTool&amp;quot;&lt;/span&gt;)
            Debug.Print(&lt;span class="str"&gt;&amp;quot;VCCLCompilerTool::WarnAsError reports {0}&amp;quot;&lt;/span&gt;, cl.WarnAsError)
            &lt;span class="kwrd"&gt;Dim&lt;/span&gt; clRule &lt;span class="kwrd"&gt;As&lt;/span&gt; IVCRulePropertyStorage = cl &lt;span class="rem"&gt;' we only need to QI for this interface on the same object&lt;/span&gt;
            clRule.SetPropertyValue(&lt;span class="str"&gt;&amp;quot;TreatWarningAsError&amp;quot;&lt;/span&gt;, &lt;span class="kwrd"&gt;Not&lt;/span&gt; cl.WarnAsError) &lt;span class="rem"&gt;' invert the value&lt;/span&gt;
            Debug.Print(&lt;span class="str"&gt;&amp;quot;VCCLCompilerTool::WarnAsError now reports {0}&amp;quot;&lt;/span&gt;, cl.WarnAsError)

            &lt;span class="rem"&gt;' Now let's set a property for a very specific .cpp file.&lt;/span&gt;
            &lt;span class="kwrd"&gt;Dim&lt;/span&gt; stdafxFile &lt;span class="kwrd"&gt;As&lt;/span&gt; VCFile = vcfiles.Item(&lt;span class="str"&gt;&amp;quot;stdafx.cpp&amp;quot;&lt;/span&gt;)
            &lt;span class="kwrd"&gt;Dim&lt;/span&gt; stdafxFileConfigs &lt;span class="kwrd"&gt;As&lt;/span&gt; IVCCollection = stdafxFile.FileConfigurations
            &lt;span class="kwrd"&gt;Dim&lt;/span&gt; stdafxFileConfig &lt;span class="kwrd"&gt;As&lt;/span&gt; VCFileConfiguration = stdafxFileConfigs.Item(vcconfig.Name)
            &lt;span class="kwrd"&gt;Dim&lt;/span&gt; fileCL &lt;span class="kwrd"&gt;As&lt;/span&gt; VCCLCompilerTool = stdafxFileConfig.Tool
            Debug.Print(&lt;span class="str"&gt;&amp;quot;StdAfx.cpp VCCLCompilerTool::InlineFunctionExpansion reports {0}&amp;quot;&lt;/span&gt;, fileCL.InlineFunctionExpansion)
            &lt;span class="kwrd"&gt;Dim&lt;/span&gt; fileCLRule &lt;span class="kwrd"&gt;As&lt;/span&gt; IVCRulePropertyStorage = fileCL
            fileCLRule.SetPropertyValue(&lt;span class="str"&gt;&amp;quot;InlineFunctionExpansion&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;OnlyExplicitInline&amp;quot;&lt;/span&gt;)
            Debug.Print(&lt;span class="str"&gt;&amp;quot;StdAfx.cpp VCCLCompilerTool::InlineFunctionExpansion reports {0}&amp;quot;&lt;/span&gt;, fileCL.InlineFunctionExpansion)
        &lt;span class="kwrd"&gt;Next&lt;/span&gt;
    &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;So you see that IVCRulePropertyStorage provides very simple property read/write access.&amp;#160; And exactly where those properties are read from or written to depends on where you acquired the IVCRulePropertyStorage object.&amp;#160; As shown above, you can get this object from the VCConfiguration, a VC*Tool at the VCConfiguration level, or a VC*Tool at the VCFileConfiguration level.&amp;#160; Not shown above is that you can also get this object from the VCPropertySheet::get_Rules collection, similarly to how we show above using VCConfiguration::get_Rules.&amp;#160; As you might expect, IVCRulePropertyStorage objects obtained from VCPropertySheet objects will read and write to that property sheet instead of the project.&lt;/p&gt;

&lt;p&gt;The IVCRulePropertyStorage interface can only be used to read and write properties for which a Rule XAML file exists that is imported into the project.&amp;#160; If your software requires custom properties that do not exist in a Rule file, you need to create a Rule file that describes those properties and then import that file into your project, as described in Pavan’s &lt;a href="http://blogs.msdn.com/vsproject/archive/2009/06/10/platform-extensibility-part-1.aspx"&gt;Platform Extensibility – Part 1&lt;/a&gt; and &lt;a href="http://blogs.msdn.com/vsproject/archive/2009/06/18/platform-extensibility-part-2.aspx"&gt;Part 2&lt;/a&gt;.&amp;#160; Why do we require these steps?&amp;#160; Because it turns out that project properties have &lt;em&gt;many&lt;/em&gt; attributes, such as where they should be persisted in the file, in which file (project or .user file), whether they are project properties or metadata on items or item definitions, etc. etc.&amp;#160; The Rule file allows you to capture all that per-property detail so that your code that invokes IVCRulePropertyStorage can be free of these implementation-specific details.&lt;/p&gt;

&lt;p&gt;Every single property available in the Visual C++ Property Pages dialog has a Rule file associated with it already, guaranteeing you convenient programmatic access to read or write any property you find there.&amp;#160; &lt;/p&gt;

&lt;h5&gt;&lt;/h5&gt;

&lt;h4&gt;A note on debugger properties&lt;/h4&gt;

&lt;p&gt;There are a couple of interesting points to note with regard to properties that configure the debugger.&amp;#160; &lt;/p&gt;

&lt;p&gt;Debugger properties are stored in the project user file (*.vcxproj.user) rather than the project itself.&amp;#160; This doesn’t require any special coding on your part—you just acquire the IVCRulePropertyStorage object from VCConfiguration the same as you would for other properties.&amp;#160; The Rule.DataSource tag in the debugger_*.xml rule files tell the IVCRulePropertyStorage to persist to the .user file instead of the project file so that you don’t have to worry about that detail.&lt;/p&gt;

&lt;p&gt;In Visual C++ 2008 and earlier, debugger properties were accessed using VCDebugSettings.&amp;#160; This interface had only a small set of properties, many of which were overloaded to control several different debuggers (local, remote, web browser, etc.) so these properties could not be set for a particular debugger without risk of impacting other debuggers.&amp;#160; In Visual C++ 2010 we’ve isolated each debugger’s properties so they are independent of one another.&amp;#160; The VCDebugSettings interface is still present in Visual C++ 2010, but deprecated since it did not have the isolated set of properties per-debugger.&amp;#160; For this reason, we highly recommend you use IVCRulePropertyStorage for getting and setting debugger properties for your Visual C++ 2010 IDE extensions.&amp;#160; As with any other properties, you can discover the set of available properties for each debugger and their names and possible values by inspecting these files: %ProgramFiles%\msbuild\Microsoft.Cpp\v4.0\1033\debugger_*.xml&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9948078" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VS2010/">VS2010</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/">extensibility</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/Project/">Project</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VC_2B002B00_/">VC++</category></item><item><title>Codecast interviews about the Editor and Extensibility</title><link>http://blogs.msdn.com/b/visualstudio/archive/2009/12/20/codecast-interviews-about-the-editor-and-extensibility.aspx</link><pubDate>Sun, 20 Dec 2009 03:12:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9939205</guid><dc:creator>Visual Studio Blog</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/rsscomments.aspx?WeblogPostID=9939205</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/commentapi.aspx?WeblogPostID=9939205</wfw:comment><comments>http://blogs.msdn.com/b/visualstudio/archive/2009/12/20/codecast-interviews-about-the-editor-and-extensibility.aspx#comments</comments><description>&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Happy holidays everyone!&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Chris Granger and I met up with &lt;A href="http://mashupx.com/"&gt;Ken Levy&lt;/A&gt; the other day to talk about the new Editor and VS Extensibility.&lt;/P&gt;
&lt;P&gt;Ken is responsible for the code cast interviews at &lt;A href="http://www.code-magazine.com/Index.aspx"&gt;code magazine&lt;/A&gt;.&amp;nbsp; Chris and I sat down with Ken to discuss the Editor, the SDK, the Extension Manager, VSIX and some of the cool new things we’re shipping in Visual Studio 2010.&lt;/P&gt;
&lt;P&gt;The code cast links are below… Enjoy! :)&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.code-magazine.com/CodeCast/Index.aspx?messageid=533d4a57-45c8-41a0-8e0d-8fa2f33fec98"&gt;Visual Studio Extensibility (SDK, Extension Manager)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.code-magazine.com/codecast/index.aspx?messageid=4701cc00-e1ba-4411-b795-cb820257111a"&gt;Visual Studio Editor&lt;/A&gt;&lt;/P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/ExtensibilityVideos_BBE6/quanto_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/ExtensibilityVideos_BBE6/quanto_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; WIDTH: 67px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; HEIGHT: 71px; MARGIN-LEFT: 3px; BORDER-LEFT-WIDTH: 0px; MARGIN-RIGHT: 3px" title=wespic border=0 alt=wespic align=left src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/ExtensibilityVideos_BBE6/quanto_thumb.jpg" width=86 height=70 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/ExtensibilityVideos_BBE6/quanto_thumb.jpg"&gt;&lt;/A&gt; 
&lt;H3&gt;&lt;/H3&gt;
&lt;DIV id=author&gt;
&lt;P&gt;&lt;STRONG&gt;Quan To&lt;/STRONG&gt; – Program Manager, Visual Studio Platform Team &lt;BR&gt;&lt;STRONG&gt;Short Bio&lt;/STRONG&gt;: Quan is responsible for the Extension Manager and Visual Studio SDK.&amp;nbsp; Quan has been with Microsoft for over ten years and has also spent time working on the Tablet PC Team and the Visual Studio Deployment team. &lt;/P&gt;&lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9939205" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/editor/">editor</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/">extensibility</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/talks/">talks</category></item><item><title>What's A PkgDef? And Why?</title><link>http://blogs.msdn.com/b/visualstudio/archive/2009/12/18/what-s-a-pkgdef-and-why.aspx</link><pubDate>Fri, 18 Dec 2009 12:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9936649</guid><dc:creator>Visual Studio Blog</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/rsscomments.aspx?WeblogPostID=9936649</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/commentapi.aspx?WeblogPostID=9936649</wfw:comment><comments>http://blogs.msdn.com/b/visualstudio/archive/2009/12/18/what-s-a-pkgdef-and-why.aspx#comments</comments><description>&lt;P&gt;A &lt;STRONG&gt;.pkgdef&lt;/STRONG&gt; file is way to encapsulate application configuration information in an easily editable, distributable, and deployable form. It was introduced in Visual Studio 2008 SP1 to support the &lt;A href="http://msdn.microsoft.com/en-us/library/cc138553.aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc138553.aspx"&gt;configuration of Isolated Shell applications&lt;/A&gt;. In Visual Studio 2010, .pkgdef files take on a more expanded role and are much more integrated into both the IDE and the Shell (Integrated and Isolated). This article will briefly describe the .pkgdef format and introduce the scenarios where it is used in VS 2010. Future posts will go into more detail about particular scenarios.&lt;/P&gt;
&lt;P&gt;Here is a portion of a .pkgdef file that registers the Extension Manager (which is written as a VS Package) with the IDE:&lt;/P&gt;
&lt;UL&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsAPkgDefAndWhy_8E33/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsAPkgDefAndWhy_8E33/image_2.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsAPkgDefAndWhy_8E33/image_thumb.png" width=644 height=196 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsAPkgDefAndWhy_8E33/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;&lt;/UL&gt;
&lt;P&gt;It looks a lot like a .reg file as exported from the Registry Editor. There is one key difference: the root of the registry key (e.g., "HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\10.0") has been abstracted into the token "$RootKey$". This, and several other tokenized values for registry keys and paths, allows a given .pkgdef file to be reusable for multiple applications and portable to any machine.&lt;/P&gt;
&lt;P&gt;This example also demonstrates why this format was originally called a "pkgdef". A .pkgdef file can be used to define the registration of a package. Now that this format is used for many other registration and configuration tasks, there was some talk of changing the name and extension to something more generic. We decided that the pkgdef appellation was just as good as anything else. Like most computer terminology, the first name seems to have stuck.&lt;/P&gt;
&lt;P&gt;Let's go back and look at that first application of the .pkgdef file to configure Isolated Shell applications in VS 2008 and see what it involved. An Isolated Shell application reads its configuration data from at least four .pkgdef files. &lt;/P&gt;
&lt;TABLE border=0 cellSpacing=0 cellPadding=4 width=700&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=135&gt;&lt;U&gt;&lt;EM&gt;file&lt;/EM&gt;&lt;/U&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=401&gt;&lt;U&gt;&lt;EM&gt;description&lt;/EM&gt;&lt;/U&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=163&gt;&lt;U&gt;&lt;EM&gt;location&lt;/EM&gt;&lt;/U&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=135&gt;&lt;STRONG&gt;MyVSShellStub.pkgdef&lt;/STRONG&gt; &lt;/TD&gt;
&lt;TD vAlign=top width=401&gt;created by the New Project Wizard when the Isolated Shell application project is created. The master pkgdef configuring the application’s pkgdef environment.&lt;/TD&gt;
&lt;TD vAlign=top width=163&gt;next to &lt;EM&gt;MyVSShellStub.exe&lt;/EM&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=135&gt;&lt;STRONG&gt;MyVSShellStubApplication.pkgdef&lt;/STRONG&gt; &lt;/TD&gt;
&lt;TD vAlign=top width=401&gt;created by the New Project Wizard when the Isolated Shell application project is created. Contains basic values for configuring and branding the Isolated Shell application&lt;/TD&gt;
&lt;TD vAlign=top width=163&gt;in &lt;EM&gt;Extensions&lt;/EM&gt; below &lt;EM&gt;MyVSShellStub.exe&lt;/EM&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=135&gt;&lt;STRONG&gt;MyVsShellStub.pkgundef&lt;/STRONG&gt; &lt;/TD&gt;
&lt;TD vAlign=top width=401&gt;also created by the wizard. Used to remove (or undefine) packages that are configured as part of the Isolated Shell redistributable installation (see BaseConfig.pkgdef)&lt;/TD&gt;
&lt;TD vAlign=top width=163&gt;next to &lt;EM&gt;MyVSShellStub.exe&lt;/EM&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=135&gt;&lt;STRONG&gt;BaseConfig.pkgdef&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=401&gt;part of the Isolated Shell redistributable installation. Contains configuration information for the core features of the Shell, such as the Editor and Designers and the other parts of the IDE&lt;/TD&gt;
&lt;TD vAlign=top width=163&gt;in &lt;EM&gt;ShellExtensions\Platform&lt;/EM&gt; beneath C:\Program Files\ &lt;EM&gt;Microsoft Visual Studio X.0\ Common7\ IDE&lt;/EM&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=135&gt;&lt;STRONG&gt;MyPackage*.pkgdef&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=401&gt;created for any VS Package projects that are created as part of the Isolated Shell application&lt;/TD&gt;
&lt;TD vAlign=top width=163&gt;in &lt;EM&gt;Extensions&lt;/EM&gt; below &lt;EM&gt;MyVSShellStub.exe&lt;/EM&gt; (and elsewhere as defined by &lt;EM&gt;PkgDefSearchPath&lt;/EM&gt;)&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;Notice that that configuration and registration information originates from both the application developer and Microsoft. All of these values have to be merged into a common location specific to the application so that the Shell and the Packages in the application can retrieve them. In VS 2008, this was done during installation of the Isolated Shell application by running the application executable with the "/setup" switch (as a setup Custom Action). This caused the Shell to read all of the .pkgdef files and build a new configuration hive for the application in the registry under HKEY_LOCAL_MACHINE. During the development and test cycle of an Isolated Shell application, the "/ranu" ("run as normal user") switch was used to create a test hive under HKEY_CURRENT_USER, in order to avoid issues with having Administrator access to the registry.&lt;/P&gt;
&lt;UL&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsAPkgDefAndWhy_8E33/PkgDefIsoMerge_4.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=PkgDefIsoMerge border=0 alt=PkgDefIsoMerge src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsAPkgDefAndWhy_8E33/PkgDefIsoMerge_thumb_1.png" width=480 height=330&gt;&lt;/A&gt; &lt;/P&gt;&lt;/UL&gt;
&lt;P&gt;Visual Studio 2010 makes the .pkgdef load and merge operation a normal part of &lt;A href="http://blogs.msdn.com/visualstudio/archive/2009/12/07/Bootstrapping-of-VS-packages-and-VSIX-extensions-in-VS2010.aspx" mce_href="http://blogs.msdn.com/visualstudio/archive/2009/12/07/Bootstrapping-of-VS-packages-and-VSIX-extensions-in-VS2010.aspx"&gt;initialization sequence&lt;/A&gt; for both the Shell and the IDE. It also locates the target of the merge, known as the config (or configuration) cache, under HKEY_CURRENT_USER (next to the user settings for the application, but with a "_Config" suffix). This eliminates the need to run the merge as part of setup and eliminates the need for the "/ranu" switch during testing. It also enables an additional scenario: the Extension Manager.&lt;/P&gt;
&lt;P&gt;The Extension Manager feature allows users to download extensions to the Visual Studio IDE and integrate them without having to run setup. Extensions that are written as VS Packages that must register with the IDE do so using a .pkgdef file. Simply restarting the IDE after the extension is installed (by unzipping its VSIX file) and enabled causes the IDE to build a merged registry hive out of the values that were written to HKEY_LOCAL_MACHINE during Visual Studio setup and the values in .pkgdef files found on disk. The user is not required to take any extra steps or have Administrator privileges.&lt;/P&gt;
&lt;UL&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsAPkgDefAndWhy_8E33/clip_image003_2.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsAPkgDefAndWhy_8E33/clip_image003_2.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=clip_image003 border=0 alt=clip_image003 src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsAPkgDefAndWhy_8E33/clip_image003_thumb.png" width=480 height=238 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsAPkgDefAndWhy_8E33/clip_image003_thumb.png"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/UL&gt;
&lt;P&gt;You may notice that in the case of the Isolated Shell application all of the configuration values come from .pkgdef files. But in the case of the Visual Studio IDE some of the values come from HKEY_LOCAL_MACHINE. In the latter case, VS continues to use the HKLM hive in order to support some compatibility and servicing scenarios. But we plan to continue moving more configuration values out of the registry as we are able.&lt;/P&gt;
&lt;P&gt;The .pkgdef file was introduced in VS 2008 to allow a more modular way to deploy configuration values for the Visual Studio Shells. Improvements in .pkgdef file loading and merging in VS 2010 have made the use of .pkgdef files more automatic and enabled the setup-less installation of Visual Studio extensions.&lt;/P&gt;
&lt;P&gt;In future posts, I plan to describe in more detail how and when VS decides to refresh the config cache, why a .pkgdef file might not be loaded and how to debug that, and the purposes of the various .pkgdef files. In the meantime, Aaron Marten and Dmitry Goncharenko have already written several excellent related posts, some of which I have already referenced above:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&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; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/aaronmar/archive/2009/11/06/all-your-regkeys-are-belong-to-us.aspx" mce_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; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/visualstudio/archive/2009/12/07/Bootstrapping-of-VS-packages-and-VSIX-extensions-in-VS2010.aspx" mce_href="http://blogs.msdn.com/visualstudio/archive/2009/12/07/Bootstrapping-of-VS-packages-and-VSIX-extensions-in-VS2010.aspx"&gt;Bootstrapping of VS packages and VSIX extensions in VS2010&lt;/A&gt; &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;You may also want to read an &lt;A href="http://msdn.microsoft.com/en-us/vsx/bb933751.aspx" mce_href="http://msdn.microsoft.com/en-us/vsx/bb933751.aspx"&gt;Introduction to the Visual Studio Shell&lt;/A&gt; or view a recent &lt;A href="http://channel9.msdn.com/posts/VSIPMarketing/VSX204-Learning-How-to-Leverage-the-Visual-Studio-2010-Shell-Isolated-and-Integrated-Mode/" mce_href="http://channel9.msdn.com/posts/VSIPMarketing/VSX204-Learning-How-to-Leverage-the-Visual-Studio-2010-Shell-Isolated-and-Integrated-Mode/"&gt;Presentation about the Shell in VS 2010&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsAPkgDefAndWhy_8E33/clip_image004_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsAPkgDefAndWhy_8E33/clip_image004_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; MARGIN: 0px 20px 0px 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=clip_image004 border=0 alt=clip_image004 align=left src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsAPkgDefAndWhy_8E33/clip_image004_thumb.jpg" width=104 height=104 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsAPkgDefAndWhy_8E33/clip_image004_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Bill Weinberger&lt;/STRONG&gt;: Developer, Visual Studio Platform&lt;/P&gt;
&lt;P&gt;Bill is a relative newcomer to Microsoft, but has many years of software industry experience working on IDEs and vertical applications. For Visual Studio 2010, he was a key contributor to PkgDef Management.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9936649" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VS2010/">VS2010</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/">extensibility</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/Bill+Weinberger/">Bill Weinberger</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/pkgdef/">pkgdef</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/registry/">registry</category></item><item><title>Upcoming VS Platform MSDN Webcasts</title><link>http://blogs.msdn.com/b/visualstudio/archive/2009/12/01/upcoming-vs-platform-msdn-webcasts.aspx</link><pubDate>Tue, 01 Dec 2009 17:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9930888</guid><dc:creator>Visual Studio Blog</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/rsscomments.aspx?WeblogPostID=9930888</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/commentapi.aspx?WeblogPostID=9930888</wfw:comment><comments>http://blogs.msdn.com/b/visualstudio/archive/2009/12/01/upcoming-vs-platform-msdn-webcasts.aspx#comments</comments><description>&lt;P&gt;&lt;EM&gt;[Update:&amp;nbsp; The Introduction to Visual Studio 2010 Extensibility has been moved to 12/16 @ 10 a.m.&amp;nbsp; Please update your calendars to reflect this change.]&lt;/EM&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wanted to announce two upcoming &lt;A href="http://www.microsoft.com/events/default.mspx" mce_href="http://www.microsoft.com/events/default.mspx"&gt;MSDN Webcasts&lt;/A&gt; that will be presented by Visual Studio Platform PMs, Weston Hutchins and Chris Granger.&amp;nbsp; Both of these are introductory level talks focused on extending Visual Studio 2010.&amp;nbsp; We’ll be presenting some slides, showing off some cool demos, and answering some Q&amp;amp;A at the end, so please join us by clicking on the Attendee Registration links below!&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;H4&gt;I Want Coloring: A scenarios based look at the new Editor.&lt;/H4&gt;
&lt;P&gt;&lt;STRONG&gt;When&lt;/STRONG&gt;: Wednesday, December 09, 2009 10:00 AM Pacific Time (US &amp;amp; Canada) &lt;BR&gt;&lt;STRONG&gt;Duration&lt;/STRONG&gt;: 60 minutes &lt;BR&gt;&lt;STRONG&gt;Presenter&lt;/STRONG&gt;: Chris Granger, Program Manager, VS Editor &lt;BR&gt;&lt;STRONG&gt;Attendee Registration&lt;/STRONG&gt;: &lt;A href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032434989&amp;amp;Culture=en-US" mce_href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032434987&amp;amp;Culture=en-US"&gt;http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032434989&amp;amp;Culture=en-US&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;While many of you may know that Visual Studio 2010 comes with a new WPF based, extensible editor, do you know why you should care? We will take a look at the new editor by examining a series of common scenarios that showcase what you can do with editor extensions. You can think of this as your crash course; you’ll learn some concepts, you’ll see some code, and you’ll walk away with a head full of possibilities.&lt;/P&gt;
&lt;H4&gt;An Introduction to Visual Studio 2010&amp;nbsp;Extensibility&lt;/H4&gt;
&lt;P&gt;&lt;STRONG&gt;When&lt;/STRONG&gt;: Wednesday, December 16, 2009 10:00 AM Pacific Time (US &amp;amp; Canada) &lt;BR&gt;&lt;STRONG&gt;Duration&lt;/STRONG&gt;: 60 minutes &lt;BR&gt;&lt;STRONG&gt;Presenter&lt;/STRONG&gt;: Weston Hutchins, Program Manager, VS Shell &lt;BR&gt;&lt;STRONG&gt;Attendee Registration&lt;/STRONG&gt;: &lt;A href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032434987&amp;amp;Culture=en-US" mce_href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032434987&amp;amp;Culture=en-US"&gt;http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032434987&amp;amp;Culture=en-US&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Want to customize and enhance the out-of-box Microsoft Visual Studio 2010 development environment? Want to build your own Windows Presentation Foundation (WPF) tool window but don't know how to get started? In this webcast, we cover the basics of Visual Studio extensibility and show you how to take advantage of the numerous extension options inside Visual Studio. Additionally, we discuss the new extensibility enhancements in Visual Studio 2010 and how you can take advantage of those enhancements in your application. This is a fun session with plenty of demos, we have something to offer the Visual Studio novice up to the seasoned veteran.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9930888" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/">extensibility</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/Chris+Granger/">Chris Granger</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/webcast/">webcast</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/Weston+Hutchins/">Weston Hutchins</category></item><item><title>What's new for editor extenders in Beta 2?</title><link>http://blogs.msdn.com/b/visualstudio/archive/2009/11/23/what-s-new-for-editor-extenders-in-beta-2.aspx</link><pubDate>Mon, 23 Nov 2009 23:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9926591</guid><dc:creator>Visual Studio Blog</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/rsscomments.aspx?WeblogPostID=9926591</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/visualstudio/commentapi.aspx?WeblogPostID=9926591</wfw:comment><comments>http://blogs.msdn.com/b/visualstudio/archive/2009/11/23/what-s-new-for-editor-extenders-in-beta-2.aspx#comments</comments><description>&lt;DIV id=author&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsnewforeditorextendersinBeta2_F134/NoahRic_2.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsnewforeditorextendersinBeta2_F134/NoahRic_2.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; MARGIN: 0px 3px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="Noah Richards" border=0 alt="Noah Richards" align=left src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsnewforeditorextendersinBeta2_F134/NoahRic_thumb.png" width=81 height=105 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/WhatsnewforeditorextendersinBeta2_F134/NoahRic_thumb.png"&gt;&lt;/A&gt; &lt;STRONG&gt;Noah Richards&lt;/STRONG&gt; – Developer, Visual Studio Editor Team &lt;BR&gt;&lt;STRONG&gt;Short Bio:&lt;/STRONG&gt;&amp;nbsp; Noah has been working on the Visual Studio Editor team since he graduated college two and a half years ago.&amp;nbsp; He maintains a &lt;A title="Noah's Blog : Letters from the editor" href="http://blogs.msdn.com/noahric"&gt;blog&lt;/A&gt;, posts &lt;A title="GitHub : NoahRic's Profile" href="http://github.com/noahric"&gt;sample code&lt;/A&gt; for editor extensions, and frequently answers editor-related questions &lt;A title="Noah Richards (noahsmark) on Twitter" href="http://twitter.com/noahsmark"&gt;on Twitter&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Editor’s Note:&amp;nbsp; This post was &lt;A title="Letters from the editor : What's new for extenders in Beta 2?" href="http://blogs.msdn.com/noahric/archive/2009/11/04/what-s-new-for-extenders-in-beta-2.aspx"&gt;originally published&lt;/A&gt; on &lt;A title="Noah's Blog : Letters from the editor" href="http://blogs.msdn.com/noahric"&gt;Noah’s personal blog&lt;/A&gt;, which we’d encourage you to follow for additional content about the new VS 2010 editor and its extensibility.&lt;/EM&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;Now that Visual Studio 2010 Beta 2 has been out for about a month, most of you have probably seen it and tried many of its new features.&amp;nbsp; For those interested in writing extensions for VS, we wanted to share a couple of updates around editor extensibility, particularly for people who wrote extensions in Beta 1 and want to upgrade to Beta 2.&lt;/P&gt;
&lt;H4&gt;1 – No More &lt;FONT face=Consolas&gt;IEnvironment&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;If you wrote any code that had classifiers or taggers or various other extensions that take an &lt;FONT face=Consolas&gt;IEnvironment&lt;/FONT&gt; parameter, you'll be deleting those parameters in Beta 2. &lt;FONT face=Consolas&gt;IEnvironment&lt;/FONT&gt; had a few historical reasons for being there (back when the editor was a part of a different project and not in Visual Studio yet), but it wasn't really serving a purpose anymore. In Beta 1, all it really did was confuse people and make you type an extra few characters and/or add an FxCop suppression since you weren't using it. This is a small change but a simplifying one. (If you are curious about the one place that did use it for taggers, see #5 below).&lt;/P&gt;
&lt;H4&gt;2 – Mouse and key processors get more metadata&lt;/H4&gt;
&lt;P&gt;In Beta 2, mouse and key processor providers take the following metadata; note that some of these were required for mouse &lt;EM&gt;or&lt;/EM&gt; key processors, but now the list applies to both:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;CODE&gt;&lt;FONT face=Consolas&gt;Export&lt;/FONT&gt;&lt;/CODE&gt;, like all components &lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;&lt;FONT face=Consolas&gt;ContentType&lt;/FONT&gt;&lt;/CODE&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;&lt;FONT face=Consolas&gt;Name&lt;/FONT&gt;&lt;/CODE&gt; and &lt;CODE&gt;&lt;FONT face=Consolas&gt;Order&lt;/FONT&gt;&lt;/CODE&gt;, so that you can position yourself before or after other known handlers. This is important in cases where you want to preempt whatever normally happens in a certain event. &lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;&lt;FONT face=Consolas&gt;TextViewRole&lt;/FONT&gt;&lt;/CODE&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Also, somewhat tangentially, the &lt;CODE&gt;&lt;FONT face=Consolas&gt;ContentType&lt;/FONT&gt;&lt;/CODE&gt; attribute now applies to any buffer in a view's graph - that's just a fancy way of saying that if you have something like an ASP.NET page that has embedded C#, your key or mouse processors will get loaded if they have &lt;CODE&gt;&lt;FONT face=Consolas&gt;[ContentType("CSharp")]&lt;/FONT&gt;&lt;/CODE&gt;.&lt;/P&gt;
&lt;P&gt;These fixes were necessary to write the &lt;A title="Letters from the editor : Beta 2!" href="http://blogs.msdn.com/noahric/archive/2009/10/19/beta-2.aspx"&gt;triple click extension&lt;/A&gt;, which selects a line on triple click (you can find &lt;A title="GitHub : NoahRic's TripleClick" href="http://github.com/NoahRic/TripleClick"&gt;its code on github&lt;/A&gt; and &lt;A title="VS Gallery : Triple Click Extension" href="http://visualstudiogallery.msdn.microsoft.com/en-us/2bbdc70c-32f7-4b69-8cff-d8190cae0cc7"&gt;its binaries on the VS Gallery&lt;/A&gt;). Without the ordering, I couldn't put the mouse handler early enough to work correctly. Also, there were a few bugs in some of the default mouse handlers that have since been fixed.&lt;/P&gt;
&lt;P&gt;Note that, unfortunately, the general guidance is to &lt;EM&gt;not&lt;/EM&gt; use keyboard providers. The VS command system and the way components like the editor plug in don't play very well with normal WPF keyboard input, so the short story is that you'll only get keyboard events for key combinations that aren't already bound to a command. Which leads me to the next new thing...&lt;/P&gt;
&lt;H4&gt;3 – Listening for the creation of &lt;FONT face=Consolas&gt;IVsTextView&lt;/FONT&gt; adapters (&lt;FONT face=Consolas&gt;IVsTextViewCreationListener&lt;/FONT&gt;)&lt;/H4&gt;
&lt;P&gt;We added this as an extension to the VS integration piece of the editor to allow people to listen for the creation of &lt;FONT face=Consolas&gt;IVsTextView&lt;/FONT&gt; (which is what the underlying &lt;FONT face=Consolas&gt;IWpfTextView&lt;/FONT&gt; /&lt;FONT face=Consolas&gt;ITextView&lt;/FONT&gt; are wrapped in for the sake of people who still use the existing VS API). It's effectively identical to &lt;FONT face=Consolas&gt;IWpfTextViewCreationListener&lt;/FONT&gt;, except that you get an &lt;FONT face=Consolas&gt;IVsTextView&lt;/FONT&gt; instead of an &lt;FONT face=Consolas&gt;IWpfTextView&lt;/FONT&gt; when called.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;A quick note – if you want to use this extension, you'll need to add a reference to &lt;CODE&gt;&lt;FONT face=Consolas&gt;Microsoft.VisualStudio.Editor.dll&lt;/FONT&gt;&lt;/CODE&gt;. It's in the SDK, so that's not a problem, but it isn't a part of any of the standard editor project templates.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;The biggest reason we introduced this was for extensions that want to add command handlers to the editor. You could do this in the past, somewhat painfully, by doing the following:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Write an &lt;FONT face=Consolas&gt;IWpfTextViewCreationListener&lt;/FONT&gt; &lt;/LI&gt;
&lt;LI&gt;The ugly step - listen for the &lt;FONT face=Consolas&gt;GotAggregateFocus &lt;/FONT&gt;event on the text view and do the remaining steps in that handler. If you skipped this step, the eventually attempt at getting the &lt;FONT face=Consolas&gt;IVsTextView&lt;/FONT&gt; would fail, since the two objects weren't fully hooked up yet. &lt;/LI&gt;
&lt;LI&gt;With an &lt;CODE&gt;&lt;FONT face=Consolas&gt;[Import]&lt;/FONT&gt;&lt;/CODE&gt;ed &lt;CODE&gt;&lt;FONT face=Consolas&gt;IVsEditorAdaptersFactoryService&lt;/FONT&gt;&lt;/CODE&gt;, call &lt;CODE&gt;&lt;FONT face=Consolas&gt;GetViewAdapter&lt;/FONT&gt;&lt;/CODE&gt; to get the &lt;FONT face=Consolas&gt;IVsTextView&lt;/FONT&gt;. &lt;/LI&gt;
&lt;LI&gt;Call &lt;CODE&gt;&lt;FONT face=Consolas&gt;IVsTextView.AddCommandFilter&lt;/FONT&gt;&lt;/CODE&gt; &lt;/LI&gt;
&lt;LI&gt;...and don't forget to unsubscribe from &lt;CODE&gt;&lt;FONT face=Consolas&gt;GotAggregateFocus&lt;/FONT&gt;&lt;/CODE&gt; or use a flag so that you only listen to the first time the event is raised. &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;With the new event, you just need to:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Write an &lt;CODE&gt;&lt;FONT face=Consolas&gt;IVsTextViewCreationListener&lt;/FONT&gt;&lt;/CODE&gt; &lt;/LI&gt;
&lt;LI&gt;Call &lt;CODE&gt;&lt;FONT face=Consolas&gt;IVsTextView.AddCommandFilter&lt;/FONT&gt;&lt;/CODE&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;If you do want to get the associated &lt;FONT face=Consolas&gt;IWpfTextView&lt;/FONT&gt; for the &lt;FONT face=Consolas&gt;IVsTextView&lt;/FONT&gt; adapter, you can do the opposite of #3 above (using &lt;CODE&gt;&lt;FONT face=Consolas&gt;GetWpfTextView&lt;/FONT&gt;&lt;/CODE&gt;); the upside, relative to the above list, is that you don't need to worry about initialization being finished. When you get the call in your creation listener, initialization has completed to the point that &lt;CODE&gt;&lt;FONT face=Consolas&gt;GetWpfTextView&lt;/FONT&gt;&lt;/CODE&gt; will always succeed.&lt;/P&gt;
&lt;P&gt;Because command filters are still not entirely obvious to get correct, I'm working on a template to do this for you. More in general, I'm working on a set of "New Item" templates for the editor, so that you can add new components (or at least a skeleton of a new component) with a couple clicks in an existing project. I haven’t finished these yet, but you can see the work in progress on &lt;A title="GitHub : CommandFilter.cs from NoahRic's EditorItemTemplates" href="http://github.com/NoahRic/EditorItemTemplates/blob/master/CommandFilter.cs"&gt;CommandFilter.cs&lt;/A&gt;.&lt;/P&gt;
&lt;H4&gt;4 – Custom text marker visual definitions&lt;/H4&gt;
&lt;P&gt;One of the other things missing in Beta 1 was the ability to set the visualizations for text markers (the markers you can create with an &lt;CODE&gt;&lt;FONT face=Consolas&gt;ITagger&amp;lt;TextMarkerTag&amp;gt;&lt;/FONT&gt;&lt;/CODE&gt;). There were some built-in marker types, but they were somewhat limited.&lt;/P&gt;
&lt;P&gt;In Beta 2, that's now changed, and you can export a &lt;CODE&gt;&lt;FONT face=Consolas&gt;MarkerFormatDefinition&lt;/FONT&gt;&lt;/CODE&gt; that looks something like this:&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; FONT-SIZE: 8pt; mso-bidi-font-family: verdana"&gt;&lt;FONT size=2 face=Consolas&gt;Export(&lt;SPAN style="COLOR: blue"&gt;typeof&lt;/SPAN&gt;(EditorFormatDefinition))] &lt;BR&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; FONT-SIZE: 8pt; mso-bidi-font-family: verdana"&gt;&lt;FONT size=2 face=Consolas&gt;[Name(&lt;SPAN style="COLOR: #a31515"&gt;"mymarker"&lt;/SPAN&gt;)]&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: blue; FONT-SIZE: 8pt; mso-bidi-font-family: verdana"&gt;&lt;FONT size=2 face=Consolas&gt;internal&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; FONT-SIZE: 8pt; mso-bidi-font-family: verdana"&gt;&lt;FONT size=2 face=Consolas&gt; &lt;/FONT&gt;&lt;FONT color=#333333&gt;&lt;FONT face=Consolas&gt;&lt;FONT size=2&gt;&lt;SPAN style="COLOR: blue"&gt;sealed&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;class&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;MyMarkerDefinition&lt;/SPAN&gt; : MarkerFormatDefinition &lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; FONT-SIZE: 8pt; mso-bidi-font-family: verdana"&gt;&lt;FONT size=2 face=Consolas&gt;{ &lt;BR&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; FONT-SIZE: 8pt; mso-bidi-font-family: verdana"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT size=2 face=Consolas&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color=#333333&gt;&lt;FONT face=Consolas&gt;&lt;FONT size=2&gt;&lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; MyMarkerDefinition() &lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; FONT-SIZE: 8pt; mso-bidi-font-family: verdana"&gt;&lt;FONT face=Consolas&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{ &lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; FONT-SIZE: 8pt; mso-bidi-font-family: verdana"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT size=2 face=Consolas&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color=#333333&gt;&lt;FONT face=Consolas&gt;&lt;FONT size=2&gt;&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;.ZOrder = &lt;SPAN style="COLOR: brown"&gt;1&lt;/SPAN&gt;; &lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; FONT-SIZE: 8pt; mso-bidi-font-family: verdana"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT size=2 face=Consolas&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color=#333333&gt;&lt;FONT face=Consolas&gt;&lt;FONT size=2&gt;&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;.Fill = &lt;SPAN style="COLOR: #2b91af"&gt;Brushes&lt;/SPAN&gt;.Blue; &lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; FONT-SIZE: 8pt; mso-bidi-font-family: verdana"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT size=2 face=Consolas&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color=#333333&gt;&lt;FONT face=Consolas&gt;&lt;FONT size=2&gt;&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;.Border = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;Pen&lt;/SPAN&gt;(&lt;SPAN style="COLOR: #2b91af"&gt;Brushes&lt;/SPAN&gt;.DarkGray, &lt;SPAN style="COLOR: brown"&gt;0.5&lt;/SPAN&gt;); &lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; FONT-SIZE: 8pt; mso-bidi-font-family: verdana"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT size=2 face=Consolas&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color=#333333&gt;&lt;FONT face=Consolas&gt;&lt;FONT size=2&gt;&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;.Fill.Freeze(); &lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; FONT-SIZE: 8pt; mso-bidi-font-family: verdana"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT size=2 face=Consolas&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color=#333333&gt;&lt;FONT face=Consolas&gt;&lt;FONT size=2&gt;&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;.Border.Freeze(); &lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Consolas&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; FONT-SIZE: 8pt; mso-bidi-font-family: verdana"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;} &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; FONT-SIZE: 8pt; mso-bidi-font-family: verdana"&gt;}&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;And then create a &lt;CODE&gt;&lt;FONT face=Consolas&gt;TextMarkerTag&lt;/FONT&gt;&lt;/CODE&gt; with the name "mymarker", and you are all set. Note that you'll probably want some transparency on your fill brush, since the selection is drawn &lt;EM&gt;underneath&lt;/EM&gt; markers.&lt;/P&gt;
&lt;P&gt;&lt;A&gt;&lt;/A&gt;&lt;/P&gt;
&lt;H4&gt;5 – View tagger provider (&lt;FONT face=Consolas&gt;IViewTaggerProvider&lt;/FONT&gt;)&lt;/H4&gt;
&lt;P&gt;In Beta 1, you exported your taggers with an &lt;CODE&gt;&lt;FONT face=Consolas&gt;ITaggerProvider&lt;/FONT&gt;&lt;/CODE&gt;. In Beta 2, there is an additional interface you can use called &lt;CODE&gt;&lt;FONT face=Consolas&gt;IViewTaggerProvider&lt;/FONT&gt;&lt;/CODE&gt;, which is passed both a buffer and a view in its &lt;FONT face=Consolas&gt;&lt;CODE&gt;CreateTagger&lt;/CODE&gt; &lt;/FONT&gt;method. There are a few cases where you may want to use this:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;EM&gt;Your tagger needs information specific to a certain view&lt;/EM&gt; – this may be the case if you are writing an extension that wants to, say, highlight all references in a view that match the reference under the caret. In this case, you need to know the caret position in the view to produce your results. &lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;Your tagger wants to produce different results depending on the view&lt;/EM&gt; – this is basically the same as #1, but it may help to also think of it in this way. With the highlight references example again, it's possible to have two different views over the same buffer (split window, for example, or the code definition window), where you want each view to show different results for the highlighted references, even though they are displaying the content of the same text buffer. &lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;Your tagger wants to consume other tag information&lt;/EM&gt; – this is a more complex case that probably deserves its own blog article. Basically, if you have a tagger for type &lt;CODE&gt;&lt;FONT face=Consolas&gt;T&lt;/FONT&gt;&lt;/CODE&gt; that consumes, say, classification tags, you want to avoid accidentally including a classifier that is trying to consume tags of type &lt;CODE&gt;&lt;FONT face=Consolas&gt;T&lt;/FONT&gt;&lt;/CODE&gt;, or else you'll end up with an ugly recursive loop when trying to get tags. You can sidestep this by providing your tagger with an &lt;CODE&gt;&lt;FONT face=Consolas&gt;IViewTaggerProvider&lt;/FONT&gt;&lt;/CODE&gt; and consuming taggers (or classifiers) you get from an &lt;CODE&gt;&lt;FONT face=Consolas&gt;IBufferTagAggregatorFactoryService&lt;/FONT&gt;&lt;/CODE&gt; (or &lt;CODE&gt;&lt;FONT face=Consolas&gt;IClassifierAggregatorService.GetClassifier &lt;/FONT&gt;&lt;/CODE&gt;that takes a buffer). That way, you are guaranteed that any taggers/classifiers you may consume can't accidentally consume your extension as well. &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;The downside to #3 is that it is still hairy for other components to safely consume your tagger (that they are using via &lt;CODE&gt;&lt;FONT face=Consolas&gt;IViewTagAggregatorFactoryService&lt;/FONT&gt;&lt;/CODE&gt;) to produce tags; if two view-level taggers are each consuming other view-level taggers, you get the same problem as before. As such, any component you make that does this should be created with the understanding that it can't be safely consumed. For any extensions you write, you should probably steer clear of creating view-level taggers that consume a view-level &lt;CODE&gt;&lt;FONT face=Consolas&gt;ITagAggregator&amp;lt;ClassificationTag&amp;gt;&lt;/FONT&gt;&lt;/CODE&gt;, for example. In general, it's probably safest to follow this rule:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Never create a tag aggregator using an &lt;FONT face=Consolas&gt;IViewTagAggregatorFactoryService&lt;/FONT&gt; inside a tagger provided with an &lt;CODE&gt;&lt;FONT face=Consolas&gt;IViewTaggerProvider&lt;/FONT&gt;&lt;/CODE&gt;.&lt;/STRONG&gt;&lt;/P&gt;
&lt;H4&gt;...and more&lt;/H4&gt;
&lt;P&gt;This is not an exhaustive list; these are just the biggest ones I can think of off the top of my head. We’ll continue to post more editor and extensibility content on the &lt;A title="The Visual Studio Blog" href="http://blogs.msdn.com/visualstudio"&gt;Visual Studio Blog&lt;/A&gt; and &lt;A title="Noah's Blog: Letters from the editor" href="http://blogs.msdn.com/noahric" mce_href="http://blogs.msdn.com/noahric"&gt;my blog&lt;/A&gt;, so stay tuned.&amp;nbsp; And as always, comments are welcome.&lt;/P&gt;
&lt;P&gt;- Noah&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9926591" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/WPF/">WPF</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/editor/">editor</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/VS2010/">VS2010</category><category domain="http://blogs.msdn.com/b/visualstudio/archive/tags/extensibility/">extensibility</category></item></channel></rss>