<?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>John W Powell : SharePoint</title><link>http://blogs.msdn.com/johnwpowell/archive/tags/SharePoint/default.aspx</link><description>Tags: SharePoint</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>SharePoint Database Naming Standards</title><link>http://blogs.msdn.com/johnwpowell/archive/2009/12/15/sharepoint-database-naming-standards.aspx</link><pubDate>Tue, 15 Dec 2009 14:44:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9937058</guid><dc:creator>johnwpowell</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/johnwpowell/comments/9937058.aspx</comments><wfw:commentRss>http://blogs.msdn.com/johnwpowell/commentrss.aspx?PostID=9937058</wfw:commentRss><description>&lt;P&gt;Call me picky, but I think it’s important to consistently name your SharePoint databases—especially on a shared SQL Server hosting multiple farms and applications.&amp;nbsp; Not only is it a good practice, but by showing that you care about the databases, you’ll earn the respect of even your most grumpiest DBAs.&amp;nbsp; I wish the SharePoint administrative interfaces ushered you into a naming convention, but the reality is that consistent naming requires diligence and a little planning.&amp;nbsp; I would bet that a majority of the SharePoint installations in the wild were configured using using the Products and Technology Wizard GUI.&amp;nbsp; When you use the GUI, it creates the Central Administration content database without giving you the opportunity to provide a meaningful name.&amp;nbsp; If you’ve seen a database named SharePoint_AdminContent_[YOURGUIDHERE], you know what I’m talking about.&amp;nbsp; Imagine you are supporting multiple SharePoint farms—is it easy to tell which database belongs to which farm?&amp;nbsp; Shouldn’t it be?&lt;/P&gt;
&lt;H3&gt;Naming Convention&lt;/H3&gt;
&lt;P&gt;Here is the naming convention I recommend for SharePoint 2007: &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;SharePoint_[Farm Name]_[Database Type]_[Name]&lt;/STRONG&gt; where database type is one of the following:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Config &lt;/LI&gt;
&lt;LI&gt;Content &lt;/LI&gt;
&lt;LI&gt;WSSSearch &lt;/LI&gt;
&lt;LI&gt;SSP&lt;/LI&gt;
&lt;LI&gt;SSPSearch &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;For example, the AdventureWorks MOSS 2007 Enterprise Intranet farm would have the following databases:&lt;/P&gt;
&lt;TABLE border=0 cellSpacing=0 cellPadding=2 width=534&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=277&gt;&lt;STRONG&gt;Database&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=255&gt;&lt;STRONG&gt;Purpose&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=277&gt;SharePoint_AWIntranet_Config&lt;/TD&gt;
&lt;TD vAlign=top width=255&gt;Farm Configuration&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=277&gt;SharePoint_AWIntranet_Content_CA&lt;/TD&gt;
&lt;TD vAlign=top width=255&gt;Central Administration Content&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=277&gt;SharePoint_AWIntranet_Content_Intranet&lt;/TD&gt;
&lt;TD vAlign=top width=255&gt;Company Intranet Content&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=277&gt;SharePoint_AWIntranet_Content_DefaultSSP&lt;/TD&gt;
&lt;TD vAlign=top width=255&gt;Default SSP Content&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=277&gt;SharePoint_AWIntranet_Content_DefaultSSPMySite&lt;/TD&gt;
&lt;TD vAlign=top width=255&gt;My Site Content for Default SSP&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=277&gt;SharePoint_AWIntranet_Content_OtherSSP&lt;/TD&gt;
&lt;TD vAlign=top width=255&gt;Other SSP Content&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=277&gt;SharePoint_AWIntranet_Content_OtherSSPMySite&lt;/TD&gt;
&lt;TD vAlign=top width=255&gt;My Site Content for Other SSP&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=277&gt;SharePoint_AWIntranet_SSP_DefaultSSP&lt;/TD&gt;
&lt;TD vAlign=top width=255&gt;Default SSP Database&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=277&gt;SharePoint_AWIntranet_SSP_OtherSSP&lt;/TD&gt;
&lt;TD vAlign=top width=255&gt;Other SSP Database&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=277&gt;SharePoint_AWIntranet_SSPSearch_DefaultSSP&lt;/TD&gt;
&lt;TD vAlign=top width=255&gt;Default SSP Search Database&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=277&gt;SharePoint_AWIntranet_SSPSearch_OtherSSP&lt;/TD&gt;
&lt;TD vAlign=top width=255&gt;Other SSP Search Database&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=277&gt;SharePoint_AWIntranet_WSSSearch_SPWFE01&lt;/TD&gt;
&lt;TD vAlign=top width=255&gt;WSS Help Search Web Front End 1&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=277&gt;SharePoint_AWIntranet_WSSSearch_SPWFE02&lt;/TD&gt;
&lt;TD vAlign=top width=255&gt;WSS Help Search Web Front End 2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;What I like about this naming convention is that the databases sort nicely.&amp;nbsp; On a shared SQL Server, the SharePoint databases are separated from other application databases.&amp;nbsp; Within SharePoint, each farm’s databases are together.&amp;nbsp; Within each farm, the database types are together, and finally, a meaningful name makes it easy to determine which area it belongs to.&lt;/P&gt;
&lt;H3&gt;Implementing the Naming Convention&lt;/H3&gt;
&lt;P&gt;The best way to ensure consistency is to &lt;STRONG&gt;script configuration changes&lt;/STRONG&gt;.&amp;nbsp; I use PowerShell to tear down and build up my development environment, and I use the same approach to make changes to production servers.&amp;nbsp; In a future post, I will provide a sample, but essentially, I create a script that takes an environment-specific XML configuration file as a parameter.&amp;nbsp; For example: &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Provision-Farm.ps1 johnpowell.development.xml&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;If you are lucky and brilliant enough to have a naming convention in place before the farm has been configured, it is much easier to implement the database naming convention.&amp;nbsp; Implementing a standard after the fact will require additional steps.&amp;nbsp; So let’s suppose you just installed the SharePoint bits and are ready to configure SharePoint.&amp;nbsp; Stop!&amp;nbsp; Rather than use the GUI, use PSConfig from the command line.&amp;nbsp; This enables you to control the Central Administration content database name.&amp;nbsp; For example, to create the configuration and CA database, use the following command:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;psconfig.exe -cmd configdb -create –server sqlcluster.aw.com -database&lt;/STRONG&gt;&amp;nbsp;&lt;STRONG&gt;SharePoint_AWIntranet_Config -user svc-sp-aw-farm -password &lt;/STRONG&gt;&lt;A href="mailto:pass@word1" mce_href="mailto:pass@word1"&gt;&lt;STRONG&gt;pass@word1&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt; -admincontentdatabase SharePoint_AWIntranet_Content_CA&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;But what if you have an existing farm?&amp;nbsp; In that case, &lt;A href="http://blogs.msdn.com/sgoodyear/archive/2007/12/09/renaming-the-sharepoint-central-administration-content-database-sharepoint-admincontent.aspx" target=_blank mce_href="http://blogs.msdn.com/sgoodyear/archive/2007/12/09/renaming-the-sharepoint-central-administration-content-database-sharepoint-admincontent.aspx"&gt;this post&lt;/A&gt; describes how to rename the Central Administration content database and &lt;A href="http://blogs.technet.com/wbaer/archive/2008/06/16/renaming-content-databases.aspx" target=_blank mce_href="http://blogs.technet.com/wbaer/archive/2008/06/16/renaming-content-databases.aspx"&gt;this post&lt;/A&gt; outlines the procedure for renaming other content databases.&lt;/P&gt;
&lt;H3&gt;Conclusion&lt;/H3&gt;
&lt;P&gt;It is good practice to have a database naming convention, and to define and document it during the planning phase.&amp;nbsp; Although the SharePoint administrative interfaces do not enforce a database naming convention, with a little planning and governance you can implement a standard.&amp;nbsp; Once a standard is defined, scripting configuration changes is the best way to ensure they are implemented consistently.&amp;nbsp; For example, you could have a script &lt;EM&gt;Create-WebApplication.ps1&lt;/EM&gt; that takes a few parameters and implements your naming convention.&amp;nbsp; SharePoint 2010 has &lt;EM&gt;significantly&lt;/EM&gt; more databases that 2007, making database naming even more important.&amp;nbsp; So here are your “go dos:”&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Define and document a database naming standard&lt;/LI&gt;
&lt;LI&gt;Create scripts to implement your standards&lt;/LI&gt;
&lt;LI&gt;Evaluate existing farms against your standards, and create a plan to rename them&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9937058" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/WSS/default.aspx">WSS</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/WSS3/default.aspx">WSS3</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/SharePoint+2007/default.aspx">SharePoint 2007</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/sharepoint+2010/default.aspx">sharepoint 2010</category></item><item><title>SharePoint 2010 Localization with Visual Studio 2010</title><link>http://blogs.msdn.com/johnwpowell/archive/2009/11/29/sharepoint-2010-localization-with-visual-studio-2010.aspx</link><pubDate>Sun, 29 Nov 2009 02:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9929740</guid><dc:creator>johnwpowell</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/johnwpowell/comments/9929740.aspx</comments><wfw:commentRss>http://blogs.msdn.com/johnwpowell/commentrss.aspx?PostID=9929740</wfw:commentRss><description>&lt;P&gt;In this walkthrough, I’ll show you how to create a SharePoint 2010 localized feature using Visual Studio 2010.&amp;nbsp; The basic mechanics of localizing a SharePoint 2010 feature are the same as localizing a SharePoint 2007 feature, and is well documented.&amp;nbsp; If you are unfamiliar with localization in SharePoint, please see Additional Resources at the end of this article.&amp;nbsp; In a nutshell, localized resources are stored in Resources (.resx) files, and in SharePoint exist in one of the following locations:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;\14\Template\Features\&amp;lt;Feature Name&amp;gt;\Resources\ &lt;/LI&gt;
&lt;LI&gt;\14\Resources\ &lt;/LI&gt;
&lt;LI&gt;\14\Config\Resources\ &lt;/LI&gt;
&lt;LI&gt;&amp;lt;Virtual Directory&amp;gt;\App_GlobalResources\ (note: resources files from \14\Config\Resources are copied here when provisioned) &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Resources files follow a naming convention that consists of a base name such as “HelloLocalization.resx” and culture-specific resources such as “HelloLocalization.es-ES.resx.”&amp;nbsp; In SharePoint, these files must be in a particular location depending on usage.&amp;nbsp; In this walkthrough, I’ll show you how to create a “centralized” resources files that will be stored in 14\Resources.&amp;nbsp; My preference is to store custom files in as few locations as possible within the SharePoint hive.&amp;nbsp; I have also found that certain resources cannot be accessed from certain locations.&amp;nbsp; So with that in mind, let’s get started:&lt;/P&gt;
&lt;P&gt;Since we are deploying to 14\Resources, we need to add a mapped folder.&amp;nbsp; Select &lt;EM&gt;Add &amp;gt; SharePoint Mapped Folder…&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_2.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/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/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb.png" width=538 height=500 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Select the &lt;EM&gt;Resources&lt;/EM&gt; folder:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_6.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_6.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/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_2.png" width=370 height=470 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_2.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;In the solution, delete the subfolder that was created in the Resources folder.&amp;nbsp; Next, right-click on the mapped folder and select &lt;EM&gt;Add New Item&lt;/EM&gt;.&amp;nbsp; In the&lt;EM&gt; Search Installed Templates&lt;/EM&gt; search box, type &lt;EM&gt;Resources&lt;/EM&gt; to select the Resources file template.&amp;nbsp; Rename the resources file to something unique to your feature:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_16.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_16.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/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_7.png" width=244 height=173 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_7.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Set the &lt;EM&gt;Build Action&lt;/EM&gt; to &lt;EM&gt;Content&lt;/EM&gt; for the resources file:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_18.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_18.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/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_8.png" width=642 height=226 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_8.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Add your localized strings to the resource file:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_20.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_20.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/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_9.png" width=494 height=167 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_9.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;For each feature, set the &lt;EM&gt;Default Resource File&lt;/EM&gt; to the resource file name.&amp;nbsp; This enables you to reference a resource without fully qualifying it:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_10.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_10.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/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_4.png" width=615 height=123 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_4.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Optional: you can hide a feature when localized resources are not available for it by setting the &lt;EM&gt;Require Resources&lt;/EM&gt; setting to &lt;EM&gt;True&lt;/EM&gt;:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_28.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_28.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/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_13.png" width=474 height=101 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_13.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Now you can use the localized strings throughout your feature such as in the feature title and description:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_24.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_24.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/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_11.png" width=660 height=424 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_11.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;When deployed, the feature appears like this in Site Collection Features:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_26.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_26.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/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_12.png" width=303 height=59 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_12.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;The resources can also be used in the .webpart file:&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;?&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;xml &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;version&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;1.0&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;encoding&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;utf-8&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;?&amp;gt; &lt;BR&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;webParts&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt; &lt;BR&gt;&amp;nbsp; &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;webPart &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;xmlns&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;http://schemas.microsoft.com/WebPart/v3&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;metaData&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;type &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;HelloLocalization.LocalizedWebPart.LocalizedWebPart, $SharePoint.Project.AssemblyFullName$&lt;/SPAN&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;importErrorMessage&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;$Resources:core,ImportErrorMessage;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;importErrorMessage&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;metaData&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;data&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;properties&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Title&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;$Resources:HelloLocalization,WebPartTitle&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;property&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Description&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;$Resources:HelloLocalization,WebPartDescription&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;property&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;properties&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;data&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt; &lt;BR&gt;&amp;nbsp; &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;webPart&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt; &lt;BR&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;webParts&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt; &lt;BR&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;Which appears like this in the Web Part Gallery:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_34.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_34.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/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_16.png" width=624 height=225 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_16.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;When you add the web part to a page, it appears like this:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_36.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_36.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/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_17.png" width=660 height=247 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_17.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;The localized resources can also be used in the web part:&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;protected void &lt;/SPAN&gt;Page_Load(&lt;SPAN style="COLOR: blue"&gt;object &lt;/SPAN&gt;sender, &lt;SPAN style="COLOR: #2b91af"&gt;EventArgs &lt;/SPAN&gt;e)
{
    &lt;SPAN style="COLOR: blue"&gt;var &lt;/SPAN&gt;lang = &lt;SPAN style="COLOR: #2b91af"&gt;SPContext&lt;/SPAN&gt;.Current.Web != &lt;SPAN style="COLOR: blue"&gt;null &lt;/SPAN&gt;? &lt;SPAN style="COLOR: #2b91af"&gt;SPContext&lt;/SPAN&gt;.Current.Web.Language : &lt;SPAN style="COLOR: brown"&gt;1033&lt;/SPAN&gt;;
    webPartMessage.Text = &lt;SPAN style="COLOR: #2b91af"&gt;SPUtility&lt;/SPAN&gt;.GetLocalizedString(
        &lt;SPAN style="COLOR: #a31515"&gt;"$Resources:WebPartMessage"&lt;/SPAN&gt;, 
        &lt;SPAN style="COLOR: #a31515"&gt;"HelloLocalization"&lt;/SPAN&gt;, 
        lang);

}&lt;/PRE&gt;
&lt;P&gt;Which appears like this when added to a page:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_38.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_38.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/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_18.png" width=288 height=72 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_18.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;To support a different culture, copy the resources file, and rename it to [ResourcesFileName].[Culture].resx.&amp;nbsp; For example, to create a Spanish (Spain) resources file:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_44.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_44.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/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_21.png" width=249 height=188 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_21.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Make the culture-specific changes to the resources strings:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_42.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_42.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/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_20.png" width=430 height=149 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_20.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;If the language pack is installed&lt;/STRONG&gt; on the SharePoint server, and&lt;STRONG&gt; the site has been created using that language&lt;/STRONG&gt;, the resources file will be used:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_46.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_46.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/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_22.png" width=303 height=80 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_22.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_48.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_48.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/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_23.png" width=660 height=208 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_23.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_50.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_50.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/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_24.png" width=270 height=76 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_24.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;For completeness, you should also be aware of the Visual Studio 2010 Feature Resources feature.&amp;nbsp; When you select &lt;EM&gt;Add Feature Resource...&lt;/EM&gt;:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_30.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_30.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/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_14.png" width=433 height=287 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_14.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;you are prompted for the culture, and the appropriately named resource file is created automatically:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_32.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_32.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/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_15.png" width=370 height=153 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SharePoint2010LocalizationwithVisualStud_103D3/image_thumb_15.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;H3&gt;Conclusion&lt;/H3&gt;
&lt;P&gt;In this walkthrough, I showed you how to localize a SharePoint 2010 feature.&amp;nbsp; Even if you aren’t targeting multiple languages, in my opinion it’s good practice to store resources outside of your compiled code.&amp;nbsp; I hope you found this useful, and your feedback is welcomed!&lt;/P&gt;
&lt;H3&gt;Additional Resources&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/michael_yeager/archive/2008/02/05/sharepoint-v3-localized-resources.aspx" target=_blank mce_href="http://blogs.msdn.com/michael_yeager/archive/2008/02/05/sharepoint-v3-localized-resources.aspx"&gt;SharePoint v3 Localized Resources&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://www.intranetjournal.com/articles/200702/ij_02_16_07a.html" target=_blank mce_href="http://www.intranetjournal.com/articles/200702/ij_02_16_07a.html"&gt;SharePoint Localization Tips and Tricks&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/maximeb/archive/2008/04/26/deploying-resource-files-across-a-farm.aspx" target=_blank mce_href="http://blogs.msdn.com/maximeb/archive/2008/04/26/deploying-resource-files-across-a-farm.aspx"&gt;Deploying resource files across a farm&lt;/A&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9929740" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/sharepoint+2010/default.aspx">sharepoint 2010</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/Visual+Studio+2010/default.aspx">Visual Studio 2010</category></item><item><title>Enable the Developer Dashboard using the Object Model / Powershell</title><link>http://blogs.msdn.com/johnwpowell/archive/2009/11/22/enable-the-developer-dashboard-using-the-object-model-powershell.aspx</link><pubDate>Sun, 22 Nov 2009 23:05:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9927029</guid><dc:creator>johnwpowell</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/johnwpowell/comments/9927029.aspx</comments><wfw:commentRss>http://blogs.msdn.com/johnwpowell/commentrss.aspx?PostID=9927029</wfw:commentRss><description>&lt;P&gt;The SharePoint 2010 developer dashboard has three display levels (see &lt;A href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spdeveloperdashboardlevel(office.14).aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spdeveloperdashboardlevel(office.14).aspx"&gt;SPDeveloperDashboardLevel Enumeration&lt;/A&gt;.):&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Off&lt;/STRONG&gt; (default): The dashboard is not displayed, and there&amp;nbsp;is no UI element to turn it on&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;On&lt;/STRONG&gt;: The dashboard is displayed, and there&amp;nbsp;is no UI element to turn it off:&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/EnabletheDeveloperDashboardusingtheObjec_FE57/1_2.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/EnabletheDeveloperDashboardusingtheObjec_FE57/1_2.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=1 border=0 alt=1 src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/EnabletheDeveloperDashboardusingtheObjec_FE57/1_thumb.png" width=660 height=435 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/EnabletheDeveloperDashboardusingtheObjec_FE57/1_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;OnDemand&lt;/STRONG&gt;: A UI element enables you to turn it on or off&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/EnabletheDeveloperDashboardusingtheObjec_FE57/2_2.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/EnabletheDeveloperDashboardusingtheObjec_FE57/2_2.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=2 border=0 alt=2 src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/EnabletheDeveloperDashboardusingtheObjec_FE57/2_thumb.png" width=514 height=500 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/EnabletheDeveloperDashboardusingtheObjec_FE57/2_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;There are a few ways to set the developer dashboard level.&amp;nbsp; One option is to use stsadm –o setproperty –pn developer-dashboard –pv “On”, but in this article, I’ll show you how to control the dashboard through the object model using PowerShell.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;To configure the dashboard, use the &lt;A href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spwebservice.contentservice(office.14).aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spwebservice.contentservice(office.14).aspx"&gt;SPWebService.ContentService&lt;/A&gt; object to set properties on the &lt;A href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spdeveloperdashboardsettings_members(office.14).aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spdeveloperdashboardsettings_members(office.14).aspx"&gt;SPDeveloperDashboardSettings&lt;/A&gt; class.&amp;nbsp; Here is the PowerShell script to set the level:&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="COLOR: blue"&gt;param&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR: purple"&gt;$level &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;= &lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;$(&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;throw &lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;"level is required.&amp;nbsp; Level is On, Off or OnDemand"&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;)) &lt;BR&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;# import assemblies &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;[&lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;void&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;][&lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;System.Reflection.Assembly&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;]::&lt;/SPAN&gt;&lt;SPAN style="COLOR: #8b4513"&gt;LoadWithPartialName&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;"Microsoft.SharePoint"&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;) &lt;BR&gt;[&lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;void&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;][&lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;System.Reflection.Assembly&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;]::&lt;/SPAN&gt;&lt;SPAN style="COLOR: #8b4513"&gt;LoadWithPartialName&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;"Microsoft.SharePoint.Administration"&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;) &lt;BR&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;# set the level &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: purple"&gt;$contentService &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;= &lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;[&lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;Microsoft.SharePoint.Administration.SPWebService&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;]::&lt;/SPAN&gt;&lt;SPAN style="COLOR: #8b4513"&gt;ContentService &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: purple"&gt;$contentService&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #8b4513"&gt;DeveloperDashboardSettings&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #8b4513"&gt;DisplayLevel &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;= &lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;([&lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;Enum&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;]::&lt;/SPAN&gt;&lt;SPAN style="COLOR: #8b4513"&gt;Parse&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;([&lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;], &lt;/SPAN&gt;&lt;SPAN style="COLOR: purple"&gt;$level&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;)) &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: purple"&gt;$contentService&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #8b4513"&gt;DeveloperDashboardSettings&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #8b4513"&gt;Update&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;() &lt;BR&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #5f9ea0"&gt;Write-Host &lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;"Developer Dashboard Level: " &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;+ &lt;/SPAN&gt;&lt;SPAN style="COLOR: purple"&gt;$contentService&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #8b4513"&gt;DeveloperDashboardSettings&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #8b4513"&gt;DisplayLevel&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;Here is a complimentary script to view the current settings:&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: green"&gt;# import assemblies
&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;[&lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;void&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;][&lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;System.Reflection.Assembly&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;]::&lt;/SPAN&gt;&lt;SPAN style="COLOR: #8b4513"&gt;LoadWithPartialName&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;"Microsoft.SharePoint"&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;)
[&lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;void&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;][&lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;System.Reflection.Assembly&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;]::&lt;/SPAN&gt;&lt;SPAN style="COLOR: #8b4513"&gt;LoadWithPartialName&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;"Microsoft.SharePoint.Administration"&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;)

&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;# get the level
&lt;/SPAN&gt;&lt;SPAN style="COLOR: purple"&gt;$contentService &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;= &lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;[&lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;Microsoft.SharePoint.Administration.SPWebService&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;]::&lt;/SPAN&gt;&lt;SPAN style="COLOR: #8b4513"&gt;ContentService
&lt;/SPAN&gt;&lt;SPAN style="COLOR: #5f9ea0"&gt;Write-Host &lt;/SPAN&gt;&lt;SPAN style="COLOR: purple"&gt;$contentService&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #8b4513"&gt;DeveloperDashboardSettings&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #8b4513"&gt;DisplayLevel&lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9927029" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/sharepoint+2010/default.aspx">sharepoint 2010</category></item><item><title>Visual Studio Extensions for Windows SharePoint Services (VSEWSS) Error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information</title><link>http://blogs.msdn.com/johnwpowell/archive/2009/08/16/visual-studio-extensions-for-windows-sharepoint-services-vsewss-error-unable-to-load-one-or-more-of-the-requested-types-retrieve-the-loaderexceptions-property-for-more-information.aspx</link><pubDate>Sun, 16 Aug 2009 17:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9871640</guid><dc:creator>johnwpowell</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/johnwpowell/comments/9871640.aspx</comments><wfw:commentRss>http://blogs.msdn.com/johnwpowell/commentrss.aspx?PostID=9871640</wfw:commentRss><description>&lt;P&gt;One error you may see when packaging solutions with VSEWSS is:&amp;nbsp; &lt;EM&gt;Microsoft.SharePoint.Tools.Utilities.VSeWSSServiceException VSeWSS Service Error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.&amp;nbsp; &lt;/EM&gt;Like most error messages from VSEWSS, there is not enough information provided to resolve the issue, so I hope to save you some time by providing a workaround that will permanently fix this problem.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;When VSEWSS packages your solution, it uses reflection to enumerate the packaged assemblies.&amp;nbsp; It works fine until it encounters an assembly that implements an interface that is defined in another assembly as is often the case in the Microsoft.Practices.* assemblies.&amp;nbsp; I am unsure of exactly why, but the extensions are unable to resolve the dependent assemblies.&amp;nbsp; To work around the issue, you can copy the dependent assemblies to the GAC, but I don’t think this is the optimal solution and doing so will cause pain during development and debugging.&amp;nbsp; Another option is to copy the dependent assemblies to the VSEWSS service bin directory post build.&amp;nbsp; After trying this for awhile, and maintaining the script, I decided it would be much simpler to just copy all assemblies in my solution to the VSEWSS service bin directory on post build.&amp;nbsp; Here is the script:&lt;/P&gt;&lt;PRE class=csharpcode&gt;@&lt;SPAN class=kwrd&gt;rem&lt;/SPAN&gt;======================================================================
@&lt;SPAN class=rem&gt;rem&lt;/SPAN&gt;
@&lt;SPAN class=rem&gt;rem    This script copies assemblies to the VSEWSS bin directory&lt;/SPAN&gt;
@&lt;SPAN class=rem&gt;rem    to eliminate the packaging type load exception that occurs&lt;/SPAN&gt;
@&lt;SPAN class=rem&gt;rem    when an interface is defined in a separate assembly.&lt;/SPAN&gt;
@&lt;SPAN class=rem&gt;rem    &lt;/SPAN&gt;
@&lt;SPAN class=rem&gt;rem    usage call $(ProjectDir)Scripts/CopyAssembliesToVSEWSSBin.bat $(TargetDir)&lt;/SPAN&gt;
@&lt;SPAN class=rem&gt;rem&lt;/SPAN&gt;
@&lt;SPAN class=kwrd&gt;rem&lt;/SPAN&gt;======================================================================

@echo off

@echo ========== Locating VSEWSS bin directory ==========
@&lt;SPAN class=kwrd&gt;set&lt;/SPAN&gt; vsewssbin=%programfiles%\Microsoft SharePoint Developer Tools 9.0\svc\bin
&lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;not&lt;/SPAN&gt; exist &lt;SPAN class=str&gt;"%vsewssbin%"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;set&lt;/SPAN&gt; vsewssbin=%ProgramW6432%\Microsoft SharePoint Developer Tools 9.0\svc\bin
@echo VSEWSS bin: %vsewssbin%

@echo ========== Copying assemblies &lt;SPAN class=kwrd&gt;to&lt;/SPAN&gt; VSEWSS bin directory ==========
@xcopy &lt;SPAN class=str&gt;"%1*.dll"&lt;/SPAN&gt; &lt;SPAN class=str&gt;"%vsewssbin%"&lt;/SPAN&gt; /R /Y

&lt;/PRE&gt;
&lt;P&gt;To use the script, create a bat file in your project and call it from a post build event. It does take 64-bit installations into account, and it will also work on your Team Build server.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9871640" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/SharePoint+2007/default.aspx">SharePoint 2007</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/Team+Build/default.aspx">Team Build</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/VSEWSS+1.3/default.aspx">VSEWSS 1.3</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/visual+studio+extensions/default.aspx">visual studio extensions</category></item><item><title>Subscribe to SharePoint Web Parts using Internet Explorer 8 Web Slices</title><link>http://blogs.msdn.com/johnwpowell/archive/2009/02/01/subscribe-to-sharepoint-web-parts-using-internet-explorer-8-web-slices.aspx</link><pubDate>Mon, 02 Feb 2009 00:34:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9388724</guid><dc:creator>johnwpowell</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/johnwpowell/comments/9388724.aspx</comments><wfw:commentRss>http://blogs.msdn.com/johnwpowell/commentrss.aspx?PostID=9388724</wfw:commentRss><description>&lt;P&gt;One of the new features of Internet Explorer 8 is &lt;EM&gt;Web Slices.&amp;nbsp; &lt;/EM&gt;This feature enables you to subscribe to a &lt;EM&gt;section&lt;/EM&gt; of a web page and notifies you when the content changes.&amp;nbsp; By design, SharePoint Web Parts are a natural fit for this feature, and in this article I’ll show you how to build a Web Part that does just that.&amp;nbsp; I’ll also show you how easy it is to develop a web part using the CTP release of Visual Studio 2008 Extensions for Windows SharePoint Services (VSSWse) 1.3.&lt;/P&gt;
&lt;H3&gt;About Web Slices&lt;/H3&gt;
&lt;P&gt;Web Slices enable you to have a very narrow control over the content you subscribe to.&amp;nbsp; When you browse a page that has Web Slice sections, they “light up” when you hover over them:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_2.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/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/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_thumb.png" width=344 height=68 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;In addition, the new Web Slice icon on the toolbar lights up, and the menu is populated with all the slices on the page:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_4.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/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/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_thumb_1.png" width=198 height=59 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_thumb_1.png"&gt;&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;When you subscribe to a slice, the web page section is added to the toolbar and is periodically refreshed.&amp;nbsp; The refresh interval is completely customizable and can also be refreshed manually:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_6.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_6.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/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_thumb_2.png" width=426 height=297 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_thumb_2.png"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Defining a Web Slice Section&lt;/H3&gt;
&lt;P&gt;Web Slices are defined with HTML tags that have certain CSS classes.&amp;nbsp; You can read the &lt;A href="http://msdn.microsoft.com/en-us/library/cc304073%28VS.85%29.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/cc304073%28VS.85%29.aspx"&gt;full specification&lt;/A&gt;, but here’s all you need to know to build your first Web Slice:&lt;/P&gt;
&lt;P&gt;To define a Web Slice section, use the &lt;EM&gt;hslice&lt;/EM&gt; class name:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;lt;div class="hslice" id="1"&amp;gt;…&amp;lt;/div&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;To define the slice title, use the &lt;EM&gt;entry-title&lt;/EM&gt; class name:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;lt;p class="entry-title"&amp;gt;Game System - $66.00&amp;lt;/p&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;To define the slice content, use the &lt;EM&gt;entry-content&lt;/EM&gt; class name:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;lt;div class="entry-content"&amp;gt;This auction closes in 4 hours.&amp;lt;/div&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The end result looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;&amp;lt;div class="hslice" id="1"&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;p class="entry-title"&amp;gt;Game System - $66.00&amp;lt;/p&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div class="entry-content"&amp;gt;This auction closes in 4 hours.&amp;lt;/div&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;lt;/div&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;H3&gt;Build a SharePoint Web Part&lt;/H3&gt;
&lt;P&gt;For this example, I’m using VSSWSE 1.3 which you can read about &lt;A href="http://blogs.msdn.com/sharepoint/archive/2009/01/12/announcing-community-technology-preview-of-visual-studio-2008-extensions-for-sharepoint-v1-3.aspx" target=_blank mce_href="http://blogs.msdn.com/sharepoint/archive/2009/01/12/announcing-community-technology-preview-of-visual-studio-2008-extensions-for-sharepoint-v1-3.aspx"&gt;here&lt;/A&gt;.&amp;nbsp; I would recommend it not only because it’s easy to use, but also because it is sure to become the de-facto standard.&amp;nbsp; To get started, create a new Web Part project:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_8.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_8.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/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_thumb_3.png" width=616 height=442 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_thumb_3.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Choose if you want to deploy to the GAC or bin directory.&amp;nbsp; We’ll use GAC for this example:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_10.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_10.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/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_thumb_4.png" width=362 height=215 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_thumb_4.png"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A solution is created with a default web part named WebPart1.&amp;nbsp; Rather than renaming it, delete the WebPart1 folder and add a new Web Part to the project with a more descriptive name:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_12.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_12.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/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_thumb_5.png" width=616 height=373 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_thumb_5.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Next, configure the url of your SharePoint site you want to use to test the Web Part.&amp;nbsp; On the Debug settings, set the start url:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_20.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_20.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_thumb_9.png" width=615 height=113 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_thumb_9.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;In the Web Part, override the CreateChildControls method:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_16.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_16.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/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_thumb_7.png" width=616 height=363 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_thumb_7.png"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This code generates the needed HTML and is pretty self-explanatory.&amp;nbsp; I chose to hide the Web Slice entry-title as it would be redundant beneath the Web Part title.&amp;nbsp; To test the code, right-click the solution or project and select Deploy.&amp;nbsp; This will package the Web Part as a feature and deploy and activate it on the site:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_22.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_22.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_thumb_10.png" width=392 height=169 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_thumb_10.png"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next, add the Web Part to a page in the site and test it.&lt;/P&gt;
&lt;H3&gt;How I Wished It Worked&lt;/H3&gt;
&lt;P&gt;Web Slices are powerful, but I don’t really want to develop a bunch of new Web Parts to use that feature.&amp;nbsp; I wish every Web Part were capable of wrapping its content in a Web Slice div tag.&amp;nbsp; I’m sure there is a way to inject this functionality (and there might even be a supported method), but I wish it were built in to the Web Part framework.&amp;nbsp; Every Web Part could then have a Web Slice category with relevant settings:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_18.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_18.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/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_thumb_8.png" width=237 height=219 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/cb2a34ee5175_A8A8/image_thumb_8.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Wouldn’t that be powerful?&lt;/P&gt;
&lt;H3&gt;Summary&lt;/H3&gt;
&lt;P&gt;In this article, I demonstrated how to build a Web Part that users can subscribe to using Web Slices.&amp;nbsp; I also showed you how easy it is to build a Web Part using the CTP release of Visual Studio 2008 Extensions for Windows SharePoint Services version 1.3.&amp;nbsp; Happy slicing!&lt;/P&gt;
&lt;H3&gt;References and Additional Reading&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://www.microsoft.com/windows/internet-explorer/download-ie.aspx" target=_blank&gt;Internet Explorer 8 Download&lt;/A&gt; 
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/cc196992(VS.85).aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/cc196992(VS.85).aspx"&gt;Subscribing to Content with Web Slices&lt;/A&gt; 
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/cc304073%28VS.85%29.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/cc304073%28VS.85%29.aspx"&gt;Web Slice Format Specification&lt;/A&gt; 
&lt;LI&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?familyid=4A7F2178-DB7E-4325-98B5-15FA725708E2&amp;amp;displaylang=en" target=_blank mce_href="http://www.microsoft.com/downloads/details.aspx?familyid=4A7F2178-DB7E-4325-98B5-15FA725708E2&amp;amp;displaylang=en"&gt;Web Slice Icon and Guidelines&lt;/A&gt; 
&lt;LI&gt;&lt;A href="http://www.microsoft.com/windows/internet-explorer/beta/videos.aspx?vindex=3" target=_blank mce_href="http://www.microsoft.com/windows/internet-explorer/beta/videos.aspx?vindex=3"&gt;Internet Explorer 8 Videos : Web Slices&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9388724" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/.Net/default.aspx">.Net</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/WSS/default.aspx">WSS</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/WSS3/default.aspx">WSS3</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/Windows+SharePoint+Services/default.aspx">Windows SharePoint Services</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/MOSS/default.aspx">MOSS</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/SharePoint+2007/default.aspx">SharePoint 2007</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>How to Copy an Assembly From the GAC to the File System</title><link>http://blogs.msdn.com/johnwpowell/archive/2009/01/14/how-to-copy-an-assembly-from-the-gac.aspx</link><pubDate>Wed, 14 Jan 2009 04:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9317728</guid><dc:creator>johnwpowell</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.msdn.com/johnwpowell/comments/9317728.aspx</comments><wfw:commentRss>http://blogs.msdn.com/johnwpowell/commentrss.aspx?PostID=9317728</wfw:commentRss><description>&lt;P&gt;Sometimes you need a local copy of an assembly from the GAC and here is a quick tip on how to do it.&amp;nbsp; The GAC can be found in the c:\windows\assembly directory, but if you try to browse it, the following custom shell extension appears:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_2.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_2.png"&gt;&lt;IMG height=462 alt=image src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_thumb.png" width=616 border=0 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;This view does not provide the ability to copy assemblies, but it does provide some very useful information such as the strong name details.&amp;nbsp; Here are some options to get around that feature to copy an assembly from the GAC.&lt;/P&gt;
&lt;H3&gt;Option 1: Disable the Shell Extension in the Registry&lt;/H3&gt;
&lt;P&gt;One possibility, but not the best one, is to disable the shell extension.&amp;nbsp; I don't like this approach because it involves editing the registry and I like the information provided by the shell extension.&amp;nbsp; Here's how to disable the extension if you want to.&amp;nbsp; Open the registry editor and add/set the HKLM\Software\Microsoft\Fusion\DisableCacheViewer DWORD value:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_4.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_4.png"&gt;&lt;IMG height=137 alt=image src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_thumb_1.png" width=616 border=0 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Set the value to 1:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_6.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_6.png"&gt;&lt;IMG height=192 alt=image src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_thumb_2.png" width=324 border=0 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_thumb_2.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Once you make that change, you can browse the directory:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_8.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_8.png"&gt;&lt;IMG height=231 alt=image src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_thumb_3.png" width=616 border=0 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_thumb_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Option 2: Go Command-O&lt;/H3&gt;
&lt;P&gt;Another option is to copy assemblies from the GAC from the command line.&amp;nbsp; This approach works well if you prefer working from the command line, but if you like to right-click with a mouse, this might not be the choice for you. &lt;/P&gt;
&lt;P&gt;I highly recommend PowerShell, but you can use Windows Command Prompt.&amp;nbsp; Find your way to the c:\windows\assembly directory and copy the file you need:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_10.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_10.png"&gt;&lt;IMG height=141 alt=image src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_thumb_4.png" width=640 border=0 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_thumb_4.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;H3&gt;Option 3: Use the SUBST Command&lt;/H3&gt;
&lt;P&gt;The SUBST command allows you to create a shortcut to a path on your file system and assigns that shortcut a drive letter.&amp;nbsp; I really like this approach because you have the option of using Windows Explorer without having to disable the shell.&lt;/P&gt;
&lt;P&gt;Suppose you want to create a G Drive (G for GAC), use the following command: SUBST G: C:\WINDOWS\ASSEMBLY&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_12.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_12.png"&gt;&lt;IMG height=53 alt=image src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_thumb_5.png" width=640 border=0 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_thumb_5.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Then in Windows Explorer you are free to double-click and right-click to your heart's content and still use the shell extension.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_14.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_14.png"&gt;&lt;IMG height=277 alt=image src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_thumb_6.png" width=616 border=0 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/HowtoCopyanAssemblyFromtheGAC_117F8/image_thumb_6.png"&gt;&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9317728" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/.Net/default.aspx">.Net</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/PowerShell/default.aspx">PowerShell</category></item><item><title>Search SharePoint from the Internet Explorer Toolbar Using a Custom Search Provider</title><link>http://blogs.msdn.com/johnwpowell/archive/2008/07/08/search-sharepoint-from-the-internet-explorer-toolbar-using-a-custom-search-provider.aspx</link><pubDate>Tue, 08 Jul 2008 21:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8709253</guid><dc:creator>johnwpowell</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/johnwpowell/comments/8709253.aspx</comments><wfw:commentRss>http://blogs.msdn.com/johnwpowell/commentrss.aspx?PostID=8709253</wfw:commentRss><description>&lt;P mce_keep="true"&gt;Here is an easy way to search a SharePoint site from the IE toolbar without having to develop a custom add-in.&amp;nbsp; Before showing you how to implement it, let's examine how custom search providers work.&lt;/P&gt;
&lt;H3&gt;How Custom Search Providers Work&lt;/H3&gt;
&lt;P mce_keep="true"&gt;When you browse to an Open Search enabled site in IE 7, the search provider drop down lights up&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_22.png" mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_22.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=53 alt="Provider Light Up" src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_thumb_10.png" width=247 border=0 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_thumb_10.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;You can use a search provider temporarily while on the site (the yellow star indicates it's temporary), or permanently add it to your list of search providers&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_24.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_24.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=151 alt="Temporary Search Provider" src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_thumb_11.png" width=236 border=0 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_thumb_11.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;To temporarily use a search provider, click the provider name and the search box will change&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_18.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_18.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=71 alt="Temporary Search Provider" src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_thumb_8.png" width=236 border=0 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_thumb_8.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;To permanently add a search provider, click &lt;EM&gt;Add Search Providers &lt;/EM&gt;and select the provider name&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_26.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_26.png"&gt;&lt;IMG height=151 alt="Add Search Provider" src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_thumb_12.png" width=393 border=0 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_thumb_12.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;A confirmation dialog appears&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_28.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_28.png"&gt;&lt;IMG height=148 alt=Confirmation src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_thumb_13.png" width=240 border=0 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_thumb_13.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;After that, your custom search provider will remain in the list (note there is no yellow star) no matter which site you are currently on&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_30.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_30.png"&gt;&lt;IMG height=133 alt="Search Provider" src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_thumb_14.png" width=236 border=0 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_thumb_14.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;When the users searches from the search box, they are taken to the SharePoint search results page&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_32.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_32.png"&gt;&lt;IMG height=256 alt="Search Results" src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_thumb_15.png" width=640 border=0 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_thumb_15.png"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;How to Implement A Custom Search Provider in SharePoint&lt;/H3&gt;
&lt;P mce_keep="true"&gt;To implement a custom search provider, create an XML file that describes it and place a link to the file on the site home page.&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;Let's create the search provider XML file.&amp;nbsp; The XML is self-explanatory, with the key element being the Url.&amp;nbsp; There is a special token: {searchTerms} that will be replaced with the text the user types in the search box.&amp;nbsp; Note that the Url is absolute and will be different if you are using the MOSS Search Center (searchcenter/Pages/Results.aspx?k={searchTerms})&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_20.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_20.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=155 alt="Search Provider XML" src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_thumb_9.png" width=675 border=0 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_thumb_9.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Upload the XML file to the &lt;EM&gt;Shared Documents&lt;/EM&gt; library&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_36.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_36.png"&gt;&lt;IMG height=312 alt=image src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_thumb_17.png" width=892 border=0 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_thumb_17.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;Place a link tag in the home page of your site.&amp;nbsp; You can put it anywhere in the page, but put it in the &amp;lt;head&amp;gt; element if possible.&amp;nbsp; The simplest approach is to use a &lt;EM&gt;Content Editor&lt;/EM&gt; web part with the &lt;EM&gt;Chrome Type&lt;/EM&gt; set to &lt;EM&gt;None&lt;/EM&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_34.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_34.png"&gt;&lt;IMG height=67 alt=image src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_thumb_16.png" width=477 border=0 mce_src="http://blogs.msdn.com/blogfiles/johnwpowell/WindowsLiveWriter/SearchSharePointfromtheInternetExplorerT_BCB1/image_thumb_16.png"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;That's all there is to it!&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Summary&lt;/H3&gt;
&lt;P mce_keep="true"&gt;As you can see, implementing a custom search provider for SharePoint is simpler than a single-colored Rubix Cube.&amp;nbsp; If you would like to learn more about Open Search, the full specifications are available here: &lt;A href="http://www.opensearch.org/Specifications/OpenSearch/1.1#OpenSearch_description_document" target=_blank mce_href="http://www.opensearch.org/Specifications/OpenSearch/1.1#OpenSearch_description_document"&gt;http://www.opensearch.org/Specifications/OpenSearch/1.1#OpenSearch_description_document&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8709253" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/Search+Provider/default.aspx">Search Provider</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/Search/default.aspx">Search</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/Open+Search/default.aspx">Open Search</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/johnwpowell/archive/tags/IE+Toolbar/default.aspx">IE Toolbar</category></item></channel></rss>