<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Rich Finn - Microsoft Office SharePoint Server</title>
    <link>http://blog.richfinn.net/blog/</link>
    <description>sharepointer</description>
    <language>en-us</language>
    <copyright>Rich Finn</copyright>
    <lastBuildDate>Wed, 13 Aug 2008 23:13:21 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>blog.richfinn.net@gmail.com</managingEditor>
    <webMaster>blog.richfinn.net@gmail.com</webMaster>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=fcf33971-919a-4086-8f53-8dd9d05d0b41</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,fcf33971-919a-4086-8f53-8dd9d05d0b41.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,fcf33971-919a-4086-8f53-8dd9d05d0b41.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=fcf33971-919a-4086-8f53-8dd9d05d0b41</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Creating Features which contain custom Content Types or file provisioning modules
requires developers to write a lot of XML based on the wss.xsd. Content types require
custom column and content type definition files, along with the proper creation of
the content type IDs. File provisioning modules require the creation of module elements
which contain the information that will help properly push the files into the correct
lists when the Feature is activated. 
</p>
        <p>
This XML can be fairly daunting, time consuming, and frankly, not very exciting for
developers who just want to test their code. This holds especially true for developers
who are writing custom Features based on SharePoint's Publishing Feature, and this
is why I created <a href="http://www.codeplex.com/SPSource" target="_blank">SPSource</a>.
</p>
        <p>
SPSource helps by alleviating the need for developers to write these files by allowing
them to use the SharePoint UI and SharePoint Designer (SPD) as the source for the
files defined in the module elements, along with custom content types, and is meant
to be integrated with (and has been tested with) WSP creation tools such as <a href="http://www.codeplex.com/wspbuilder" target="_blank">WSPBuilder</a>, <a href="http://www.codeplex.com/stsdev" target="_blank">STSDev</a>,
and the <a href="http://www.codeplex.com/wspprojecttemplate" target="_blank">WSPProjectTemplate</a> as
either part of the build process, or separately as a CMD file at the root of the project.
By using the UI and SPD, items can be created and tested rapidly, then compiled into
the WSP for deployment using familiar tools.
</p>
        <p>
Executing BEFORE the creation of the WSP, any file that can be created using SharePoint
Designer in a document library, and any site content type created in the SharePoint
UI can be targeted and pulled down into Visual Studio for addition in a pre-existing
Visual Studio WSP project. SPSource will also create the file provisioning modules
and site Content Type/Column definition files, as well as the lines needed in the
ElementManifest section of the Feature.xml file.
</p>
        <p>
Some examples of how SPSource can help:
</p>
        <ul>
          <li>
Completely define a custom Publishing Feature using SPD and the SharePoint UI, creating
the master pages, page layouts, content types, style sheets, and images directly in
the content database. Once at a point where it's ready for deployment, run SPSource
against the project and pull everything into a pre-existing WSP. If changes are needed
in the markup, make them using SPD, and re-run SPSource. The files in the WSP will
be updated and ready for a solution upgrade. 
</li>
        </ul>
        <ul>
          <li>
Implement a class on an ASPX page (code behind) in SPD, and code that class in Visual
Studio, or add custom server controls to the markup in SPD. Push your assembly directly
to the GAC or bin as part of the build process, and the code-to-test time is much
faster, as the markup files are already in the content database. Once everything is
set, run SPSource again the project, and pull everything together into the WSP. 
</li>
        </ul>
        <ul>
          <li>
Add a custom Content Query Web Part (or RSS) .webpart file to the web part gallery,
and change the properties and settings for the new CQWP via the UI and SPD to use
custom XSL files that you add to the Style Library/XSL Style Sheets folder. Create
new ItemStyles, change the Headers, or add new parameters to the Main XSL. The XSL
files can be updated quickly using SPD, and changes can be seen right away. When all
is ready for integration into the WSP, execute SPSource against the new files and
create a new Feature for the new web part in minutes. 
</li>
        </ul>
        <p>
Eventually, I hope to get SPSource working with ListInstances and Workflows, but for
right now, it only works with Content Types and Modules.
</p>
        <p>
Check out this <a href="http://video.msn.com/video.aspx?vid=84c63487-8ad6-4e72-a88e-10f39b92135d" target="_blank">screencast</a> where
I create a custom Publishing Feature, with a new content type and page layout, execute
SPSource on my StsDev Visual Studio project, package it all up in a WSP, and deploy
in less than 15 minutes!
</p>
        <p>
          <a title="SPSource Publishing Feature Demo" href="http://video.msn.com/video.aspx?vid=84c63487-8ad6-4e72-a88e-10f39b92135d" target="_new">
            <img height="84" alt="SPSource Publishing Feature Demo" src="http://img2.catalog.video.msn.com/Image.aspx?uuid=84c63487-8ad6-4e72-a88e-10f39b92135d&amp;w=112&amp;h=84" width="112" border="0" />
            <br />
SPSource Publishing Feature Demo</a>
        </p>
        <p>
Here's a short walk-through example of how SPSource works:
</p>
        <p>
In the 'design' site, create a new Content Type for a Publishing page using the SharePoint
UI, adding some new columns<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_4.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="447" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_1.png" width="517" border="0" /></a></p>
        <p>
 
</p>
        <p>
In SharePoint Designer, create a new Page Layout based on the Content Type which was
just created<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_6.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="322" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_2.png" width="450" border="0" /></a></p>
        <p>
          <br />
Still in SharePoint Designer, add the new content field controls, a web part zone,
and some other markup to the new Page Layout, saving it to the 'design' site Master
Page Gallery<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_8.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="314" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_3.png" width="573" border="0" /></a> <br /><br /><br />
Now, over in a Visual Studio project, which in this example is based on StsDev, create
a new Feature, and create some new Folders in that Feature. The folders aren't important
in this case, they just allow for some organization.  SPSource has been tested
using WSPBuilder, StsDEv, and WspProjectTemplate, but the type of project in Visual
Studio really doesn't matter. It just needs to follow the 12Hive folder structure,
which means SPSource does not work with VSEWSS.<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_10.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="125" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_4.png" width="220" border="0" /></a></p>
        <p>
In each folder, create a new file with the file extension '.spsource'.  This
file extension is important, as the SPSource utility looks for these files to work
it's magic.  The SPSource files are nothing more than a type of XML file and
are what I call 'reverse manifests' as they are based on the same syntax used to push
things into SharePoint, but in the case of SPSource, are used to get things out of
SharePoint.<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_14.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="118" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_6.png" width="253" border="0" /></a></p>
        <p>
The SPSource file for the Content Type is just like a Content Type definition file,
and is even based on the same schema. All we need is the name of the custom Content
Type we want to have included in the WSP<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_16.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="121" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_7.png" width="471" border="0" /></a></p>
        <p>
The SPSource file for the custom Page Layout is also just like a provisioning module
file used to put files into SharePoint. We just need to tell it the source list URL,
and the file to include in the WSP<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_18.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="137" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_8.png" width="466" border="0" /></a></p>
        <p>
At the root of the Visual Studio project, I've got a CMD file that contains the information
needed to execute SPSource<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_20.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="101" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_9.png" width="150" border="0" /></a><br /><br />
Source of CMD file<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_22.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="145" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_10.png" width="651" border="0" /></a><br /></p>
        <p>
After SPSource is executed, there will be some new files in your Visual Studio project.<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_24.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="219" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_11.png" width="316" border="0" /></a></p>
        <p>
In the ContentType folder, there are now files for both the Content Type definition,
as well as the column definitions.<br />
Content Type definition:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_26.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="155" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_12.png" width="696" border="0" /></a><br />
Column definition:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_28.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="117" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_13.png" width="706" border="0" /></a> <br /></p>
        <p>
The ASPX page in the PageLayouts folder is the same as what we added in SharePoint
designer<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_30.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="283" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_14.png" width="600" border="0" /></a></p>
        <p>
The pagelayouts.Provisioner.xml file is the provisioning module file needed to put
the custom Page Layout in to the correct location when the Feature is activated<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_32.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="158" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_15.png" width="707" border="0" /></a></p>
        <p>
The two *.ElementManifest.xml files are there so you have the lines needed to add
to the Feature.xml file in the ElementManfiests section.  These lines are not
automatically added to the Feature.xml as to provide greater flexibility by you to
distinguish what gets included in the Feature.<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_34.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="132" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_16.png" width="706" border="0" /></a></p>
        <p>
After I add the lines to the Feature file:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_36.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="251" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_17.png" width="619" border="0" /></a> 
</p>
        <p>
Now I can build my project to compile the WSP and deploy it to the 'development' site. 
SPSource can also be integrated with the MSBuild process to allow for updates to the
files added by SPSource before the WSP is compiled.  This allows the WSP to be
upgraded using items changed in the UI and SharePoint Designer.
</p>
        <p>
After the solution is built and deployed, the Feature can be activated, and the pages
will be added to the Master Page Gallery<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_38.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="43" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_18.png" width="601" border="0" /></a> <br /><br />
Master Page Gallery<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_40.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="25" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_19.png" width="744" border="0" /></a><br /><br />
When I create a new page, the new Page Layout is available in the list, as expected<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_42.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="138" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_20.png" width="713" border="0" /></a> <br /><br />
and, the page looks the way it should<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_44.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="278" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_21.png" width="393" border="0" /></a></p>
        <p>
Give <a href="http://www.codeplex.com/SPSource" target="_blank">SPSource</a> a try,
and see how much more efficient your Visual Studio WSP creation process can be!
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=fcf33971-919a-4086-8f53-8dd9d05d0b41" />
      </body>
      <title>Building Solutions (WSP) in Visual Studio? Say hello to SPSource...</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,fcf33971-919a-4086-8f53-8dd9d05d0b41.aspx</guid>
      <link>http://blog.richfinn.net/blog/2008/08/13/BuildingSolutionsWSPInVisualStudioSayHelloToSPSource.aspx</link>
      <pubDate>Wed, 13 Aug 2008 23:13:21 GMT</pubDate>
      <description>&lt;p&gt;
Creating Features which contain custom Content Types or file provisioning modules
requires developers to write a lot of XML based on the wss.xsd. Content types require
custom column and content type definition files, along with the proper creation of
the content type IDs. File provisioning modules require the creation of module elements
which contain the information that will help properly push the files into the correct
lists when the Feature is activated. 
&lt;/p&gt;
&lt;p&gt;
This XML can be fairly daunting, time consuming, and frankly, not very exciting for
developers who just want to test their code. This holds especially true for developers
who are writing custom Features based on SharePoint's Publishing Feature, and this
is why I created &lt;a href="http://www.codeplex.com/SPSource" target=_blank&gt;SPSource&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
SPSource helps by alleviating the need for developers to write these files by allowing
them to use the SharePoint UI and SharePoint Designer (SPD) as the source for the
files defined in the module elements, along with custom content types, and is meant
to be integrated with (and has been tested with) WSP creation tools such as &lt;a href="http://www.codeplex.com/wspbuilder" target=_blank&gt;WSPBuilder&lt;/a&gt;, &lt;a href="http://www.codeplex.com/stsdev" target=_blank&gt;STSDev&lt;/a&gt;,
and the &lt;a href="http://www.codeplex.com/wspprojecttemplate" target=_blank&gt;WSPProjectTemplate&lt;/a&gt; as
either part of the build process, or separately as a CMD file at the root of the project.
By using the UI and SPD, items can be created and tested rapidly, then compiled into
the WSP for deployment using familiar tools.
&lt;/p&gt;
&lt;p&gt;
Executing BEFORE the creation of the WSP, any file that can be created using SharePoint
Designer in a document library, and any site content type created in the SharePoint
UI can be targeted and pulled down into Visual Studio for addition in a pre-existing
Visual Studio WSP project. SPSource will also create the file provisioning modules
and site Content Type/Column definition files, as well as the lines needed in the
ElementManifest section of the Feature.xml file.
&lt;/p&gt;
&lt;p&gt;
Some examples of how SPSource can help:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Completely define a custom Publishing Feature using SPD and the SharePoint UI, creating
the master pages, page layouts, content types, style sheets, and images directly in
the content database. Once at a point where it's ready for deployment, run SPSource
against the project and pull everything into a pre-existing WSP. If changes are needed
in the markup, make them using SPD, and re-run SPSource. The files in the WSP will
be updated and ready for a solution upgrade. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
Implement a class on an ASPX page (code behind) in SPD, and code that class in Visual
Studio, or add custom server controls to the markup in SPD. Push your assembly directly
to the GAC or bin as part of the build process, and the code-to-test time is much
faster, as the markup files are already in the content database. Once everything is
set, run SPSource again the project, and pull everything together into the WSP. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
Add a custom Content Query Web Part (or RSS) .webpart file to the web part gallery,
and change the properties and settings for the new CQWP via the UI and SPD to use
custom XSL files that you add to the Style Library/XSL Style Sheets folder. Create
new ItemStyles, change the Headers, or add new parameters to the Main XSL. The XSL
files can be updated quickly using SPD, and changes can be seen right away. When all
is ready for integration into the WSP, execute SPSource against the new files and
create a new Feature for the new web part in minutes. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Eventually, I hope to get SPSource working with ListInstances and Workflows, but for
right now, it only works with Content Types and Modules.
&lt;/p&gt;
&lt;p&gt;
Check out this &lt;a href="http://video.msn.com/video.aspx?vid=84c63487-8ad6-4e72-a88e-10f39b92135d" target=_blank&gt;screencast&lt;/a&gt; where
I create a custom Publishing Feature, with a new content type and page layout, execute
SPSource on my StsDev Visual Studio project, package it all up in a WSP, and deploy
in less than 15 minutes!
&lt;/p&gt;
&lt;p&gt;
&lt;a title="SPSource Publishing Feature Demo" href="http://video.msn.com/video.aspx?vid=84c63487-8ad6-4e72-a88e-10f39b92135d" target=_new&gt;&lt;img height=84 alt="SPSource Publishing Feature Demo" src="http://img2.catalog.video.msn.com/Image.aspx?uuid=84c63487-8ad6-4e72-a88e-10f39b92135d&amp;amp;w=112&amp;amp;h=84" width=112 border=0&gt;
&lt;br&gt;
SPSource Publishing Feature Demo&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Here's a short walk-through example of how SPSource works:
&lt;/p&gt;
&lt;p&gt;
In the 'design' site, create a new Content Type for a Publishing page using the SharePoint
UI, adding some new columns&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_4.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=447 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_1.png" width=517 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
In SharePoint Designer, create a new Page Layout based on the Content Type which was
just created&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_6.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=322 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_2.png" width=450 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;br&gt;
Still in SharePoint Designer, add the new content field controls, a web part zone,
and some other markup to the new Page Layout, saving it to the 'design' site Master
Page Gallery&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_8.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=314 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_3.png" width=573 border=0&gt;&lt;/a&gt;&amp;nbsp;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Now, over in a Visual Studio project, which in this example is based on StsDev, create
a new Feature, and create some new Folders in that Feature. The folders aren't important
in this case, they just allow for some organization.&amp;nbsp; SPSource has been tested
using WSPBuilder, StsDEv, and WspProjectTemplate, but the type of project in Visual
Studio really doesn't matter. It just needs to follow the 12Hive folder structure,
which means SPSource does not work with VSEWSS.&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_10.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=125 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_4.png" width=220 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
In each folder, create a new file with the file extension '.spsource'.&amp;nbsp; This
file extension is important, as the SPSource utility looks for these files to work
it's magic.&amp;nbsp; The SPSource files are nothing more than a type of XML file and
are what I call 'reverse manifests' as they are based on the same syntax used to push
things into SharePoint, but in the case of SPSource, are used to get things out of
SharePoint.&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_14.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=118 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_6.png" width=253 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
The SPSource file for the Content Type is just like a Content Type definition file,
and is even based on the same schema. All we need is the name of the custom Content
Type we want to have included in the WSP&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_16.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=121 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_7.png" width=471 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
The SPSource file for the custom Page Layout is also just like a provisioning module
file used to put files into SharePoint. We just need to tell it the source list URL,
and the file to include in the WSP&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_18.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=137 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_8.png" width=466 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
At the root of the Visual Studio project, I've got a CMD file that contains the information
needed to execute SPSource&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_20.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=101 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_9.png" width=150 border=0&gt;&lt;/a&gt; 
&lt;br&gt;
&lt;br&gt;
Source of CMD file&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_22.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=145 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_10.png" width=651 border=0&gt;&lt;/a&gt; 
&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;
After SPSource is executed, there will be some new files in your Visual Studio project.&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_24.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=219 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_11.png" width=316 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
In the ContentType folder, there are now files for both the Content Type definition,
as well as the column definitions.&lt;br&gt;
Content Type definition:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_26.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=155 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_12.png" width=696 border=0&gt;&lt;/a&gt; 
&lt;br&gt;
Column definition:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_28.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=117 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_13.png" width=706 border=0&gt;&lt;/a&gt;&amp;nbsp;&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;
The ASPX page in the PageLayouts folder is the same as what we added in SharePoint
designer&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_30.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=283 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_14.png" width=600 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
The pagelayouts.Provisioner.xml file is the provisioning module file needed to put
the custom Page Layout in to the correct location when the Feature is activated&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_32.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=158 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_15.png" width=707 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
The two *.ElementManifest.xml files are there so you have the lines needed to add
to the Feature.xml file in the ElementManfiests section.&amp;nbsp; These lines are not
automatically added to the Feature.xml as to provide greater flexibility by you to
distinguish what gets included in the Feature.&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_34.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=132 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_16.png" width=706 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
After I add the lines to the Feature file:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_36.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=251 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_17.png" width=619 border=0&gt;&lt;/a&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Now I can build my project to compile the WSP and deploy it to the 'development' site.&amp;nbsp;
SPSource can also be integrated with the MSBuild process to allow for updates to the
files added by SPSource before the WSP is compiled.&amp;nbsp; This allows the WSP to be
upgraded using items changed in the UI and SharePoint Designer.
&lt;/p&gt;
&lt;p&gt;
After the solution is built and deployed, the Feature can be activated, and the pages
will be added to the Master Page Gallery&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_38.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=43 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_18.png" width=601 border=0&gt;&lt;/a&gt;&amp;nbsp;&lt;br&gt;
&lt;br&gt;
Master Page Gallery&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_40.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=25 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_19.png" width=744 border=0&gt;&lt;/a&gt; 
&lt;br&gt;
&lt;br&gt;
When I create a new page, the new Page Layout is available in the list, as expected&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_42.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=138 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_20.png" width=713 border=0&gt;&lt;/a&gt;&amp;nbsp;&lt;br&gt;
&lt;br&gt;
and, the page looks the way it should&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_44.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=278 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_21.png" width=393 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Give &lt;a href="http://www.codeplex.com/SPSource" target=_blank&gt;SPSource&lt;/a&gt; a try,
and see how much more efficient your Visual Studio WSP creation process can be!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=fcf33971-919a-4086-8f53-8dd9d05d0b41" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,fcf33971-919a-4086-8f53-8dd9d05d0b41.aspx</comments>
      <category>Development</category>
      <category>Microsoft Office SharePoint Server</category>
      <category>SPSource</category>
      <category>WSP Development</category>
      <category>WSS</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=2c3596d1-d7f3-4dad-8484-4a45e5ed315d</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,2c3596d1-d7f3-4dad-8484-4a45e5ed315d.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,2c3596d1-d7f3-4dad-8484-4a45e5ed315d.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=2c3596d1-d7f3-4dad-8484-4a45e5ed315d</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Recently, I've seen a bunch of announcements about <a href="http://www.wssdemo.com/Pages/websites.aspx" target="_blank">new
public-facing Internet sites</a> being released out into the wild running on SharePoint. 
This is awesome because it's great to see people catching on to the <a href="http://www.tedpattison.net/WikiPages/wcm.aspx" target="_blank">web
content management features in the product</a>.  I do need get something off
my chest, though...
</p>
        <p>
If you've got a public facing SharePoint site that allows anonymous access, <a href="http://technet.microsoft.com/en-us/library/cc263468.aspx#section6" target="_blank">ACTIVATE
THE ViewFormPagesLockDown FEATURE</a>!!!!!!!
</p>
        <p>
This is especially true if you've spent any amount of time customizing the branding
of your site.
</p>
        <p>
          <a href="http://sharepoint-sezai-moss-2007.blogspot.com/2008/02/securing-moss-2007-publishing-sites.html" target="_blank">Sezai
has a good post</a> on the Feature, and the <a href="http://technet.microsoft.com/en-us/library/cc263468.aspx#section6" target="_blank">TechNet
documentation</a> provides the details.
</p>
        <p>
ViewFormsPagesLockDown is a MOSS-only Feature (not in WSS) that does a couple things:
</p>
        <p>
1) Allows users to only view the Publishing pages in your site, not any of the form
or view pages (DispForm.aspx, AllItems.aspx)<br />
2) Disallows anonymous access to pages in the _layouts directory that inherit from
LayoutsPageBase.
</p>
        <p>
This Feature is active on the Publishing Portal site definition by default, but NOT
on the Collaboration Portal site definition.
</p>
        <p>
Without this Feature active on anonymous public sites, any and all users - including
search engines like Live and Google - will be able to view (and crawl) SharePoint
out-of-box pages which are tied to lists and webs that allow viewing by anonymous
users.  These users might not have the ability to do anything, but it most likely
will not be what your organization would prefer of them to view.  In some cases,
you might not care, but keep reading...
</p>
        <p>
If you want to see some interesting and scary stats on how many sites there are that
have NOT got the ViewFormPagesLockDown Feature activated, <a href="http://search.live.com/results.aspx?q=%22This+system+library+was+created+by+the+Publishing+feature+to+store+pages+that+are+created+in+this+site.%22&amp;form=QBLH" target="_blank">check
out this result-set from Live Search</a>.  Currently Live Search is returning
29,200 results, some being duplicates from the same site, but they are all links to
sites that have the Publishing Feature installed, allow anonymous access, and have
not activated the LockDown Feature.  It's also a great result set to see some
public-facing SharePoint, but that's not the point.
</p>
        <p>
This is an easy fix! Activate the Feature! Please rest assured, though, that if this
Feature is not active, and your site security is configured correctly, anonymous users <strong>should
not</strong> be able to do anything in your site.
</p>
        <p>
One thing to note for you MOSS devs out there, I found that the lock-down on _layouts
was a bit of a problem because I sometimes like to put custom application pages in
the _layouts directory which I <em>want</em> to be hit by anonymous users.  To
get around the lock-down, there's the <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.unsecuredlayoutspagebase.aspx" target="_blank">UnsecuredLayoutsPageBase</a> class
you can use as the base class of your page, and there's always just the Page class
as in a standard ASP.Net application page.
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=2c3596d1-d7f3-4dad-8484-4a45e5ed315d" />
      </body>
      <title>Public-Facing SharePoint? Here's something scary... Please activate ViewFormPagesLockDown!!!</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,2c3596d1-d7f3-4dad-8484-4a45e5ed315d.aspx</guid>
      <link>http://blog.richfinn.net/blog/2008/07/22/PublicFacingSharePointHeresSomethingScaryPleaseActivateViewFormPagesLockDown.aspx</link>
      <pubDate>Tue, 22 Jul 2008 22:30:27 GMT</pubDate>
      <description>&lt;p&gt;
Recently, I've seen a bunch of announcements about &lt;a href="http://www.wssdemo.com/Pages/websites.aspx" target=_blank&gt;new
public-facing Internet sites&lt;/a&gt; being released out into the wild running on SharePoint.&amp;nbsp;
This is awesome because it's great to see people catching on to the &lt;a href="http://www.tedpattison.net/WikiPages/wcm.aspx" target=_blank&gt;web
content management features in the product&lt;/a&gt;.&amp;nbsp; I do need get something off
my chest, though...
&lt;/p&gt;
&lt;p&gt;
If you've got a public facing SharePoint site that allows anonymous access, &lt;a href="http://technet.microsoft.com/en-us/library/cc263468.aspx#section6" target=_blank&gt;ACTIVATE
THE ViewFormPagesLockDown FEATURE&lt;/a&gt;!!!!!!!
&lt;/p&gt;
&lt;p&gt;
This is especially true if you've spent any amount of time customizing the branding
of your site.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sharepoint-sezai-moss-2007.blogspot.com/2008/02/securing-moss-2007-publishing-sites.html" target=_blank&gt;Sezai
has a good post&lt;/a&gt; on the Feature, and the &lt;a href="http://technet.microsoft.com/en-us/library/cc263468.aspx#section6" target=_blank&gt;TechNet
documentation&lt;/a&gt; provides the details.
&lt;/p&gt;
&lt;p&gt;
ViewFormsPagesLockDown is a MOSS-only Feature (not in WSS) that does a couple things:
&lt;/p&gt;
&lt;p&gt;
1) Allows users to only view the Publishing pages in your site, not any of the form
or view pages (DispForm.aspx, AllItems.aspx)&lt;br&gt;
2) Disallows anonymous access to pages in the _layouts directory that inherit from
LayoutsPageBase.
&lt;/p&gt;
&lt;p&gt;
This Feature is active on the Publishing Portal site definition by default, but NOT
on the Collaboration Portal site definition.
&lt;/p&gt;
&lt;p&gt;
Without this Feature active on anonymous public sites, any and all users - including
search engines like Live and Google - will be able to view (and crawl) SharePoint
out-of-box pages which are tied to lists and webs that allow viewing by anonymous
users.&amp;nbsp; These users might not have the ability to do anything, but it most likely
will not be what your organization would prefer of them to view.&amp;nbsp; In some cases,
you might not care, but keep reading...
&lt;/p&gt;
&lt;p&gt;
If you want to see some interesting and scary stats on how many sites there are that
have NOT got the ViewFormPagesLockDown Feature activated, &lt;a href="http://search.live.com/results.aspx?q=%22This+system+library+was+created+by+the+Publishing+feature+to+store+pages+that+are+created+in+this+site.%22&amp;amp;form=QBLH" target=_blank&gt;check
out this result-set from Live Search&lt;/a&gt;.&amp;nbsp; Currently Live Search is returning
29,200 results, some being duplicates from the same site, but they are all links to
sites that have the Publishing Feature installed, allow anonymous access, and have
not activated the LockDown Feature.&amp;nbsp; It's also a great result set to see some
public-facing SharePoint, but that's not the point.
&lt;/p&gt;
&lt;p&gt;
This is an easy fix! Activate the Feature! Please rest assured, though, that if this
Feature is not active, and your site security is configured correctly, anonymous users &lt;strong&gt;should
not&lt;/strong&gt; be able to do anything in your site.
&lt;/p&gt;
&lt;p&gt;
One thing to note for you MOSS devs out there, I found that the lock-down on _layouts
was a bit of a problem because I sometimes like to put custom application pages in
the _layouts directory which I &lt;em&gt;want&lt;/em&gt; to be hit by anonymous users.&amp;nbsp; To
get around the lock-down, there's the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.unsecuredlayoutspagebase.aspx" target=_blank&gt;UnsecuredLayoutsPageBase&lt;/a&gt; class
you can use as the base class of your page, and there's always just the Page class
as in a standard ASP.Net application page.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=2c3596d1-d7f3-4dad-8484-4a45e5ed315d" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,2c3596d1-d7f3-4dad-8484-4a45e5ed315d.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=4d7b3f9d-a9a5-4bd4-b9b0-106f2f3b6468</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,4d7b3f9d-a9a5-4bd4-b9b0-106f2f3b6468.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,4d7b3f9d-a9a5-4bd4-b9b0-106f2f3b6468.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=4d7b3f9d-a9a5-4bd4-b9b0-106f2f3b6468</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
We've been working on this one for a while, and it's been driving us nuts...
</p>
        <p>
In the current project we're working on, we haven't been able to add any new web parts
to pages, nor have we been able to edit the properties on the existing ones. 
When we do, we've been seeing the three following errors:
</p>
        <p>
- <font color="#ff0000">Cannot save the property settings for this Web Part. Exception
occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))<br /></font>- <font color="#ff0000">Unable to add selected web part(s). Exception occurred.
(Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))</font><br />
- <font color="#ff0000">Unable to add selected web part(s). List View Web Part could
not be added, list may be hidden.</font></p>
        <p>
Even stranger was that it was only occurring in the root web of the current site collection.
</p>
        <p>
In researching the 0x80020008 error when related to web parts, the few people that
have found anything have said that it could be caused by disposal of the SPContext.Current.Site
or SPContect.Current.Web objects.  We looked all over our code and didn't find
that we were doing that anywhere.
</p>
        <p>
We switched the master page back to the default.master, and we could add and edit
web parts without any issues, so we then started whittling down the server controls
on the custom master page until we found three custom server controls that were present
when the web part errors occur.  Taking a closer look, these three controls all
had the following lines in common.
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 97.5%; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 91px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #0000ff">using</span> (SPWeb
rootWeb = SPContext.Current.Site.RootWeb) { <span style="COLOR: #008000">//code</span> }</pre>
        </div>
        <p>
Commenting out of the code caused the errors to go away.  What's going on here?  
</p>
        <p>
Turns out that there's something that the <a href="http://msdn.microsoft.com/en-us/library/aa973248.aspx" target="_blank">Best
Practices: Using Disposable Windows SharePoint Services Objects</a> post and Roger
Lamb's <a href="http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx" target="_blank">SharePoint
2007 and WSS 3.0 Dispose Patterns by Example</a> should point out a little clearer. 
If you look at the bottom of Roger's post, there's a comment by <a href="http://stephenkaye.blogspot.com/" target="_blank">Stephen
Kaye</a> where he hits the nail on the head:
</p>
        <blockquote>
          <p>
            <em>If your current context’s web is the root web of you current context’s site then
the RootWeb property of the site will reference the same object return by SPControl.GetContextWeb
and SPContext.Current.Web and should therefore not be disposed.</em>
          </p>
        </blockquote>
        <p>
So, this means that if you are in the root web of your site collection, and you dispose
of SPContext.Current.Site.RootWeb, you're actually disposing of SPContext.Current.Web. 
Not good.
</p>
        <p>
Here's how we changed the code to ensure that we could use the RootWeb SPWeb object,
but not dispose it if the SPContext.Current.Web is the RootWeb:
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 97.5%; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 214px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">SPWeb rootWeb = <span style="COLOR: #0000ff">null</span>; <span style="COLOR: #0000ff">if</span> (SPContext.Current.Web.IsRootWeb)
rootWeb = SPContext.Current.Web; <span style="COLOR: #0000ff">else</span> rootWeb
= SPContext.Current.Site.RootWeb; <span style="COLOR: #008000">//code</span><span style="COLOR: #0000ff">if</span> (!SPContext.Current.Web.IsRootWeb)
rootWeb.Dispose();</pre>
        </div>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=4d7b3f9d-a9a5-4bd4-b9b0-106f2f3b6468" />
      </body>
      <title>SPContext.Current.Site.RootWeb.Dispose() and the webpart error '(Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))'</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,4d7b3f9d-a9a5-4bd4-b9b0-106f2f3b6468.aspx</guid>
      <link>http://blog.richfinn.net/blog/2008/07/17/SPContextCurrentSiteRootWebDisposeAndTheWebpartErrorExceptionFromHRESULT0x80020009DISPEEXCEPTION.aspx</link>
      <pubDate>Thu, 17 Jul 2008 00:18:46 GMT</pubDate>
      <description>&lt;p&gt;
We've been working on this one for a while, and it's been driving us nuts...
&lt;/p&gt;
&lt;p&gt;
In the current project we're working on, we haven't been able to add any new web parts
to pages, nor have we been able to edit the properties on the existing ones.&amp;nbsp;
When we do, we've been seeing the three following errors:
&lt;/p&gt;
&lt;p&gt;
- &lt;font color=#ff0000&gt;Cannot save the property settings for this Web Part. Exception
occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))&lt;br&gt;
&lt;/font&gt;- &lt;font color=#ff0000&gt;Unable to add selected web part(s). Exception occurred.
(Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))&lt;/font&gt;
&lt;br&gt;
- &lt;font color=#ff0000&gt;Unable to add selected web part(s). List View Web Part could
not be added, list may be hidden.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Even stranger was that it was only occurring in the root web of the current site collection.
&lt;/p&gt;
&lt;p&gt;
In researching the 0x80020008 error when related to web parts, the few people that
have found anything have said that it could be caused by disposal of the SPContext.Current.Site
or SPContect.Current.Web objects.&amp;nbsp; We looked all over our code and didn't find
that we were doing that anywhere.
&lt;/p&gt;
&lt;p&gt;
We switched the master page back to the default.master, and we could add and edit
web parts without any issues, so we then started whittling down the server controls
on the custom master page until we found three custom server controls that were present
when the web part errors occur.&amp;nbsp; Taking a closer look, these three controls all
had the following lines in common.
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 97.5%; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 91px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; (SPWeb
rootWeb = SPContext.Current.Site.RootWeb) { &lt;span style="COLOR: #008000"&gt;//code&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
Commenting out of the code caused the errors to go away.&amp;nbsp; What's going on here?&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
Turns out that there's something that the &lt;a href="http://msdn.microsoft.com/en-us/library/aa973248.aspx" target=_blank&gt;Best
Practices: Using Disposable Windows SharePoint Services Objects&lt;/a&gt; post and Roger
Lamb's &lt;a href="http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx" target=_blank&gt;SharePoint
2007 and WSS 3.0 Dispose Patterns by Example&lt;/a&gt; should point out a little clearer.&amp;nbsp;
If you look at the bottom of Roger's post, there's a comment by &lt;a href="http://stephenkaye.blogspot.com/" target=_blank&gt;Stephen
Kaye&lt;/a&gt; where he hits the nail on the head:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;em&gt;If your current context’s web is the root web of you current context’s site then
the RootWeb property of the site will reference the same object return by SPControl.GetContextWeb
and SPContext.Current.Web and should therefore not be disposed.&lt;/em&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
So, this means that if you are in the root web of your site collection, and you dispose
of SPContext.Current.Site.RootWeb, you're actually disposing of SPContext.Current.Web.&amp;nbsp;
Not good.
&lt;/p&gt;
&lt;p&gt;
Here's how we changed the code to ensure that we could use the RootWeb SPWeb object,
but not dispose it if the SPContext.Current.Web is the RootWeb:
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 97.5%; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 214px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;SPWeb rootWeb = &lt;span style="COLOR: #0000ff"&gt;null&lt;/span&gt;; &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (SPContext.Current.Web.IsRootWeb)
rootWeb = SPContext.Current.Web; &lt;span style="COLOR: #0000ff"&gt;else&lt;/span&gt; rootWeb
= SPContext.Current.Site.RootWeb; &lt;span style="COLOR: #008000"&gt;//code&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (!SPContext.Current.Web.IsRootWeb)
rootWeb.Dispose();&lt;/pre&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=4d7b3f9d-a9a5-4bd4-b9b0-106f2f3b6468" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,4d7b3f9d-a9a5-4bd4-b9b0-106f2f3b6468.aspx</comments>
      <category>Development</category>
      <category>Microsoft Office SharePoint Server</category>
      <category>WSS</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=55b63fa4-0865-4826-a3b6-b2947f03db10</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,55b63fa4-0865-4826-a3b6-b2947f03db10.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,55b63fa4-0865-4826-a3b6-b2947f03db10.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=55b63fa4-0865-4826-a3b6-b2947f03db10</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
So, earlier I posted how I upgraded WSSv3 to MOSS.
</p>
        <p>
After I completed that task, I wanted to see what it would take to turn my existing
top level site collection into a publishing site, as the Publishing Feature is one
of the lowest hanging fruit in the MOSS Feature stack that has the greatest benefit
to both users and administrators right out of the gates.
</p>
        <p>
The first thing we need to do is enable the Office SharePoint Server Publishing Infrastructure
feature in the site collection features list. 
<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableMOSSPublishingFeatureonsitecollect_EF64/image_2.png"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="52" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableMOSSPublishingFeatureonsitecollect_EF64/image_thumb.png" width="584" border="0" /></a></p>
        <p>
Uh oh:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableMOSSPublishingFeatureonsitecollect_EF64/image_4.png"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="159" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableMOSSPublishingFeatureonsitecollect_EF64/image_thumb_1.png" width="331" border="0" /></a></p>
        <p>
The logs say that access was denied activating the Publishing Resources feature and
the message is 'Provisioning did not succeed. Details: Failed to provision the scheduling
job definitions.  Page scheduling will not succeed.'  Then there are some
other messages in the logs that say that an exception was thrown ensuring dependencies
were met for the Publishing Site Feature.
</p>
        <p>
According to a <a href="http://www.netadmintools.com/art586.html" target="_blank">post
I found on NetAdminTools.com,</a> you can activate the Publishing Resources via stsadm,
then click the Activate button in the site collection Features list.  This seemed
to work pretty well:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableMOSSPublishingFeatureonsitecollect_EF64/image_6.png"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="56" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableMOSSPublishingFeatureonsitecollect_EF64/image_thumb_2.png" width="584" border="0" /></a></p>
        <p>
Then I activated the Office SharePoint Server Publishing Feature in the Site Features
list (in the Site Administration group) and the Pages list was created and the site
actions menu was expanded, and there was much rejoicing (yaaay)
</p>
        <p>
BUT WAIT!
</p>
        <p>
When I created a new page, something seemed off.  There were only a few pages
available in the 'choose page layout' list box.  Looks like some article pages
and welcome pages were missing.  I went to the mast page gallery and saw that
there weren't any pages missing, but there were some pages, like the welcome page
with web part zones page layout - which is the page layout used on the default page
of the Collaboration Portal site definition - that were not associated to their proper
Content Types! Uh - Weird!  How did this happen, and how can we fix it?
</p>
        <p>
Creating new site collections based on the Team Site template proved that we could
activate the Publishing Infrastructure Feature without the access denied error, but
the page layouts still didn't have the Content Type associated in the Master Page
Gallery. Tried this on four site collections.  PublishingPrerequisites, PublishingResources,
Navigation, and PublishingLayouts are the Feature Activation Dependencies on the PublishingSite
Feature (the Publishing Infrastructure Feature name) and they are all scoped to the
site, so why are the page layouts not getting associated with the Content Types?
</p>
        <p>
Creating a new site collection based on the Collaboration Portal site definition worked
fine, and the page layouts were associated correctly. Lame.  Must be the order
that the site Features are activated.
</p>
        <p>
After going through the Features listed in the onet.xml file for the Collaboration
Portal site definition in the order defined, order's NOT the problem.  What is
you ask?
</p>
        <p>
So - turns out that the page layouts are tagged as being part of the Master Page Content
Type - what's up with that?!?<br />
 <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableMOSSPublishingFeatureonsitecollect_EF64/image_20.png"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="201" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableMOSSPublishingFeatureonsitecollect_EF64/image_thumb_9.png" width="700" border="0" /></a></p>
        <p>
Eidt the page and change the Content Type to the correct one (Page Layout), then set
the Associated Content Type.<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableMOSSPublishingFeatureonsitecollect_EF64/image_16.png"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="67" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableMOSSPublishingFeatureonsitecollect_EF64/image_thumb_7.png" width="221" border="0" /></a></p>
        <p>
 <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableMOSSPublishingFeatureonsitecollect_EF64/image_22.png"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="97" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableMOSSPublishingFeatureonsitecollect_EF64/image_thumb_10.png" width="487" border="0" /></a><br />
 
</p>
        <p>
Check In, Publish a Major Version, and Approve it. Fixed!
</p>
        <p>
Bug...
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=55b63fa4-0865-4826-a3b6-b2947f03db10" />
      </body>
      <title>Enable MOSS Publishing Feature on site collection built using Team Site definition</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,55b63fa4-0865-4826-a3b6-b2947f03db10.aspx</guid>
      <link>http://blog.richfinn.net/blog/2008/06/24/EnableMOSSPublishingFeatureOnSiteCollectionBuiltUsingTeamSiteDefinition.aspx</link>
      <pubDate>Tue, 24 Jun 2008 23:01:33 GMT</pubDate>
      <description>&lt;p&gt;
So, earlier I posted how I upgraded WSSv3 to MOSS.
&lt;/p&gt;
&lt;p&gt;
After I completed that task, I wanted to see what it would take to turn my existing
top level site collection into a publishing site, as the Publishing Feature is one
of the lowest hanging fruit in the MOSS Feature stack that has the greatest benefit
to both users and administrators right out of the gates.
&lt;/p&gt;
&lt;p&gt;
The first thing we need to do is enable the Office SharePoint Server Publishing Infrastructure
feature in the site collection features list. 
&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableMOSSPublishingFeatureonsitecollect_EF64/image_2.png"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=52 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableMOSSPublishingFeatureonsitecollect_EF64/image_thumb.png" width=584 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Uh oh:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableMOSSPublishingFeatureonsitecollect_EF64/image_4.png"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=159 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableMOSSPublishingFeatureonsitecollect_EF64/image_thumb_1.png" width=331 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
The logs say that access was denied activating the Publishing Resources feature and
the message is 'Provisioning did not succeed. Details: Failed to provision the scheduling
job definitions.&amp;nbsp; Page scheduling will not succeed.'&amp;nbsp; Then there are some
other messages in the logs that say that an exception was thrown ensuring dependencies
were met for the Publishing Site Feature.
&lt;/p&gt;
&lt;p&gt;
According to a &lt;a href="http://www.netadmintools.com/art586.html" target=_blank&gt;post
I found on NetAdminTools.com,&lt;/a&gt; you can activate the Publishing Resources via stsadm,
then click the Activate button in the site collection Features list.&amp;nbsp; This seemed
to work pretty well:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableMOSSPublishingFeatureonsitecollect_EF64/image_6.png"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=56 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableMOSSPublishingFeatureonsitecollect_EF64/image_thumb_2.png" width=584 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Then I activated the Office SharePoint Server Publishing Feature in the Site Features
list (in the Site Administration group) and the Pages list was created and the site
actions menu was expanded, and there was much rejoicing (yaaay)
&lt;/p&gt;
&lt;p&gt;
BUT WAIT!
&lt;/p&gt;
&lt;p&gt;
When I created a new page, something seemed off.&amp;nbsp; There were only a few pages
available in the 'choose page layout' list box.&amp;nbsp; Looks like some article pages
and welcome pages were missing.&amp;nbsp; I went to the mast page gallery and saw that
there weren't any pages missing, but there were some pages, like the welcome page
with web part zones page layout - which is the page layout used on the default page
of the Collaboration Portal site definition - that were not associated to their proper
Content Types! Uh - Weird!&amp;nbsp; How did this happen, and how can we fix it?
&lt;/p&gt;
&lt;p&gt;
Creating new site collections based on the Team Site template proved that we could
activate the Publishing Infrastructure Feature without the access denied error, but
the page layouts still didn't have the Content Type associated in the Master Page
Gallery. Tried this on four site collections.&amp;nbsp; PublishingPrerequisites, PublishingResources,
Navigation, and PublishingLayouts are the Feature Activation Dependencies on the PublishingSite
Feature (the Publishing Infrastructure Feature name) and they are all scoped to the
site, so why are the page layouts not getting associated with the Content Types?
&lt;/p&gt;
&lt;p&gt;
Creating a new site collection based on the Collaboration Portal site definition worked
fine, and the page layouts were associated correctly. Lame.&amp;nbsp; Must be the order
that the site Features are activated.
&lt;/p&gt;
&lt;p&gt;
After going through the Features listed in the onet.xml file for the Collaboration
Portal site definition in the order defined, order's NOT the problem.&amp;nbsp; What is
you ask?
&lt;/p&gt;
&lt;p&gt;
So - turns out that the page layouts are tagged as being part of the Master Page Content
Type - what's up with that?!?&lt;br&gt;
&amp;nbsp;&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableMOSSPublishingFeatureonsitecollect_EF64/image_20.png"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=201 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableMOSSPublishingFeatureonsitecollect_EF64/image_thumb_9.png" width=700 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Eidt the page and change the Content Type to the correct one (Page Layout), then set
the Associated Content Type.&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableMOSSPublishingFeatureonsitecollect_EF64/image_16.png"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=67 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableMOSSPublishingFeatureonsitecollect_EF64/image_thumb_7.png" width=221 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableMOSSPublishingFeatureonsitecollect_EF64/image_22.png"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=97 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableMOSSPublishingFeatureonsitecollect_EF64/image_thumb_10.png" width=487 border=0&gt;&lt;/a&gt; 
&lt;br&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Check In, Publish a Major Version, and Approve it. Fixed!
&lt;/p&gt;
&lt;p&gt;
Bug...
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=55b63fa4-0865-4826-a3b6-b2947f03db10" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,55b63fa4-0865-4826-a3b6-b2947f03db10.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
      <category>WSS</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=f1c9eb38-1bdc-4d99-b17c-22933c89c07f</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,f1c9eb38-1bdc-4d99-b17c-22933c89c07f.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,f1c9eb38-1bdc-4d99-b17c-22933c89c07f.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=f1c9eb38-1bdc-4d99-b17c-22933c89c07f</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This seems to have come up a lot for me lately: We have a client who wants to know
what it takes to upgrade from WSSv3 to MOSS. What do they need to do to make the MOSS
Features available in their current WSS sites?
</p>
        <p>
Having been primarily only working with MOSS, I haven't done much with just WSS and
have never run through the upgrade process to MOSS.  There was very little documentation
out there other than some forum posts, so today I ran through it for the heck of it
and was impressed, but unsurprised, that it was pretty smooth.
</p>
        <p>
To begin, I installed the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=EF93E453-75F1-45DF-8C6F-4565E8549C2A&amp;displaylang=en" target="_blank">slipstreamed
WSS+SP1 available from Microsoft downloads</a> onto a fresh Windows Server 2003 virtual. 
I set it up using SQL 2005 instead of SQL Express, which was a little lazy on my part,
because I should have run through what it would take to move the SQL Express stuff
over to SQL 2005. Oh well.
</p>
        <p>
I set up my web application with a site collection at the root based on the standard
Team Site definition.  This site then got two sub sites.  All three sites
had a single Word document in it's Shared Documents doc library.
</p>
        <p>
Then, I installed MOSS+SP1 from MSDN Subscriber Downloads. Here's the steps with some
screen shots that I thought were of value:
</p>
        <p>
1) Ran install of MOSS.  Pretty straightforward.  Extracted files, entered
key, selected server type, installation of bits and securing of resources, etc, etc...
</p>
        <p>
2) Ran configuration wizard. Says 'This wizard will upgrade SharePoint Products and
Technologies'. Config wizard is aware of config db. Runs through nine tasks without
hanging on anything for too long, and then completes.
</p>
        <p>
3) Opened Central Admin. On the Operations tab:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/UpgradeWSSv3toMOSS_CFFE/image_2.png"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="113" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/UpgradeWSSv3toMOSS_CFFE/image_thumb.png" width="584" border="0" /></a></p>
        <p>
When clicked:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/UpgradeWSSv3toMOSS_CFFE/image_4.png"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="152" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/UpgradeWSSv3toMOSS_CFFE/image_thumb_1.png" width="584" border="0" /></a></p>
        <p>
Check and click OK:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/UpgradeWSSv3toMOSS_CFFE/image_6.png"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="296" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/UpgradeWSSv3toMOSS_CFFE/image_thumb_2.png" width="584" border="0" /></a></p>
        <p>
Completed pretty quick:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/UpgradeWSSv3toMOSS_CFFE/image_8.png"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="123" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/UpgradeWSSv3toMOSS_CFFE/image_thumb_3.png" width="584" border="0" /></a><br /><br />
One thing to note here - this just enabled the Enterprise SKU Features, I think because
I entered an Enterprise key from MSDN, so none of the Standard Features were activated.
FYI...
</p>
        <p>
4) Started new services:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/UpgradeWSSv3toMOSS_CFFE/image_10.png"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="142" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/UpgradeWSSv3toMOSS_CFFE/image_thumb_4.png" width="584" border="0" /></a></p>
        <p>
5) Created SSP - nothing special here
</p>
        <p>
6) To get Search lined up, I created a Search Center site at the root of the site
collection, and changed the site collection search settings to use the new search
center I just created:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/UpgradeWSSv3toMOSS_CFFE/image_12.png"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="144" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/UpgradeWSSv3toMOSS_CFFE/image_thumb_5.png" width="584" border="0" /></a><br /></p>
        <p>
That was pretty much it. Like I said, impressed, but not surprised.
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=f1c9eb38-1bdc-4d99-b17c-22933c89c07f" />
      </body>
      <title>Upgrade WSSv3 to MOSS?</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,f1c9eb38-1bdc-4d99-b17c-22933c89c07f.aspx</guid>
      <link>http://blog.richfinn.net/blog/2008/06/24/UpgradeWSSv3ToMOSS.aspx</link>
      <pubDate>Tue, 24 Jun 2008 20:47:45 GMT</pubDate>
      <description>&lt;p&gt;
This seems to have come up a lot for me lately: We have a client who wants to know
what it takes to upgrade from WSSv3 to MOSS. What do they need to do to make the MOSS
Features available in their current WSS sites?
&lt;/p&gt;
&lt;p&gt;
Having been primarily only working with MOSS, I haven't done much with just WSS and
have never run through the upgrade process to MOSS.&amp;nbsp; There was very little documentation
out there other than some forum posts, so today I ran through it for the heck of it
and was impressed, but unsurprised, that it was pretty smooth.
&lt;/p&gt;
&lt;p&gt;
To begin, I installed the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=EF93E453-75F1-45DF-8C6F-4565E8549C2A&amp;amp;displaylang=en" target=_blank&gt;slipstreamed
WSS+SP1 available from Microsoft downloads&lt;/a&gt; onto a fresh Windows Server 2003 virtual.&amp;nbsp;
I set it up using SQL 2005 instead of SQL Express, which was a little lazy on my part,
because I should have run through what it would take to move the SQL Express stuff
over to SQL 2005. Oh well.
&lt;/p&gt;
&lt;p&gt;
I set up my web application with a site collection at the root based on the standard
Team Site definition.&amp;nbsp; This site then got two sub sites.&amp;nbsp; All three sites
had a single Word document in it's Shared Documents doc library.
&lt;/p&gt;
&lt;p&gt;
Then, I installed MOSS+SP1 from MSDN Subscriber Downloads. Here's the steps with some
screen shots that I thought were of value:
&lt;/p&gt;
&lt;p&gt;
1) Ran install of MOSS.&amp;nbsp; Pretty straightforward.&amp;nbsp; Extracted files, entered
key, selected server type, installation of bits and securing of resources, etc, etc...
&lt;/p&gt;
&lt;p&gt;
2) Ran configuration wizard. Says 'This wizard will upgrade SharePoint Products and
Technologies'. Config wizard is aware of config db. Runs through nine tasks without
hanging on anything for too long, and then completes.
&lt;/p&gt;
&lt;p&gt;
3) Opened Central Admin. On the Operations tab:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/UpgradeWSSv3toMOSS_CFFE/image_2.png"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=113 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/UpgradeWSSv3toMOSS_CFFE/image_thumb.png" width=584 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
When clicked:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/UpgradeWSSv3toMOSS_CFFE/image_4.png"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=152 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/UpgradeWSSv3toMOSS_CFFE/image_thumb_1.png" width=584 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Check and click OK:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/UpgradeWSSv3toMOSS_CFFE/image_6.png"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=296 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/UpgradeWSSv3toMOSS_CFFE/image_thumb_2.png" width=584 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Completed pretty quick:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/UpgradeWSSv3toMOSS_CFFE/image_8.png"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=123 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/UpgradeWSSv3toMOSS_CFFE/image_thumb_3.png" width=584 border=0&gt;&lt;/a&gt; 
&lt;br&gt;
&lt;br&gt;
One thing to note here - this just enabled the Enterprise SKU Features, I think because
I entered an Enterprise key from MSDN, so none of the Standard Features were activated.
FYI...
&lt;/p&gt;
&lt;p&gt;
4) Started new services:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/UpgradeWSSv3toMOSS_CFFE/image_10.png"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=142 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/UpgradeWSSv3toMOSS_CFFE/image_thumb_4.png" width=584 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
5) Created SSP - nothing special here
&lt;/p&gt;
&lt;p&gt;
6) To get Search lined up, I created a Search Center site at the root of the site
collection, and changed the site collection search settings to use the new search
center I just created:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/UpgradeWSSv3toMOSS_CFFE/image_12.png"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=144 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/UpgradeWSSv3toMOSS_CFFE/image_thumb_5.png" width=584 border=0&gt;&lt;/a&gt; 
&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;
That was pretty much it. Like I said, impressed, but not surprised.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=f1c9eb38-1bdc-4d99-b17c-22933c89c07f" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,f1c9eb38-1bdc-4d99-b17c-22933c89c07f.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
      <category>WSS</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=55cbf57f-6d3d-444e-aa45-6b9335301260</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,55cbf57f-6d3d-444e-aa45-6b9335301260.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,55cbf57f-6d3d-444e-aa45-6b9335301260.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=55cbf57f-6d3d-444e-aa45-6b9335301260</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In our current SharePoint project, we have a custom site definition based on the out-of-box
Publishing Site with Workflow. We found a little problem with this though, because
when the out-of-box Features for Publishing and it's Parallel Approval workflow are
activated, the default SharePoint Approvers group is the only group that is set to
approve a publishing page that has been sent into the workflow. The problem is, we
want to inherit the parent site's workflow settings - otherwise known as the association
data - because our application has 'channels' of content that each has a different
group who can approve the content in their appropriate channel.
</p>
        <p>
The group that can approve publishing pages in each channel is defined in the root
web of the channel by doing nothing more than editing the Parallel Approval workflow
on the Pages list, and then setting the correct group on the People Picker for the
workflow approvers property. Since channel owners can create new sites in their channel
using our custom provisioning process, we don't want them to have to go into the Pages
list workflow settings to set the correct group every time, because as we all know,
people make mistakes. Why not automate this process and set the right approvers group
for the channel owner when the new site is created?
</p>
        <p>
To do this, we created a Feature that we <a href="http://www.sharepointnutsandbolts.com/2007/05/feature-stapling.html" target="_blank">included
in our custom site definition</a>.  When a new site is created and the Feature
is activated, we execute the following code:
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 97.5%; CURSOR: text; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <p>
              <span style="COLOR: #0000ff">using</span> System; <span style="COLOR: #0000ff">using</span> System.Collections.Generic; <span style="COLOR: #0000ff">using</span> System.Text; <span style="COLOR: #0000ff">using</span> Microsoft.SharePoint; <span style="COLOR: #0000ff">using</span> System.Diagnostics; <span style="COLOR: #0000ff">using</span> Microsoft.SharePoint.Workflow; <span style="COLOR: #0000ff">using</span> System.Xml; <span style="COLOR: #0000ff">using</span> Microsoft.SharePoint.Publishing; <span style="COLOR: #0000ff">namespace</span> Demo
{ <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">class</span> FeatureReceiver
: SPFeatureReceiver { <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">override</span><span style="COLOR: #0000ff">void</span> FeatureActivated(SPFeatureReceiverProperties
properties) { <span style="COLOR: #008000">//get the SPWeb object for the Feature's
scope</span> SPWeb currentWeb = properties.Feature.Parent <span style="COLOR: #0000ff">as</span> SPWeb; <span style="COLOR: #008000">//set
the AllowUnsafeUpdates property to true so we can apply the change to the workflow</span> currentWeb.AllowUnsafeUpdates
= <span style="COLOR: #0000ff">true</span>; <span style="COLOR: #008000">//get the
parent web of the current web - this is where the correct workflow settings are</span> SPWeb
parentWeb = currentWeb.ParentWeb; <span style="COLOR: #008000">//get the Pages list
from the current web using the PublishingWeb object</span> SPList currentWebPublishingList
= PublishingWeb.GetPublishingWeb(currentWeb).PagesList; <span style="COLOR: #008000">//get
the current web Pages list's workflows</span> SPWorkflowAssociationCollection currentWebWorkflows
= currentWebPublishingList.WorkflowAssociations; <span style="COLOR: #008000">//if
the site has workflows, we need to get the parent web's workflow and apply the same
approvers to it</span><span style="COLOR: #0000ff">if</span> (currentWebWorkflows.Count
&gt;= 1) { <span style="COLOR: #008000">//find the parallel approval workflow</span> SPWorkflowAssociation
currentWorkflowAssociation = currentWebWorkflows.GetAssociationByName(<span style="COLOR: #006080">"Parallel
Approval"</span>, currentWeb.Locale); <span style="COLOR: #008000">//empty container
for the parent pages list workflow</span> SPWorkflowAssociation parentWorkflowAssociation
= <span style="COLOR: #0000ff">null</span>; <span style="COLOR: #008000">//get the
parent site's pages list</span> SPList parentPagesList = PublishingWeb.GetPublishingWeb(parentWeb).PagesList; <span style="COLOR: #008000">//if
there's workflows attached, we need to find the Parallel Approval workflow</span><span style="COLOR: #0000ff">if</span> (parentPagesList.WorkflowAssociations.Count
&gt; 0) { parentWorkflowAssociation = parentPagesList.WorkflowAssociations.GetAssociationByName(<span style="COLOR: #006080">"Parallel
Approval"</span>, parentWeb.Locale); } <span style="COLOR: #008000">//if we have the
parent workflow, we need to copy the review settings to the child</span><span style="COLOR: #0000ff">if</span> (parentWorkflowAssociation
!= <span style="COLOR: #0000ff">null</span>) { <span style="COLOR: #008000">//xmldoc
for the parent association data</span> XmlDocument parentAssociationData = <span style="COLOR: #0000ff">new</span> XmlDocument();
parentAssociationData.LoadXml(parentWorkflowAssociation.AssociationData); <span style="COLOR: #008000">//xmldoc
for the child workflow association data</span> XmlDocument currentAssociationData
= <span style="COLOR: #0000ff">new</span> XmlDocument(); currentAssociationData.LoadXml(currentWorkflowAssociation.AssociationData); <span style="COLOR: #008000">//we
need to create a namespace manager object because the xml data we want is </span><span style="COLOR: #008000">//namespaced
with 'xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD"'</span><span style="COLOR: #008000">//the
following code was obtained from John Wood's blog</span><span style="COLOR: #008000">//url:
http://www.dotnetjunkies.com/WebLog/johnwood/archive/2005/08/25/132153.aspx</span><span style="COLOR: #008000">//this
code will add all namespaces in the xml to the namespace manager, allowing us to correctly</span><span style="COLOR: #008000">//create
XPath queries to retrive the data we need</span> XmlNamespaceManager nsmgr = <span style="COLOR: #0000ff">new</span> XmlNamespaceManager(parentAssociationData.NameTable); <span style="COLOR: #0000ff">foreach</span> (XmlAttribute
attr <span style="COLOR: #0000ff">in</span> parentAssociationData.SelectSingleNode(<span style="COLOR: #006080">"/*"</span>).Attributes)
{ <span style="COLOR: #0000ff">if</span> (attr.Prefix == <span style="COLOR: #006080">"xmlns"</span>)
nsmgr.AddNamespace(attr.LocalName, attr.Value); } <span style="COLOR: #008000">//get
the Reviewers node from the parent workflow</span> XmlNode parentReviewers = parentAssociationData.SelectSingleNode(<span style="COLOR: #006080">"//my:Reviewers"</span>,
nsmgr); <span style="COLOR: #008000">//get the Reviewers node from the child workflow</span> XmlNode
currentReviewers = currentAssociationData.SelectSingleNode(<span style="COLOR: #006080">"//my:Reviewers"</span>,
nsmgr); <span style="COLOR: #008000">//set the Reviewer node of the child workflow
to be the same as the parent</span> currentReviewers.InnerXml = parentReviewers.InnerXml; <span style="COLOR: #008000">//update
the child workflow's association data</span> currentWorkflowAssociation.AssociationData
= currentAssociationData.OuterXml; <span style="COLOR: #008000">//update the child
workflow association in the database</span> currentWebPublishingList.UpdateWorkflowAssociation(currentWorkflowAssociation);
} } <span style="COLOR: #008000">//make sure you dispose of the parentWeb object</span> parentWeb.Dispose();
} <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">override</span><span style="COLOR: #0000ff">void</span> FeatureDeactivating(SPFeatureReceiverProperties
properties) { } <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">override</span><span style="COLOR: #0000ff">void</span> FeatureInstalled(SPFeatureReceiverProperties
properties) { } <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">override</span><span style="COLOR: #0000ff">void</span> FeatureUninstalling(SPFeatureReceiverProperties
properties) { } } } 
</p>
          </pre>
        </div>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=55cbf57f-6d3d-444e-aa45-6b9335301260" />
      </body>
      <title>Publishing Web: Inherit Parent Web's Workflow Settings</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,55cbf57f-6d3d-444e-aa45-6b9335301260.aspx</guid>
      <link>http://blog.richfinn.net/blog/2008/06/20/PublishingWebInheritParentWebsWorkflowSettings.aspx</link>
      <pubDate>Fri, 20 Jun 2008 18:42:55 GMT</pubDate>
      <description>&lt;p&gt;
In our current SharePoint project, we have a custom site definition based on the out-of-box
Publishing Site with Workflow. We found a little problem with this though, because
when the out-of-box Features for Publishing and it's Parallel Approval workflow are
activated, the default SharePoint Approvers group is the only group that is set to
approve a publishing page that has been sent into the workflow. The problem is, we
want to inherit the parent site's workflow settings - otherwise known as the association
data - because our application has 'channels' of content that each has a different
group who can approve the content in their appropriate channel.
&lt;/p&gt;
&lt;p&gt;
The group that can approve publishing pages in each channel is defined in the root
web of the channel by doing nothing more than editing the Parallel Approval workflow
on the Pages list, and then setting the correct group on the People Picker for the
workflow approvers property. Since channel owners can create new sites in their channel
using our custom provisioning process, we don't want them to have to go into the Pages
list workflow settings to set the correct group every time, because as we all know,
people make mistakes. Why not automate this process and set the right approvers group
for the channel owner when the new site is created?
&lt;/p&gt;
&lt;p&gt;
To do this, we created a Feature that we &lt;a href="http://www.sharepointnutsandbolts.com/2007/05/feature-stapling.html" target=_blank&gt;included
in our custom site definition&lt;/a&gt;.&amp;nbsp; When a new site is created and the Feature
is activated, we execute the following code:
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 97.5%; CURSOR: text; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;
&lt;p&gt;
&lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Collections.Generic; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Text; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; Microsoft.SharePoint; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Diagnostics; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; Microsoft.SharePoint.Workflow; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Xml; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; Microsoft.SharePoint.Publishing; &lt;span style="COLOR: #0000ff"&gt;namespace&lt;/span&gt; Demo
{ &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;class&lt;/span&gt; FeatureReceiver
: SPFeatureReceiver { &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; FeatureActivated(SPFeatureReceiverProperties
properties) { &lt;span style="COLOR: #008000"&gt;//get the SPWeb object for the Feature's
scope&lt;/span&gt; SPWeb currentWeb = properties.Feature.Parent &lt;span style="COLOR: #0000ff"&gt;as&lt;/span&gt; SPWeb; &lt;span style="COLOR: #008000"&gt;//set
the AllowUnsafeUpdates property to true so we can apply the change to the workflow&lt;/span&gt; currentWeb.AllowUnsafeUpdates
= &lt;span style="COLOR: #0000ff"&gt;true&lt;/span&gt;; &lt;span style="COLOR: #008000"&gt;//get the
parent web of the current web - this is where the correct workflow settings are&lt;/span&gt; SPWeb
parentWeb = currentWeb.ParentWeb; &lt;span style="COLOR: #008000"&gt;//get the Pages list
from the current web using the PublishingWeb object&lt;/span&gt; SPList currentWebPublishingList
= PublishingWeb.GetPublishingWeb(currentWeb).PagesList; &lt;span style="COLOR: #008000"&gt;//get
the current web Pages list's workflows&lt;/span&gt; SPWorkflowAssociationCollection currentWebWorkflows
= currentWebPublishingList.WorkflowAssociations; &lt;span style="COLOR: #008000"&gt;//if
the site has workflows, we need to get the parent web's workflow and apply the same
approvers to it&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (currentWebWorkflows.Count
&amp;gt;= 1) { &lt;span style="COLOR: #008000"&gt;//find the parallel approval workflow&lt;/span&gt; SPWorkflowAssociation
currentWorkflowAssociation = currentWebWorkflows.GetAssociationByName(&lt;span style="COLOR: #006080"&gt;"Parallel
Approval"&lt;/span&gt;, currentWeb.Locale); &lt;span style="COLOR: #008000"&gt;//empty container
for the parent pages list workflow&lt;/span&gt; SPWorkflowAssociation parentWorkflowAssociation
= &lt;span style="COLOR: #0000ff"&gt;null&lt;/span&gt;; &lt;span style="COLOR: #008000"&gt;//get the
parent site's pages list&lt;/span&gt; SPList parentPagesList = PublishingWeb.GetPublishingWeb(parentWeb).PagesList; &lt;span style="COLOR: #008000"&gt;//if
there's workflows attached, we need to find the Parallel Approval workflow&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (parentPagesList.WorkflowAssociations.Count
&amp;gt; 0) { parentWorkflowAssociation = parentPagesList.WorkflowAssociations.GetAssociationByName(&lt;span style="COLOR: #006080"&gt;"Parallel
Approval"&lt;/span&gt;, parentWeb.Locale); } &lt;span style="COLOR: #008000"&gt;//if we have the
parent workflow, we need to copy the review settings to the child&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (parentWorkflowAssociation
!= &lt;span style="COLOR: #0000ff"&gt;null&lt;/span&gt;) { &lt;span style="COLOR: #008000"&gt;//xmldoc
for the parent association data&lt;/span&gt; XmlDocument parentAssociationData = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; XmlDocument();
parentAssociationData.LoadXml(parentWorkflowAssociation.AssociationData); &lt;span style="COLOR: #008000"&gt;//xmldoc
for the child workflow association data&lt;/span&gt; XmlDocument currentAssociationData
= &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; XmlDocument(); currentAssociationData.LoadXml(currentWorkflowAssociation.AssociationData); &lt;span style="COLOR: #008000"&gt;//we
need to create a namespace manager object because the xml data we want is &lt;/span&gt; &lt;span style="COLOR: #008000"&gt;//namespaced
with 'xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD"'&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;//the
following code was obtained from John Wood's blog&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;//url:
http://www.dotnetjunkies.com/WebLog/johnwood/archive/2005/08/25/132153.aspx&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;//this
code will add all namespaces in the xml to the namespace manager, allowing us to correctly&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;//create
XPath queries to retrive the data we need&lt;/span&gt; XmlNamespaceManager nsmgr = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; XmlNamespaceManager(parentAssociationData.NameTable); &lt;span style="COLOR: #0000ff"&gt;foreach&lt;/span&gt; (XmlAttribute
attr &lt;span style="COLOR: #0000ff"&gt;in&lt;/span&gt; parentAssociationData.SelectSingleNode(&lt;span style="COLOR: #006080"&gt;"/*"&lt;/span&gt;).Attributes)
{ &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (attr.Prefix == &lt;span style="COLOR: #006080"&gt;"xmlns"&lt;/span&gt;)
nsmgr.AddNamespace(attr.LocalName, attr.Value); } &lt;span style="COLOR: #008000"&gt;//get
the Reviewers node from the parent workflow&lt;/span&gt; XmlNode parentReviewers = parentAssociationData.SelectSingleNode(&lt;span style="COLOR: #006080"&gt;"//my:Reviewers"&lt;/span&gt;,
nsmgr); &lt;span style="COLOR: #008000"&gt;//get the Reviewers node from the child workflow&lt;/span&gt; XmlNode
currentReviewers = currentAssociationData.SelectSingleNode(&lt;span style="COLOR: #006080"&gt;"//my:Reviewers"&lt;/span&gt;,
nsmgr); &lt;span style="COLOR: #008000"&gt;//set the Reviewer node of the child workflow
to be the same as the parent&lt;/span&gt; currentReviewers.InnerXml = parentReviewers.InnerXml; &lt;span style="COLOR: #008000"&gt;//update
the child workflow's association data&lt;/span&gt; currentWorkflowAssociation.AssociationData
= currentAssociationData.OuterXml; &lt;span style="COLOR: #008000"&gt;//update the child
workflow association in the database&lt;/span&gt; currentWebPublishingList.UpdateWorkflowAssociation(currentWorkflowAssociation);
} } &lt;span style="COLOR: #008000"&gt;//make sure you dispose of the parentWeb object&lt;/span&gt; parentWeb.Dispose();
} &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; FeatureDeactivating(SPFeatureReceiverProperties
properties) { } &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; FeatureInstalled(SPFeatureReceiverProperties
properties) { } &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; FeatureUninstalling(SPFeatureReceiverProperties
properties) { } } } 
&lt;/p&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=55cbf57f-6d3d-444e-aa45-6b9335301260" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,55cbf57f-6d3d-444e-aa45-6b9335301260.aspx</comments>
      <category>Development</category>
      <category>Microsoft Office SharePoint Server</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=fab8d632-7073-46b4-8f92-fb595b6a41ec</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,fab8d632-7073-46b4-8f92-fb595b6a41ec.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,fab8d632-7073-46b4-8f92-fb595b6a41ec.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=fab8d632-7073-46b4-8f92-fb595b6a41ec</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I just updated the <a href="http://www.codeplex.com/ajaxifymoss">Ajaxify MOSS</a> codeplex release
to include the needed web.config entries for using the .Net 3.5 version of System.Web.Extensions.
</p>
        <p>
There is, however, one manual step you still have to perform to the web.config files
in order to get this to work right. You still need to add the dependentAssembly elements
to the configuration/runtime/assemblyBinding element, as shown below:<br />
 <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/AjaxifyMOSSnowfeaturing.Net3.5_DEE1/image_4.png"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="223" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/AjaxifyMOSSnowfeaturing.Net3.5_DEE1/image_thumb_1.png" width="692" border="0" /></a></p>
        <p>
I tried a whole bunch of different ways to get the xpath in the SPWebConfigModification
object to try and get it to work, but I think the problem is that it's either too
ambiguous because there's no unique identifier available on the dependentAssembly
element, or the namespace on the assemblyBinding element is causing problems.
</p>
        <p>
All the other entries are being applied correctly, though.  Also, I try and help
out a little by outputting the nodes in the stsadm command output after the nodes
are applied :) - see:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/AjaxifyMOSSnowfeaturing.Net3.5_DEE1/image_6.png"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="249" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/AjaxifyMOSSnowfeaturing.Net3.5_DEE1/image_thumb_2.png" width="644" border="0" /></a></p>
        <p>
Just mark and copy the lines from there, and you're halfway there.
</p>
        <p>
The command names are on the releases tab in the codeplex project.  If you're
upgrading from the ASP.Net AJAX 1.0 framework, make sure you uninstall the config
mods first, before you add the 3.5 config mods.
</p>
        <p>
Final note: I hope to be adding the needed lines for SilverLight pretty soon.
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=fab8d632-7073-46b4-8f92-fb595b6a41ec" />
      </body>
      <title>Ajaxify MOSS - now featuring .Net 3.5</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,fab8d632-7073-46b4-8f92-fb595b6a41ec.aspx</guid>
      <link>http://blog.richfinn.net/blog/2008/06/19/AjaxifyMOSSNowFeaturingNet35.aspx</link>
      <pubDate>Thu, 19 Jun 2008 21:51:02 GMT</pubDate>
      <description>&lt;p&gt;
I just updated the &lt;a href="http://www.codeplex.com/ajaxifymoss"&gt;Ajaxify MOSS&lt;/a&gt; codeplex&amp;nbsp;release
to include the needed web.config entries for using the .Net 3.5 version of System.Web.Extensions.
&lt;/p&gt;
&lt;p&gt;
There is, however, one manual step you still have to perform to the web.config files
in order to get this to work right. You still need to add the dependentAssembly elements
to the configuration/runtime/assemblyBinding element, as shown below:&lt;br&gt;
&amp;nbsp;&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/AjaxifyMOSSnowfeaturing.Net3.5_DEE1/image_4.png"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=223 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/AjaxifyMOSSnowfeaturing.Net3.5_DEE1/image_thumb_1.png" width=692 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
I tried a whole bunch of different ways to get the xpath in the SPWebConfigModification
object to try and get it to work, but I think the problem is that it's either too
ambiguous because there's no unique identifier available on the dependentAssembly
element, or the namespace on the assemblyBinding element is causing problems.
&lt;/p&gt;
&lt;p&gt;
All the other entries are being applied correctly, though.&amp;nbsp; Also, I try and help
out a little by outputting the nodes in the stsadm command output after the nodes
are applied :) - see:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/AjaxifyMOSSnowfeaturing.Net3.5_DEE1/image_6.png"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=249 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/AjaxifyMOSSnowfeaturing.Net3.5_DEE1/image_thumb_2.png" width=644 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Just mark and copy the lines from there, and you're halfway there.
&lt;/p&gt;
&lt;p&gt;
The command names are on the releases tab in the codeplex project.&amp;nbsp; If you're
upgrading from the ASP.Net AJAX 1.0 framework, make sure you uninstall the config
mods first, before you add the 3.5 config mods.
&lt;/p&gt;
&lt;p&gt;
Final note: I hope to be adding the needed lines for SilverLight pretty soon.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=fab8d632-7073-46b4-8f92-fb595b6a41ec" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,fab8d632-7073-46b4-8f92-fb595b6a41ec.aspx</comments>
      <category>Development</category>
      <category>Microsoft Office SharePoint Server</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=5a4e9d4a-2fc0-4fec-96e3-507d04c8275a</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,5a4e9d4a-2fc0-4fec-96e3-507d04c8275a.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,5a4e9d4a-2fc0-4fec-96e3-507d04c8275a.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=5a4e9d4a-2fc0-4fec-96e3-507d04c8275a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A few days ago, I mentioned that we're trying to automate as much as possible in our
new SharePoint based product, and I explained how we are <a href="http://blog.richfinn.net/blog/2008/06/17/CreateSearchScopeInFeatureReceiver.aspx" target="_blank">creating
custom search scopes in a Feature Receiver</a>.
</p>
        <p>
Another component we're automating is the creation of Crawl Rules for the search engine
in the SSP the site collection is associated.
</p>
        <p>
          <a href="http://msdn.microsoft.com/en-us/library/ms562090.aspx" target="_blank">According
to MSDN</a> crawl rules are defined as follows:
</p>
        <blockquote>
          <p>
Crawl rules provide you with the ability to set the behavior of the Enterprise Search
index engine when you want to crawl content from a particular path. By using these
rules, you can: 
</p>
          <ul>
            <li>
              <p>
Prevent content within a particular path from being crawled.  
</p>
            </li>
            <li>
              <p>
Indicate that a particular path that would otherwise be excluded from the crawl should
be crawled.
</p>
            </li>
          </ul>
        </blockquote>
        <p>
Here's how we're creating the crawl rules in code using a similar Feature Receiver
as before:
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 97.5%; CURSOR: text; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #0000ff">using</span> System; <span style="COLOR: #0000ff">using</span> System.Collections.Generic; <span style="COLOR: #0000ff">using</span> System.Text; <span style="COLOR: #0000ff">using</span> Microsoft.SharePoint; <span style="COLOR: #0000ff">using</span> Microsoft.Office.Server.Search.Administration; <span style="COLOR: #0000ff">using</span> System.Diagnostics; <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">class</span> FeatureReceiver
: SPFeatureReceiver { SPSite currentSite = <span style="COLOR: #0000ff">null</span>; <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">override</span><span style="COLOR: #0000ff">void</span> FeatureActivated(SPFeatureReceiverProperties
properties) { <span style="COLOR: #008000">//Debugger.Launch();</span><span style="COLOR: #0000ff">this</span>.currentSite
= properties.Feature.Parent <span style="COLOR: #0000ff">as</span> SPSite; createCrawlRules();
} <span style="COLOR: #0000ff">private</span><span style="COLOR: #0000ff">void</span> createCrawlRules()
{ <span style="COLOR: #008000">//get the site SSP's search server instance</span> SearchContext
searchContext = SearchContext.GetContext(<span style="COLOR: #0000ff">this</span>.currentSite); <span style="COLOR: #008000">//For
this example, I'll just show how to exclude the Explorer view of a list</span><span style="COLOR: #008000">//Notice
how we're using wildcard characters to specify that every /Forms/WebFldr.aspx page</span><span style="COLOR: #008000">//
will be excluded regaurdless of protocol or location in the site collection</span><span style="COLOR: #0000ff">string</span> crawlRule
= <span style="COLOR: #006080">" *://*/Forms/WebFldr.aspx"</span>; <span style="COLOR: #008000">//get
the content source for the search server</span> Content sspContent = <span style="COLOR: #0000ff">new</span> Content(searchContext); <span style="COLOR: #008000">//check
to see if the crawl rule exists, and create it if it doesn't</span><span style="COLOR: #0000ff">if</span> (!sspContent.CrawlRules.Exists(rule))
{ </pre>
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <p>
              <span style="COLOR: #008000">//create the crawl rule, setting the type of crawl rule
and the crawl rule string</span> CrawlRule crawlRule = sspContent.CrawlRules.Create(CrawlRuleType.ExclusionRule,
rule); <span style="COLOR: #008000">//we want to make sure that the rule still works
if there are querystring variables</span> crawlRule.FollowComplexUrls = <span style="COLOR: #0000ff">true</span>; <span style="COLOR: #008000">//at
this point, you can set other properties such as authentication information to crawl</span><span style="COLOR: #008000">//
content using a different identity or authentication method</span><span style="COLOR: #008000">//
for more info , check out <a href="http://technet.microsoft.com/en-us/library/cc263150(TechNet.10).aspx" target="_blank">http://technet.microsoft.com/en-us/library/cc263150(TechNet.10).aspx</a></span><span style="COLOR: #008000">//commit
the rule in the database</span> crawlRule.Update(); } } 
</p>
            <blockquote>
              <p>
                <span style="COLOR: #0000ff">public</span>
                <span style="COLOR: #0000ff">override</span>
                <span style="COLOR: #0000ff">void</span> FeatureDeactivating(SPFeatureReceiverProperties
properties){} 
</p>
              <p>
                <span style="COLOR: #0000ff">public</span>
                <span style="COLOR: #0000ff">override</span>
                <span style="COLOR: #0000ff">void</span> FeatureInstalled(SPFeatureReceiverProperties
properties){} 
</p>
              <p>
                <span style="COLOR: #0000ff">public</span>
                <span style="COLOR: #0000ff">override</span>
                <span style="COLOR: #0000ff">void</span> FeatureUninstalling(SPFeatureReceiverProperties
properties){} 
</p>
            </blockquote>
            <p>
}
</p>
          </pre>
        </div>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=5a4e9d4a-2fc0-4fec-96e3-507d04c8275a" />
      </body>
      <title>Create Search Crawl Rules Programmatically</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,5a4e9d4a-2fc0-4fec-96e3-507d04c8275a.aspx</guid>
      <link>http://blog.richfinn.net/blog/2008/06/19/CreateSearchCrawlRulesProgrammatically.aspx</link>
      <pubDate>Thu, 19 Jun 2008 18:58:28 GMT</pubDate>
      <description>&lt;p&gt;
A few days ago, I mentioned that we're trying to automate as much as possible in our
new SharePoint based product, and I explained how we are &lt;a href="http://blog.richfinn.net/blog/2008/06/17/CreateSearchScopeInFeatureReceiver.aspx" target=_blank&gt;creating
custom search scopes in a Feature Receiver&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Another component we're automating is the creation of Crawl Rules for the search engine
in the SSP the site collection is associated.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://msdn.microsoft.com/en-us/library/ms562090.aspx" target=_blank&gt;According
to MSDN&lt;/a&gt; crawl rules are defined as follows:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
Crawl rules provide you with the ability to set the behavior of the Enterprise Search
index engine when you want to crawl content from a particular path. By using these
rules, you can: 
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;
Prevent content within a particular path from being crawled.&amp;nbsp; 
&lt;/p&gt;
&lt;li&gt;
&lt;p&gt;
Indicate that a particular path that would otherwise be excluded from the crawl should
be crawled.
&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Here's how we're creating the crawl rules in code using a similar Feature Receiver
as before:
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 97.5%; CURSOR: text; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Collections.Generic; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Text; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; Microsoft.SharePoint; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; Microsoft.Office.Server.Search.Administration; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Diagnostics; &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;class&lt;/span&gt; FeatureReceiver
: SPFeatureReceiver { SPSite currentSite = &lt;span style="COLOR: #0000ff"&gt;null&lt;/span&gt;; &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; FeatureActivated(SPFeatureReceiverProperties
properties) { &lt;span style="COLOR: #008000"&gt;//Debugger.Launch();&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;.currentSite
= properties.Feature.Parent &lt;span style="COLOR: #0000ff"&gt;as&lt;/span&gt; SPSite; createCrawlRules();
} &lt;span style="COLOR: #0000ff"&gt;private&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; createCrawlRules()
{ &lt;span style="COLOR: #008000"&gt;//get the site SSP's search server instance&lt;/span&gt; SearchContext
searchContext = SearchContext.GetContext(&lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;.currentSite); &lt;span style="COLOR: #008000"&gt;//For
this example, I'll just show how to exclude the Explorer view of a list&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;//Notice
how we're using wildcard characters to specify that every /Forms/WebFldr.aspx page&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;//
will be excluded regaurdless of protocol or location in the site collection&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; crawlRule
= &lt;span style="COLOR: #006080"&gt;" *://*/Forms/WebFldr.aspx"&lt;/span&gt;; &lt;span style="COLOR: #008000"&gt;//get
the content source for the search server&lt;/span&gt; Content sspContent = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; Content(searchContext); &lt;span style="COLOR: #008000"&gt;//check
to see if the crawl rule exists, and create it if it doesn't&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (!sspContent.CrawlRules.Exists(rule))
{ &lt;/pre&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;
&lt;p&gt;
&lt;span style="COLOR: #008000"&gt;//create the crawl rule, setting the type of crawl rule
and the crawl rule string&lt;/span&gt; CrawlRule crawlRule = sspContent.CrawlRules.Create(CrawlRuleType.ExclusionRule,
rule); &lt;span style="COLOR: #008000"&gt;//we want to make sure that the rule still works
if there are querystring variables&lt;/span&gt; crawlRule.FollowComplexUrls = &lt;span style="COLOR: #0000ff"&gt;true&lt;/span&gt;; &lt;span style="COLOR: #008000"&gt;//at
this point, you can set other properties such as authentication information to crawl&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;//
content using a different identity or authentication method&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;//
for more info , check out &lt;a href="http://technet.microsoft.com/en-us/library/cc263150(TechNet.10).aspx" target=_blank&gt;http://technet.microsoft.com/en-us/library/cc263150(TechNet.10).aspx&lt;/a&gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;//commit
the rule in the database&lt;/span&gt; crawlRule.Update(); } } 
&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;
&lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; FeatureDeactivating(SPFeatureReceiverProperties
properties){} 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; FeatureInstalled(SPFeatureReceiverProperties
properties){} 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; FeatureUninstalling(SPFeatureReceiverProperties
properties){} 
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
}
&lt;/p&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=5a4e9d4a-2fc0-4fec-96e3-507d04c8275a" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,5a4e9d4a-2fc0-4fec-96e3-507d04c8275a.aspx</comments>
      <category>Development</category>
      <category>Microsoft Office SharePoint Server</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=9b1a6c79-5750-4ed8-a063-84719caf0c85</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,9b1a6c79-5750-4ed8-a063-84719caf0c85.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,9b1a6c79-5750-4ed8-a063-84719caf0c85.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=9b1a6c79-5750-4ed8-a063-84719caf0c85</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've recently been working on a SharePoint project which is being offered to clients
as a product built on top of the SharePoint framework.  While I can't describe
in too much detail exactly what the product is, I figured it might be beneficial to
discuss how we've built out certain aspects of the solution.  At the very least,
I can compile some notes of my own so I can remember later how tackled some of the
issues we had during the dev process.
</p>
        <p>
To give a little background on the product, at the core, this is primarily a publishing-based
solution that is deployed into a site collection. One of the goals in the development
of the product has been to automate the creation of the site collection as much as
possible when a new client purchases the product.  We're handling the bulk of
the new client deployment through a Feature called 'Product.SiteConfiguration' that
when activated, executes a Feature Receiver that both creates some higher-level components
and populates 'default' data in areas of the site that are required for the product
to function properly.
</p>
        <p>
One of the things we're creating in the SiteConfiguration Feature Receiver is a locally
defined, custom search scope that is specific to the site collection of the product.
A search scope allows the narrowing of search results based on rules defined within
the scope, so we wanted to create a scope that is specific to the product so that
when a user searches from the product's generic search box, only items from within
the product are returned.
</p>
        <p>
Here's sample code used to create a new scope in a site collection:
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 97.5%; CURSOR: text; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 1145px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 1143px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #0000ff">using</span> System; <span style="COLOR: #0000ff">using</span> System.Collections.Generic; <span style="COLOR: #0000ff">using</span> System.Text; <span style="COLOR: #0000ff">using</span> Microsoft.SharePoint; <span style="COLOR: #0000ff">using</span> Microsoft.Office.Server.Search.Administration; <span style="COLOR: #0000ff">using</span> System.Diagnostics; <span style="COLOR: #0000ff">namespace</span> LocalDev.Demo.Code
{ <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">class</span> SiteConfiguration
: SPFeatureReceiver { SPSite currentSite = <span style="COLOR: #0000ff">null</span>; <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">override</span><span style="COLOR: #0000ff">void</span> FeatureActivated(SPFeatureReceiverProperties
properties) { <span style="COLOR: #0000ff">string</span> scopeName = <span style="COLOR: #006080">"ProductScope"</span>; <span style="COLOR: #0000ff">this</span>.currentSite
= properties.Feature.Parent <span style="COLOR: #0000ff">as</span> SPSite; <span style="COLOR: #008000">//get
the site SSP's search server instance</span> SearchContext searchContext = SearchContext.GetContext(<span style="COLOR: #0000ff">this</span>.currentSite); <span style="COLOR: #008000">//get
the current scopes defined in the search server</span> Scopes scopes = <span style="COLOR: #0000ff">new</span> Scopes(searchContext); <span style="COLOR: #008000">//create
a URI object for the current site - used in checking for the scope we're creating</span><span style="COLOR: #0000ff">string</span> siteUrl
= <span style="COLOR: #0000ff">this</span>.currentSite.Url; Uri siteUri = <span style="COLOR: #0000ff">new</span> Uri(siteUrl); <span style="COLOR: #008000">//create
scope object for the new scope</span> Scope newScope = <span style="COLOR: #0000ff">null</span>; <span style="COLOR: #0000ff">try</span> { <span style="COLOR: #008000">//this
is a little bit of a hack, but if it bombs, we know the scope doesn't exist</span> newScope
= scopes.GetScope(siteUri, scopeName); } <span style="COLOR: #0000ff">catch</span> { <span style="COLOR: #008000">//create
the new scope</span> newScope = scopes.AllScopes.Create(scopeName, scopeName + <span style="COLOR: #006080">"
Description"</span>, siteUri, <span style="COLOR: #0000ff">true</span>, <span style="COLOR: #006080">"/_layouts/product/customsearchresults.aspx"</span>,
ScopeCompilationType.AlwaysCompile); <span style="COLOR: #008000">//create the scopes
rules for the new scope</span><span style="COLOR: #008000">//for example, include
content from the site</span> newScope.Rules.CreateUrlRule(ScopeRuleFilterBehavior.Include,
UrlScopeRuleType.Folder, siteUrl); <span style="COLOR: #008000">//save the changes
to the SSP Content Database</span> scopes.Update(); <span style="COLOR: #008000">//start
compilation of the scope</span> scopes.StartCompilation(); } } <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">override</span><span style="COLOR: #0000ff">void</span> FeatureDeactivating(SPFeatureReceiverProperties
properties) { } <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">override</span><span style="COLOR: #0000ff">void</span> FeatureInstalled(SPFeatureReceiverProperties
properties) { } <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">override</span><span style="COLOR: #0000ff">void</span> FeatureUninstalling(SPFeatureReceiverProperties
properties) { } } }</pre>
        </div>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=9b1a6c79-5750-4ed8-a063-84719caf0c85" />
      </body>
      <title>Create Search Scope in Feature Receiver</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,9b1a6c79-5750-4ed8-a063-84719caf0c85.aspx</guid>
      <link>http://blog.richfinn.net/blog/2008/06/17/CreateSearchScopeInFeatureReceiver.aspx</link>
      <pubDate>Tue, 17 Jun 2008 00:56:44 GMT</pubDate>
      <description>&lt;p&gt;
I've recently been working on a SharePoint project which is being offered to clients
as a product built on top of the SharePoint framework.&amp;nbsp; While I can't describe
in too much detail exactly what the product is, I figured it might be beneficial to
discuss how we've built out certain aspects of the solution.&amp;nbsp; At the very least,
I can compile some notes of my own so I can remember later how tackled some of the
issues we had during the dev process.
&lt;/p&gt;
&lt;p&gt;
To give a little background on the product, at the core, this is primarily a publishing-based
solution that is deployed into a site collection. One of the goals in the development
of the product has been to automate the creation of the site collection as much as
possible when a new client purchases the product.&amp;nbsp; We're handling the bulk of
the new client deployment through a Feature called 'Product.SiteConfiguration' that
when activated, executes a Feature Receiver that both creates some higher-level components
and populates 'default' data in areas of the site that are required for the product
to function properly.
&lt;/p&gt;
&lt;p&gt;
One of the things we're creating in the SiteConfiguration Feature Receiver is a locally
defined, custom search scope that is specific to the site collection of the product.
A search scope allows the narrowing of search results based on rules defined within
the scope, so we wanted to create a scope that is specific to the product so that
when a user searches from the product's generic search box, only items from within
the product are returned.
&lt;/p&gt;
&lt;p&gt;
Here's sample code used to create a new scope in a site collection:
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 97.5%; CURSOR: text; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 1145px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 1143px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Collections.Generic; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Text; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; Microsoft.SharePoint; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; Microsoft.Office.Server.Search.Administration; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Diagnostics; &lt;span style="COLOR: #0000ff"&gt;namespace&lt;/span&gt; LocalDev.Demo.Code
{ &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;class&lt;/span&gt; SiteConfiguration
: SPFeatureReceiver { SPSite currentSite = &lt;span style="COLOR: #0000ff"&gt;null&lt;/span&gt;; &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; FeatureActivated(SPFeatureReceiverProperties
properties) { &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; scopeName = &lt;span style="COLOR: #006080"&gt;"ProductScope"&lt;/span&gt;; &lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;.currentSite
= properties.Feature.Parent &lt;span style="COLOR: #0000ff"&gt;as&lt;/span&gt; SPSite; &lt;span style="COLOR: #008000"&gt;//get
the site SSP's search server instance&lt;/span&gt; SearchContext searchContext = SearchContext.GetContext(&lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;.currentSite); &lt;span style="COLOR: #008000"&gt;//get
the current scopes defined in the search server&lt;/span&gt; Scopes scopes = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; Scopes(searchContext); &lt;span style="COLOR: #008000"&gt;//create
a URI object for the current site - used in checking for the scope we're creating&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; siteUrl
= &lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;.currentSite.Url; Uri siteUri = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; Uri(siteUrl); &lt;span style="COLOR: #008000"&gt;//create
scope object for the new scope&lt;/span&gt; Scope newScope = &lt;span style="COLOR: #0000ff"&gt;null&lt;/span&gt;; &lt;span style="COLOR: #0000ff"&gt;try&lt;/span&gt; { &lt;span style="COLOR: #008000"&gt;//this
is a little bit of a hack, but if it bombs, we know the scope doesn't exist&lt;/span&gt; newScope
= scopes.GetScope(siteUri, scopeName); } &lt;span style="COLOR: #0000ff"&gt;catch&lt;/span&gt; { &lt;span style="COLOR: #008000"&gt;//create
the new scope&lt;/span&gt; newScope = scopes.AllScopes.Create(scopeName, scopeName + &lt;span style="COLOR: #006080"&gt;"
Description"&lt;/span&gt;, siteUri, &lt;span style="COLOR: #0000ff"&gt;true&lt;/span&gt;, &lt;span style="COLOR: #006080"&gt;"/_layouts/product/customsearchresults.aspx"&lt;/span&gt;,
ScopeCompilationType.AlwaysCompile); &lt;span style="COLOR: #008000"&gt;//create the scopes
rules for the new scope&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;//for example, include
content from the site&lt;/span&gt; newScope.Rules.CreateUrlRule(ScopeRuleFilterBehavior.Include,
UrlScopeRuleType.Folder, siteUrl); &lt;span style="COLOR: #008000"&gt;//save the changes
to the SSP Content Database&lt;/span&gt; scopes.Update(); &lt;span style="COLOR: #008000"&gt;//start
compilation of the scope&lt;/span&gt; scopes.StartCompilation(); } } &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; FeatureDeactivating(SPFeatureReceiverProperties
properties) { } &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; FeatureInstalled(SPFeatureReceiverProperties
properties) { } &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; FeatureUninstalling(SPFeatureReceiverProperties
properties) { } } }&lt;/pre&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=9b1a6c79-5750-4ed8-a063-84719caf0c85" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,9b1a6c79-5750-4ed8-a063-84719caf0c85.aspx</comments>
      <category>Development</category>
      <category>Microsoft Office SharePoint Server</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=84906cb2-cc3c-4db8-a7b2-a8a77cd11645</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,84906cb2-cc3c-4db8-a7b2-a8a77cd11645.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,84906cb2-cc3c-4db8-a7b2-a8a77cd11645.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=84906cb2-cc3c-4db8-a7b2-a8a77cd11645</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've started getting tired of following the steps on Mike Ammerlaan's blog for <a href="http://sharepoint.microsoft.com/blogs/mike/Lists/Posts/Post.aspx?ID=3" target="_blank">Integrating
ASP.NET AJAX with SharePoint</a>.  It's not that the steps are difficult to follow,
but there's a lot of stuff you need to get right if you want to have all the ASP.NET
AJAX functionality available in MOSS.
</p>
        <p>
To ease my own pains with this process - and hopefully yours, too - I've published
to CodePlex some <a href="http://www.codeplex.com/ajaxifymoss" target="_blank">STSADM
extensions for adding and removing the needed ASP.NET AJAX</a> entries to the web.config
file. 
</p>
        <p>
Much thanks to <a href="http://stsadm.blogspot.com/" target="_blank">Gary Lapointe</a> for
providing the source code for <a href="http://stsadm.blogspot.com/2007/08/stsadm-commands_09.html" target="_blank">his
STSADM extensions</a>.  It served as a great starting place for me and decreased
the ramp-up time for creating my own custom STSADM commands tremendously.
</p>
        <p>
          <a href="http://www.codeplex.com/ajaxifymoss">View CodePlex site to download STSADM
extensions for ASP.NET AJAX</a>
        </p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=84906cb2-cc3c-4db8-a7b2-a8a77cd11645" />
      </body>
      <title>STSADM Extensions for ASP.NET AJAX Configuration in MOSS</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,84906cb2-cc3c-4db8-a7b2-a8a77cd11645.aspx</guid>
      <link>http://blog.richfinn.net/blog/2008/05/12/STSADMExtensionsForASPNETAJAXConfigurationInMOSS.aspx</link>
      <pubDate>Mon, 12 May 2008 18:30:55 GMT</pubDate>
      <description>&lt;p&gt;
I've started getting tired of following the steps on Mike Ammerlaan's blog for &lt;a href="http://sharepoint.microsoft.com/blogs/mike/Lists/Posts/Post.aspx?ID=3" target=_blank&gt;Integrating
ASP.NET AJAX with SharePoint&lt;/a&gt;.&amp;nbsp; It's not that the steps are difficult to follow,
but there's a lot of stuff you need to get right if you want to have all the ASP.NET
AJAX functionality available in MOSS.
&lt;/p&gt;
&lt;p&gt;
To ease my own pains with this process - and hopefully yours, too - I've published
to CodePlex some &lt;a href="http://www.codeplex.com/ajaxifymoss" target=_blank&gt;STSADM
extensions for adding and removing the needed ASP.NET AJAX&lt;/a&gt; entries to the web.config
file. 
&lt;/p&gt;
&lt;p&gt;
Much thanks to &lt;a href="http://stsadm.blogspot.com/" target=_blank&gt;Gary Lapointe&lt;/a&gt; for
providing the source code for &lt;a href="http://stsadm.blogspot.com/2007/08/stsadm-commands_09.html" target=_blank&gt;his
STSADM extensions&lt;/a&gt;.&amp;nbsp; It served as a great starting place for me and decreased
the ramp-up time for creating my own custom STSADM commands tremendously.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codeplex.com/ajaxifymoss"&gt;View CodePlex site to download STSADM
extensions for ASP.NET AJAX&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=84906cb2-cc3c-4db8-a7b2-a8a77cd11645" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,84906cb2-cc3c-4db8-a7b2-a8a77cd11645.aspx</comments>
      <category>Development</category>
      <category>Microsoft Office SharePoint Server</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=78838983-d528-4336-9168-8c92b431119f</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,78838983-d528-4336-9168-8c92b431119f.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,78838983-d528-4336-9168-8c92b431119f.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=78838983-d528-4336-9168-8c92b431119f</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <strong>
            <font color="#ff0000">&lt;update date="6/19/08"&gt;</font>
            <br />
          </strong>
          <br />
Telerik has released the MOSS compatable version of the RadEditor that places all
needed files as class resource files in the _wpresource directory.  They've also
made some very nice improvements over the previous release that make extending and
customizing the editor very easy.  If you purchase and deploy the Full-Featrured
RadEditor, you get ALL of the controls in the Telerik ASP.NET AJAX control suite available
to you in MOSS.  Very nice...<br /><br /><strong><font color="#ff0000">&lt;/update&gt;</font></strong></p>
        <p>
 
</p>
        <p>
Yesterday I posted about using the new RadControls for ASP.NET AJAX in MOSS, and I
started moving the old controls in my current project over to the new ones. 
Just now, I found a problem when I was converting the RadEditor from the old to the
new.
</p>
        <p>
In the Telerik <a href="http://www.telerik.com/help/aspnet-ajax/gettingstarted.html" target="_blank">online
documentation for getting started with the RadEditor</a>, they say that in a standard
ASP.NET AJAX application, you need to utilize the App_GlobalResources and App_Data
ASP.NET folders in order to use the RadEditor.
</p>
        <p>
That's not any different for MOSS.
</p>
        <p>
In the root of your SharePoint Web Application (\Inetpub\wwwroot\wss\VirtualDirectories\YourWebApp)
create a folder named App_Data.  Drop in the RadSpell folder from the App_Data
folder of the RadControls install directory (C:\Program Files\Telerik\RadControls
for ASPNET AJAX Q1 2008).  Then, drop the RESX files from the App_GlobalResources
directory located at the Telerik install root into the already present App_GlobalResources
directory in your SharePoint Web Application root.
</p>
        <p>
I think there's probably a better a way to do this using a Solution, but I'll worry
about that later.  Not sure if we can deploy into those folders via a WSP - I
don't think so.  I know there's a public property on the RadEditor that allows
you to point to where the RadSpell directory is, but can't find anything for the RESX
files.
</p>
        <p>
Also, make sure you add the following line to the HttpHandlers section of your web
config file, or else, spellcheck won't work:<br /><font color="#0000ff">&lt;</font><font color="maroon">add</font><font color="red">verb</font><font color="black">=</font><font color="blue">"*"</font><font color="red">validate</font><font color="black">=</font><font color="blue">"false"</font><font color="red">path</font><font color="black">=</font><font color="blue">"Telerik.Web.UI.SpellCheckHandler.axd"</font><font color="red">type</font><font color="black">=</font><font color="blue">"Telerik.Web.UI.SpellCheckHandler,
Telerik.Web.UI"/&gt;</font></p>
        <p>
Anyway, here's a screen shot of the unskinned and unmodified RadEditor running in
my local MOSS environment.  This is not tied into a publishing placeholder, but
that's not what I'm using it for right now...
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowdoIgett.NETAJAXPrometheustoworkinMOSS_DDB2/image_2.png">
            <img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="615" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowdoIgett.NETAJAXPrometheustoworkinMOSS_DDB2/image_thumb.png" width="745" border="0" />
          </a>
        </p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=78838983-d528-4336-9168-8c92b431119f" />
      </body>
      <title>How do I get the RadEditor for ASP.NET AJAX (Prometheus) to work in MOSS?</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,78838983-d528-4336-9168-8c92b431119f.aspx</guid>
      <link>http://blog.richfinn.net/blog/2008/05/08/HowDoIGetTheRadEditorForASPNETAJAXPrometheusToWorkInMOSS.aspx</link>
      <pubDate>Thu, 08 May 2008 21:45:56 GMT</pubDate>
      <description>&lt;p&gt;
&lt;strong&gt;&lt;font color=#ff0000&gt;&amp;lt;update date="6/19/08"&amp;gt;&lt;/font&gt;
&lt;br&gt;
&lt;/strong&gt;
&lt;br&gt;
Telerik has released the MOSS compatable version of the RadEditor that places all
needed files as class resource files in the _wpresource directory.&amp;nbsp; They've also
made some very nice improvements over the previous release that make extending and
customizing the editor very easy.&amp;nbsp; If you&amp;nbsp;purchase and deploy the Full-Featrured
RadEditor, you get ALL of the controls in the Telerik ASP.NET AJAX control suite available
to you in MOSS.&amp;nbsp; Very nice...&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;font color=#ff0000&gt;&amp;lt;/update&amp;gt;&lt;/font&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Yesterday I posted about using the new RadControls for ASP.NET AJAX in MOSS, and I
started moving the old controls in my current project over to the new ones.&amp;nbsp;
Just now, I found a problem when I was converting the RadEditor from the old to the
new.
&lt;/p&gt;
&lt;p&gt;
In the Telerik &lt;a href="http://www.telerik.com/help/aspnet-ajax/gettingstarted.html" target=_blank&gt;online
documentation for getting started with the RadEditor&lt;/a&gt;, they say that in a standard
ASP.NET AJAX application, you need to utilize the App_GlobalResources and App_Data
ASP.NET folders in order to use the RadEditor.
&lt;/p&gt;
&lt;p&gt;
That's not any different for MOSS.
&lt;/p&gt;
&lt;p&gt;
In the root of your SharePoint Web Application (\Inetpub\wwwroot\wss\VirtualDirectories\YourWebApp)
create a folder named App_Data.&amp;nbsp; Drop in the RadSpell folder from the App_Data
folder of the RadControls install directory (C:\Program Files\Telerik\RadControls
for ASPNET AJAX Q1 2008).&amp;nbsp; Then, drop the RESX files from the App_GlobalResources
directory located at the Telerik install root into the already present App_GlobalResources
directory in your SharePoint Web Application root.
&lt;/p&gt;
&lt;p&gt;
I think there's probably a better a way to do this using a Solution, but I'll worry
about that later.&amp;nbsp; Not sure if we can deploy into those folders via a WSP - I
don't think so.&amp;nbsp; I know there's a public property on the RadEditor that allows
you to point to where the RadSpell directory is, but can't find anything for the RESX
files.
&lt;/p&gt;
&lt;p&gt;
Also, make sure you add the following line to the HttpHandlers section of your web
config file, or else, spellcheck won't work:&lt;br&gt;
&lt;font color=#0000ff&gt;&amp;lt;&lt;/font&gt;&lt;font color=maroon&gt;add&lt;/font&gt; &lt;font color=red&gt;verb&lt;/font&gt;&lt;font color=black&gt;=&lt;/font&gt;&lt;font color=blue&gt;"*"&lt;/font&gt; &lt;font color=red&gt;validate&lt;/font&gt;&lt;font color=black&gt;=&lt;/font&gt;&lt;font color=blue&gt;"false"&lt;/font&gt; &lt;font color=red&gt;path&lt;/font&gt;&lt;font color=black&gt;=&lt;/font&gt;&lt;font color=blue&gt;"Telerik.Web.UI.SpellCheckHandler.axd"&lt;/font&gt; &lt;font color=red&gt;type&lt;/font&gt;&lt;font color=black&gt;=&lt;/font&gt;&lt;font color=blue&gt;"Telerik.Web.UI.SpellCheckHandler,
Telerik.Web.UI"/&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Anyway, here's a screen shot of the unskinned and unmodified RadEditor running in
my local MOSS environment.&amp;nbsp; This is not tied into a publishing placeholder, but
that's not what I'm using it for right now...
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowdoIgett.NETAJAXPrometheustoworkinMOSS_DDB2/image_2.png"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=615 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowdoIgett.NETAJAXPrometheustoworkinMOSS_DDB2/image_thumb.png" width=745 border=0&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=78838983-d528-4336-9168-8c92b431119f" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,78838983-d528-4336-9168-8c92b431119f.aspx</comments>
      <category>Development</category>
      <category>Microsoft Office SharePoint Server</category>
      <category>Telerik</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=cb6e174c-c7a1-43fb-ada3-dc596caeaff9</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,cb6e174c-c7a1-43fb-ada3-dc596caeaff9.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,cb6e174c-c7a1-43fb-ada3-dc596caeaff9.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=cb6e174c-c7a1-43fb-ada3-dc596caeaff9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've been a huge proponent of <a href="http://www.telerik.com" target="_blank">Telerik</a> because
of their very impressive controls, support, and documentation - let alone for the
fact they are very easy to use.  Now that I've been working with SharePoint 2007
for a few years, I've found that Telerik's controls fit very nicely into MOSS. 
Andrew Connell even created an <a href="http://www.telerik.com/documents/MOSS_whitepaper.pdf" target="_blank">integration
whitepaper</a> and some <a href="http://www.telerik.com/documents/moss_utilities.zip" target="_blank">nice
utility EXEs</a> to help package the individual controls into WSPs to deploy them
into MOSS.
</p>
        <p>
Then, on April 15 of this year, Telerik released version 2008.1 of their new <a href="http://www.telerik.com/products/aspnet-ajax/overview.aspx" target="_blank">RadControls
Suite for ASP.NET AJAX</a>, formerly named 'Prometheus'.  I purchased my upgrade
from the old RadControl suite to the Prometheus controls yesterday, and there was
something that I noticed immediately which frightened me a little.  There's only
one assembly - Telerik.Web.UI.ddl - and nowhere that I could see on the Telerik site
that allowed me to get an individual control.
</p>
        <p>
Uh oh.  
</p>
        <p>
How do I get these amazing controls into SharePoint and start benefiting from that
ASP.NET AJAX goodness?  Do I package the whole thing into a WSP? I hope not!
That'll be a huge WSP file with all those skins getting packaged up!
</p>
        <p>
I was worried, and started thinking that I was going to be stuck with a legacy version
of some great controls, being forced to sit  here watching new versions go sailing
past every three months.  No way!!!
</p>
        <p>
I figured that there had to be a way, and if it took a massive WSP, so be it, so I
started poking around the new control suite to see how it ticked.  There's no
RadControls directory, so AC's walk-through documentation won't work.
</p>
        <p>
I tested the RadSlider locally, and I asked myself, where do the images come from
in the control?
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_4.png">
            <img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="111" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_1.png" width="241" border="0" />
          </a>
        </p>
        <p>
I got out my trusty IE Dev Toolbar and took a peak.  I liked what I saw.
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_8.png">
            <img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="58" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_3.png" width="315" border="0" />
          </a>
        </p>
        <p>
WebResource.axd!
</p>
        <p>
Now, I don't care if this image is an embedded resource file or not.  It's not
a direct reference to an image, and that's what matters.  What happens if a skin
is applied? Where's the image then?
</p>
        <p>
Office2007 skin:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_10.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="27" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_4.png" width="215" border="0" /></a></p>
        <p>
IE Dev Toolbar:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_12.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="52" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_5.png" width="304" border="0" /></a></p>
        <p>
Still a WebResource.axd. Excellent!
</p>
        <p>
So - here's the deal.  Install the entire RadControls EXE which you get via your
Telerik account on your SharePoint server.  Deploy the Telerik.Web.UI.dll to
your SharePoint application's bin, and add the following line to the SafeControls
block in the web.config
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_14.png">
            <img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="20" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_6.png" width="658" border="0" />
          </a>
        </p>
        <p>
That's it...
</p>
        <p>
Then, you can use any control in the entire suite just by adding the following Register
tag to the page where you're using it<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_16.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="29" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_7.png" width="631" border="0" /></a></p>
        <p>
No more individual control references anywhere! Sweet!
</p>
        <p>
For example - the RadTreeView control:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_18.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="34" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_8.png" width="750" border="0" /></a></p>
        <p>
You can even deploy this inside your custom WSP by using the various Visual Studio
project templates available on CodePlex.  I know of three that support deploying
other assemblies, so finding them shouldn't be hard.  <a href="http://www.codeplex.com/wspprojecttemplate" target="_blank">I'm
partial to this one</a>, and I know <a href="http://www.codeplex.com/stsdev" target="_blank">stsdev</a> is
really nice, as well.  You can even reference the Telerik control assembly server-side,
too.  Just make sure you set the CopyLocal property of the reference to False.
</p>
        <p>
You won't get IntelliSense for the controls, but as far as MOSS dev goes - what else
is new, right?  There's plenty of documentation on Telerik's site to help with
the control properties and client-side API.
</p>
        <p>
Here's the new RadSlider with the Office2007 skin running in one of my MOSS environment:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_20.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="230" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_9.png" width="483" border="0" /></a></p>
        <p>
I've started moving over all of the controls in my current project from the old version
of the suite to the new version, and there's been some minor changes, but nothing
of a pain at all.  The changes I have seen have been good ones, so it's been
worth it so far.  Besides, these controls ROCK!  I haven't gone through
and seen which ones work and which don't, but I'm sure it'll be similar to the old
version of the suite.  I know the RadSplitter was a hassle before, will have
to try it again with the new ones.  I've even noticed some performance gains
over the old controls.
</p>
        <p>
So, if you haven't picked up on it, I highly recommend these controls.  Not only
will they completely expand your MOSS UI potential, but they will get you to install
Service Pack 1 and <a href="http://sharepoint.microsoft.com/blogs/mike/Lists/Posts/Post.aspx?ID=3" target="_blank">configure
ASP.NET AJAX in SharePoint</a> if you haven't yet.  Remember, SP1 is required
if you want to use ASP.NET AJAX, therefore, it's required to use these controls.
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=cb6e174c-c7a1-43fb-ada3-dc596caeaff9" />
      </body>
      <title>Integrating Newest Telerik RadControls for ASP.NET AJAX into SharePoint</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,cb6e174c-c7a1-43fb-ada3-dc596caeaff9.aspx</guid>
      <link>http://blog.richfinn.net/blog/2008/05/07/IntegratingNewestTelerikRadControlsForASPNETAJAXIntoSharePoint.aspx</link>
      <pubDate>Wed, 07 May 2008 22:43:12 GMT</pubDate>
      <description>&lt;p&gt;
I've been a huge proponent of &lt;a href="http://www.telerik.com" target=_blank&gt;Telerik&lt;/a&gt;&amp;nbsp;because
of their very impressive controls, support, and documentation - let alone for the
fact they are very easy to use.&amp;nbsp; Now that I've been working with SharePoint 2007
for a few years, I've found that Telerik's controls fit very nicely into MOSS.&amp;nbsp;
Andrew Connell even created an &lt;a href="http://www.telerik.com/documents/MOSS_whitepaper.pdf" target=_blank&gt;integration
whitepaper&lt;/a&gt; and some &lt;a href="http://www.telerik.com/documents/moss_utilities.zip" target=_blank&gt;nice
utility EXEs&lt;/a&gt; to help package the individual controls into WSPs to deploy them
into MOSS.
&lt;/p&gt;
&lt;p&gt;
Then, on April 15 of this year, Telerik released version 2008.1 of their new &lt;a href="http://www.telerik.com/products/aspnet-ajax/overview.aspx" target=_blank&gt;RadControls
Suite for ASP.NET AJAX&lt;/a&gt;, formerly named 'Prometheus'.&amp;nbsp; I purchased my upgrade
from the old RadControl suite to the Prometheus controls yesterday, and there was
something that I noticed immediately which frightened me a little.&amp;nbsp; There's only
one assembly - Telerik.Web.UI.ddl - and nowhere that I could see on the Telerik site
that allowed me to get an individual control.
&lt;/p&gt;
&lt;p&gt;
Uh oh.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
How do I get these amazing controls into SharePoint and start benefiting from that
ASP.NET AJAX goodness?&amp;nbsp; Do I package the whole thing into a WSP? I hope not!
That'll be a huge WSP file with all those skins getting packaged up!
&lt;/p&gt;
&lt;p&gt;
I was worried, and started thinking that I was going to be stuck with a legacy version
of some great controls, being forced to sit&amp;nbsp; here watching new versions go sailing
past every three months.&amp;nbsp; No way!!!
&lt;/p&gt;
&lt;p&gt;
I figured that there had to be a way, and if it took a massive WSP, so be it, so I
started poking around the new control suite to see how it ticked.&amp;nbsp; There's no
RadControls directory, so AC's walk-through documentation won't work.
&lt;/p&gt;
&lt;p&gt;
I tested the RadSlider locally, and I asked myself, where do the images come from
in the control?
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_4.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=111 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_1.png" width=241 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
I got out my trusty IE Dev Toolbar and took a peak.&amp;nbsp; I liked what I saw.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_8.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=58 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_3.png" width=315 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
WebResource.axd!
&lt;/p&gt;
&lt;p&gt;
Now, I don't care if this image is an embedded resource file or not.&amp;nbsp; It's not
a direct reference to an image, and that's what matters.&amp;nbsp; What happens if a skin
is applied? Where's the image then?
&lt;/p&gt;
&lt;p&gt;
Office2007 skin:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_10.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=27 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_4.png" width=215 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
IE Dev Toolbar:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_12.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=52 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_5.png" width=304 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Still a WebResource.axd. Excellent!
&lt;/p&gt;
&lt;p&gt;
So - here's the deal.&amp;nbsp; Install the entire RadControls EXE which you get via your
Telerik account on your SharePoint server.&amp;nbsp; Deploy the Telerik.Web.UI.dll to
your SharePoint application's bin, and add the following line to the SafeControls
block in the web.config
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_14.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=20 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_6.png" width=658 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
That's it...
&lt;/p&gt;
&lt;p&gt;
Then, you can use any control in the entire suite just by adding the following Register
tag to the page where you're using it&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_16.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=29 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_7.png" width=631 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
No more individual control references anywhere! Sweet!
&lt;/p&gt;
&lt;p&gt;
For example - the RadTreeView control:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_18.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=34 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_8.png" width=750 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
You can even deploy this inside your custom WSP by using the various Visual Studio
project templates available on CodePlex.&amp;nbsp; I know of three that support deploying
other assemblies, so finding them shouldn't be hard.&amp;nbsp; &lt;a href="http://www.codeplex.com/wspprojecttemplate" target=_blank&gt;I'm
partial to this one&lt;/a&gt;, and I know &lt;a href="http://www.codeplex.com/stsdev" target=_blank&gt;stsdev&lt;/a&gt; is
really nice, as well.&amp;nbsp; You can even reference the Telerik control assembly server-side,
too.&amp;nbsp; Just make sure you set the CopyLocal property of the reference to False.
&lt;/p&gt;
&lt;p&gt;
You won't get IntelliSense for the controls, but as far as MOSS dev goes - what else
is new, right?&amp;nbsp; There's plenty of documentation on Telerik's site to help with
the control properties and client-side API.
&lt;/p&gt;
&lt;p&gt;
Here's the new RadSlider with the Office2007 skin running in one of my MOSS environment:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_20.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=230 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_9.png" width=483 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
I've started moving over all of the controls in my current project from the old version
of the suite to the new version, and there's been some minor changes, but nothing
of a pain at all.&amp;nbsp; The changes I have seen have been good ones, so it's been
worth it so far.&amp;nbsp; Besides, these controls ROCK!&amp;nbsp; I haven't gone through
and seen which ones work and which don't, but I'm sure it'll be similar to the old
version of the suite.&amp;nbsp; I know the RadSplitter was a hassle before, will have
to try it again with the new ones.&amp;nbsp; I've even noticed some performance gains
over the old controls.
&lt;/p&gt;
&lt;p&gt;
So, if you haven't picked up on it, I highly recommend these controls.&amp;nbsp; Not only
will they completely expand your MOSS UI potential, but they will get you to install
Service Pack 1 and &lt;a href="http://sharepoint.microsoft.com/blogs/mike/Lists/Posts/Post.aspx?ID=3" target=_blank&gt;configure
ASP.NET AJAX in SharePoint&lt;/a&gt; if you haven't yet.&amp;nbsp; Remember, SP1 is required
if you want to use ASP.NET AJAX, therefore, it's required to use these controls.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=cb6e174c-c7a1-43fb-ada3-dc596caeaff9" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,cb6e174c-c7a1-43fb-ada3-dc596caeaff9.aspx</comments>
      <category>Development</category>
      <category>Microsoft Office SharePoint Server</category>
      <category>Telerik</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=4cff5d82-1e1b-4fe1-a6df-a75b2f3ee71c</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,4cff5d82-1e1b-4fe1-a6df-a75b2f3ee71c.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,4cff5d82-1e1b-4fe1-a6df-a75b2f3ee71c.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=4cff5d82-1e1b-4fe1-a6df-a75b2f3ee71c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Having spent a great deal of time developing Microsoft Content Management Server 2002
solutions, I've found there's a bunch of stuff I miss from the MCMS API.  The
single thing I miss the most:
</p>
        <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">CmsContext.Searches.GetByGuid(<span style="COLOR: #0000ff">string</span>) <span style="COLOR: #0000ff">as</span> HierarchyItem;</pre>
        <p>
Being able to get any object - Channel, Template, Posting, Resource - by just it's
guid was huge.  Even cooler was that you could grab an object out of anywhere
in the hierarchy/taxonomy.  In SharePoint, you have to know the Web, List, and
Item guid to find anything.  This one method in MCMS allowed a huge number of
possibilities for custom dev with very limited coding time.
</p>
        <p>
Another thing I miss from MCMS is the functionality of Connected Postings/Templates
and an API that could CRUD them without hardly any effort.  I know Variations
in SharePoint comes close, but IMO, it just doesn't seem to be at the same level and
simplicity of MCMS.  Also, there's very little documentation around any of the
Variation related objects because they've all been marked as internal.
</p>
        <p>
Luckily, <a href="http://www.sharepointblog.nl/">Michiel Lankamp</a> figured this
out - a long time ago - using Reflector <font size="1">(duh)</font> and exposed that
yes, <a href="http://blog.richfinn.net/blog/2007/09/25/RelateToSharePointAsADatabaseTheTwoLineUpPrettyWell.aspx" target="_blank">everything
in SharePoint is a list</a><font size="1">(thanks Matt)</font>. As Michiel points
out, there's two variation lists. One called VariationSettings and one called VariationLabels
who's guids are stored as Properties on the root web of the site collection.
</p>
        <p>
Once you get the lists, how do you create the hierarchy? <a href="http://www.sharepointblog.nl/post/2007/10/Enable-variations-programmatically.aspx" target="_blank">Check
out Michiel's post to see how</a>. Pretty clever...
</p>
        <p>
I haven't tried this, and based on the four comments, not many other people have,
either.  Also looks like it could be buggy.
</p>
        <p>
          <a href="http://www.sharepointblog.nl/post/2007/10/Enable-variations-programmatically.aspx" target="_blank">Enable
variations programmatically - Michiel Lankamp</a>
          <br />
        </p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=4cff5d82-1e1b-4fe1-a6df-a75b2f3ee71c" />
      </body>
      <title>Programmatically Manipulating Variations</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,4cff5d82-1e1b-4fe1-a6df-a75b2f3ee71c.aspx</guid>
      <link>http://blog.richfinn.net/blog/2008/04/29/ProgrammaticallyManipulatingVariations.aspx</link>
      <pubDate>Tue, 29 Apr 2008 05:32:57 GMT</pubDate>
      <description>&lt;p&gt;
Having spent a great deal of time developing Microsoft Content Management Server 2002
solutions, I've found there's a bunch of stuff I miss from the MCMS API.&amp;nbsp; The
single thing I miss the most:
&lt;/p&gt;
&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;CmsContext.Searches.GetByGuid(&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;) &lt;span style="COLOR: #0000ff"&gt;as&lt;/span&gt; HierarchyItem;&lt;/pre&gt;
&lt;p&gt;
Being able to get any object - Channel, Template, Posting, Resource - by just it's
guid was huge.&amp;nbsp; Even cooler was that you could grab an object out of anywhere
in the hierarchy/taxonomy.&amp;nbsp; In SharePoint, you have to know the Web, List, and
Item guid to find anything.&amp;nbsp; This one method in MCMS allowed a huge number of
possibilities for custom dev with very limited coding time.
&lt;/p&gt;
&lt;p&gt;
Another thing I miss from MCMS is the functionality of Connected Postings/Templates
and an API that could CRUD them without hardly any effort.&amp;nbsp; I know Variations
in SharePoint comes close, but IMO, it just doesn't seem to be at the same level and
simplicity of MCMS.&amp;nbsp; Also, there's very little documentation around any of the
Variation related objects because they've all been marked as internal.
&lt;/p&gt;
&lt;p&gt;
Luckily, &lt;a href="http://www.sharepointblog.nl/"&gt;Michiel Lankamp&lt;/a&gt; figured this
out - a long time ago - using Reflector &lt;font size=1&gt;(duh)&lt;/font&gt; and exposed that
yes, &lt;a href="http://blog.richfinn.net/blog/2007/09/25/RelateToSharePointAsADatabaseTheTwoLineUpPrettyWell.aspx" target=_blank&gt;everything
in SharePoint is a list&lt;/a&gt; &lt;font size=1&gt;(thanks Matt)&lt;/font&gt;. As Michiel points out,
there's two variation lists. One called VariationSettings and one called VariationLabels
who's guids are stored as Properties on the root web of the site collection.
&lt;/p&gt;
&lt;p&gt;
Once you get the lists, how do you create the hierarchy? &lt;a href="http://www.sharepointblog.nl/post/2007/10/Enable-variations-programmatically.aspx" target=_blank&gt;Check
out Michiel's post to see how&lt;/a&gt;. Pretty clever...
&lt;/p&gt;
&lt;p&gt;
I haven't tried this, and based on the four comments, not many other people have,
either.&amp;nbsp; Also looks like it could be buggy.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.sharepointblog.nl/post/2007/10/Enable-variations-programmatically.aspx" target=_blank&gt;Enable
variations programmatically - Michiel Lankamp&lt;/a&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=4cff5d82-1e1b-4fe1-a6df-a75b2f3ee71c" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,4cff5d82-1e1b-4fe1-a6df-a75b2f3ee71c.aspx</comments>
      <category>Development</category>
      <category>Microsoft Office SharePoint Server</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=39e7b048-2b5b-4451-a288-eb09b48a6dca</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,39e7b048-2b5b-4451-a288-eb09b48a6dca.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,39e7b048-2b5b-4451-a288-eb09b48a6dca.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=39e7b048-2b5b-4451-a288-eb09b48a6dca</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
So a client came to us today complaining that their SharePoint site was dead. 
Looking at the performance monitor revealed that the processor was maxed out. 
SQL showed around 1300 active connections.  IISReset and bouncing of the server
proved to be of little help.
</p>
        <p>
We shut the firewall off to the outside and were able to get the default page of the
site to render without any problems.
</p>
        <p>
After going back and forth troubleshooting the server for most of the morning, we
took a look at the site's default page's web part maintenance page which showed a
total of 88 web parts on the page, 54 of them being closed and in the Web Part Page
Gallery.  All 54 of those web parts were Content Editor Web Parts.
</p>
        <p>
wow
</p>
        <p>
That's a lot of web parts.  According to TechNet, the <a href="http://technet2.microsoft.com/Office/en-us/library/6a13cd9f-4b44-40d6-85aa-c70a8e5c34fe1033.mspx?mfr=true" target="_blank">maximum
recommended number of web parts on a page</a> is 50.  What the client had been
doing was adding CEWPs to the page and once the content was no longer valid, hitting
the 'X' on the web part, closing it, but not deleting it.  Doing so caused SharePoint
to still get the web part from the database, just not render it on the page.
</p>
        <p>
According to MSDN documentation titled '<a href="http://msdn2.microsoft.com/en-us/library/ms916848.aspx" target="_blank">A
Developer's Introduction to Web Parts</a>':
</p>
        <blockquote>
          <p>
A Web Part Page gallery contains Web Parts that are already added to the current page.
This may seem paradoxical at first. Why would you need to add a Web Part that is already
added to the page? The reason this is useful is that you can add a Web Part to a page
and then close the Web Part. To close a Web Part, click the arrowhead on the right
side of the Web Part title bar, and then click Close. A closed Web Part is no longer
visible on the page, but it is still a member of the Web Part Page gallery for that
page. The Web Part is still associated with the page by an entry in the configuration
database of the server running Windows SharePoint Services, which also stores any
shared or personalized property settings for the Web Part. 
</p>
          <p>
            <br />
You can add a Web Part to a page, personalize it extensively, close it, and then later
add it back to the page with the personalization intact. To bring back a closed Web
Part, select it from the Web Part Page gallery. 
</p>
          <p>
            <b>
              <br />
Note</b>   To truly delete a Web Part from a page, you must click the <b>Modify
My Page</b> menu (or the <b>Modify Shared Page</b> menu in shared view), and then
click <b>Design this Page</b> to add the <b>Delete</b> command to the drop-down menu
of the Web Part. To remove the Web Part from the page without adding it to the Web
Part Page gallery, click the arrowhead on the right side of the Web Part title bar,
and then click <b>Delete</b>.
</p>
        </blockquote>
        <p>
After removing 50 of the closed web parts from the Web Part Page Gallery, not only
was the site back up, but the response time for the page was faster than it has been
for quite some time.
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=39e7b048-2b5b-4451-a288-eb09b48a6dca" />
      </body>
      <title>What happens when you close web parts rather than deleting them?</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,39e7b048-2b5b-4451-a288-eb09b48a6dca.aspx</guid>
      <link>http://blog.richfinn.net/blog/2008/01/18/WhatHappensWhenYouCloseWebPartsRatherThanDeletingThem.aspx</link>
      <pubDate>Fri, 18 Jan 2008 22:48:10 GMT</pubDate>
      <description>&lt;p&gt;
So a client came to us today complaining that their SharePoint site was dead.&amp;nbsp;
Looking at the performance monitor revealed that the processor was maxed out.&amp;nbsp;
SQL showed around 1300 active connections.&amp;nbsp; IISReset and bouncing of the server
proved to be of little help.
&lt;/p&gt;
&lt;p&gt;
We shut the firewall off to the outside and were able to get the default page of the
site to render without any problems.
&lt;/p&gt;
&lt;p&gt;
After going back and forth troubleshooting the server for most of the morning, we
took a look at the site's default page's web part maintenance page which showed a
total of 88 web parts on the page, 54 of them being closed and in the Web Part Page
Gallery.&amp;nbsp; All 54 of those web parts were Content Editor Web Parts.
&lt;/p&gt;
&lt;p&gt;
wow
&lt;/p&gt;
&lt;p&gt;
That's a lot of web parts.&amp;nbsp; According to TechNet, the &lt;a href="http://technet2.microsoft.com/Office/en-us/library/6a13cd9f-4b44-40d6-85aa-c70a8e5c34fe1033.mspx?mfr=true" target=_blank&gt;maximum
recommended number of web parts on a page&lt;/a&gt; is 50.&amp;nbsp; What the client had been
doing was adding CEWPs to the page and once the content was no longer valid, hitting
the 'X' on the web part, closing it, but not deleting it.&amp;nbsp; Doing so caused SharePoint
to still get the web part from the database, just not render it on the page.
&lt;/p&gt;
&lt;p&gt;
According to MSDN documentation titled '&lt;a href="http://msdn2.microsoft.com/en-us/library/ms916848.aspx" target=_blank&gt;A
Developer's Introduction to Web Parts&lt;/a&gt;':
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
A Web Part Page gallery contains Web Parts that are already added to the current page.
This may seem paradoxical at first. Why would you need to add a Web Part that is already
added to the page? The reason this is useful is that you can add a Web Part to a page
and then close the Web Part. To close a Web Part, click the arrowhead on the right
side of the Web Part title bar, and then click Close. A closed Web Part is no longer
visible on the page, but it is still a member of the Web Part Page gallery for that
page. The Web Part is still associated with the page by an entry in the configuration
database of the server running Windows SharePoint Services, which also stores any
shared or personalized property settings for the Web Part. 
&lt;p&gt;
&lt;br&gt;
You can add a Web Part to a page, personalize it extensively, close it, and then later
add it back to the page with the personalization intact. To bring back a closed Web
Part, select it from the Web Part Page gallery. 
&lt;p&gt;
&lt;b&gt;
&lt;br&gt;
Note&lt;/b&gt;&amp;nbsp;&amp;nbsp; To truly delete a Web Part from a page, you must click the &lt;b&gt;Modify
My Page&lt;/b&gt; menu (or the &lt;b&gt;Modify Shared Page&lt;/b&gt; menu in shared view), and then
click &lt;b&gt;Design this Page&lt;/b&gt; to add the &lt;b&gt;Delete&lt;/b&gt; command to the drop-down menu
of the Web Part. To remove the Web Part from the page without adding it to the Web
Part Page gallery, click the arrowhead on the right side of the Web Part title bar,
and then click &lt;b&gt;Delete&lt;/b&gt;.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
After removing 50 of the closed web parts from the Web Part Page Gallery, not only
was the site back up, but the response time for the page was faster than it has been
for quite some time.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=39e7b048-2b5b-4451-a288-eb09b48a6dca" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,39e7b048-2b5b-4451-a288-eb09b48a6dca.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=efd4d366-58c1-488a-b318-5fabde4648b7</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,efd4d366-58c1-488a-b318-5fabde4648b7.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,efd4d366-58c1-488a-b318-5fabde4648b7.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=efd4d366-58c1-488a-b318-5fabde4648b7</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
When creating a WSP in WSSv3, the common development practice is to create a project
in Visual Studio using the Class Library project template.  The problem with
this is that none of the Workflow item templates are present when you try and add
a new item, so how can you add a Workflow without having a one-off Visual Studio project
just for your Workflow Feature?
</p>
        <p>
The answer is that you need to make some changes to the project file in Visual Studio
to make it happen.  The project file (<em>YourProject.csproj</em> - for example)
is the file which tells the IDE what files, references, folders, etc. are present
so that when the project is built, MSBuild knows how to compile the assembly correctly.
</p>
        <p>
The steps I'll walk you through are intended for Visual Studio 2005.  You need
to make sure you have the latest version of the <a href="http://www.microsoft.com/downloads/details.aspx?familyid=6D94E307-67D9-41AC-B2D6-0074D6286FA9&amp;displaylang=en" target="_blank">Office
Server SDK</a> available from MSDN.  The steps are pretty much identical for
Visual Studio 2008, you just need to make sure you change the targeted version of
the .NET Framework to be version 3.0.
</p>
        <p>
First thing - if you have the project under source control, you want to make sure
the project file is checked out or else you won't be able to edit it.
</p>
        <p>
Now, you want to unload the project in the IDE.  To do this, right-click the
project and choose 'Unload Project'
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_10.png">
            <img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="393" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_thumb_4.png" width="233" border="0" />
          </a>
        </p>
        <p>
Once the project has been unloaded, right-click the project again and choose 'Edit
YOURPROJECT.csproj'  This will open the project file for editing in Visual Studio.
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_12.png">
            <img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="217" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_thumb_5.png" width="273" border="0" />
          </a>
        </p>
        <p>
Locate the first PropertyGroup in the file at the top, and paste in the following
code
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 97.5%; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">ProjectTypeGuids</span>
            <span style="COLOR: #0000ff">&gt;</span>{14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}<span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">ProjectTypeGuids</span><span style="COLOR: #0000ff">&gt;</span></pre>
        </div>
        <p>
as shown below
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_14.png">
            <img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="251" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_thumb_6.png" width="702" border="0" />
          </a>
        </p>
        <p>
Now you need to make sure that the proper references are included
</p>
        <p>
Locate the ItemGroup in the project file with the references
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_16.png">
            <img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="71" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_thumb_7.png" width="244" border="0" />
          </a>
        </p>
        <p>
Paste in the following references after the last reference in the ItemGroup
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 97.5%; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">Reference</span>
            <span style="COLOR: #ff0000">Include</span>
            <span style="COLOR: #0000ff">="microsoft.office.workflow.tasks"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">Reference</span>
            <span style="COLOR: #ff0000">Include</span>
            <span style="COLOR: #0000ff">="Microsoft.Sharepoint.WorkflowActions"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">Reference</span>
            <span style="COLOR: #ff0000">Include</span>
            <span style="COLOR: #0000ff">="System.Workflow.Activities"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">Reference</span>
            <span style="COLOR: #ff0000">Include</span>
            <span style="COLOR: #0000ff">="System.Workflow.ComponentModel"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">Reference</span>
            <span style="COLOR: #ff0000">Include</span>
            <span style="COLOR: #0000ff">="System.Workflow.Runtime"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #008000">&lt;!--
you probably already have the following --&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">Reference</span>
            <span style="COLOR: #ff0000">Include</span>
            <span style="COLOR: #0000ff">="Microsoft.SharePoint"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
          </pre>
        </div>
        <p>
          <br />
Save the project file and reload the project
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_20.png">
            <img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="131" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_thumb_9.png" width="244" border="0" />
          </a>
        </p>
        <p>
Now you have the Workflow item templates available, along with the support of the
Workflow designer.
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_18.png">
            <img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="260" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_thumb_8.png" width="503" border="0" />
          </a>
        </p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_22.png">
            <img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="289" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_thumb_10.png" width="570" border="0" />
          </a>
        </p>
        <p>
The final step is to change the base class for the Workflows you create.  
</p>
        <p>
If you are creating a Sequential Workflow, you need to make sure the workflow class
inherits from <em>Microsoft.SharePoint.WorkflowActions.SharePointSequentialWorkflowActivity</em>. 
This will enable the SharePoint Workflow Activities in the Visual Studio Toolbox. 
There is no base class for the SharePoint State Machine workflow other than the standard <em>System.Workflow.Activities.StateMachineWorkflowActivity.  
</em></p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_24.png">
            <img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="347" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_thumb_11.png" width="151" border="0" />
          </a>
        </p>
        <p>
The one main piece of advice I have is to make sure you set the base class of the
Workflow class before you start working on it.<span style="mso-spacerun: yes">  </span>When
you change the base class, all child activities will be removed from the Workflow.<span style="mso-spacerun: yes">  </span>At
least they were removed for me!
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_24.png">
          </a> 
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=efd4d366-58c1-488a-b318-5fabde4648b7" />
      </body>
      <title>Enable Workflow development in a class library project being used to create a WSSv3 Solution</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,efd4d366-58c1-488a-b318-5fabde4648b7.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/12/28/EnableWorkflowDevelopmentInAClassLibraryProjectBeingUsedToCreateAWSSv3Solution.aspx</link>
      <pubDate>Fri, 28 Dec 2007 22:05:56 GMT</pubDate>
      <description>&lt;p&gt;
When creating a WSP in WSSv3, the common development practice is to create a project
in Visual Studio using the Class Library project template.&amp;nbsp; The problem with
this is that none of the Workflow item templates are present when you try and add
a new item, so how can you add a Workflow without having a one-off Visual Studio project
just for your Workflow Feature?
&lt;/p&gt;
&lt;p&gt;
The answer is that you need to make some changes to the project file in Visual Studio
to make it happen.&amp;nbsp; The project file (&lt;em&gt;YourProject.csproj&lt;/em&gt; - for example)
is the file which tells the IDE what files, references, folders, etc. are present
so that when the project is built, MSBuild knows how to compile the assembly correctly.
&lt;/p&gt;
&lt;p&gt;
The steps I'll walk you through are intended for Visual Studio 2005.&amp;nbsp; You need
to make sure you have the latest version of the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=6D94E307-67D9-41AC-B2D6-0074D6286FA9&amp;amp;displaylang=en" target=_blank&gt;Office
Server SDK&lt;/a&gt; available from MSDN.&amp;nbsp; The steps are pretty much identical for
Visual Studio 2008, you just need to make sure you change the targeted version of
the .NET Framework to be version 3.0.
&lt;/p&gt;
&lt;p&gt;
First thing - if you have the project under source control, you want to make sure
the project file is checked out or else you won't be able to edit it.
&lt;/p&gt;
&lt;p&gt;
Now, you want to unload the project in the IDE.&amp;nbsp; To do this, right-click the
project and choose 'Unload Project'
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_10.png"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=393 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_thumb_4.png" width=233 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Once the project has been unloaded, right-click the project again and choose 'Edit
YOURPROJECT.csproj'&amp;nbsp; This will open the project file for editing in Visual Studio.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_12.png"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=217 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_thumb_5.png" width=273 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Locate the first PropertyGroup in the file at the top, and paste in the following
code
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 97.5%; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;ProjectTypeGuids&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;{14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}&lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;ProjectTypeGuids&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
as shown below
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_14.png"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=251 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_thumb_6.png" width=702 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Now you need to make sure that the proper references are included
&lt;/p&gt;
&lt;p&gt;
Locate the ItemGroup in the project file with the references
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_16.png"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=71 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_thumb_7.png" width=244 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Paste in the following references after the last reference in the ItemGroup
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 97.5%; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Reference&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Include&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="microsoft.office.workflow.tasks"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Reference&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Include&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Microsoft.Sharepoint.WorkflowActions"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Reference&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Include&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="System.Workflow.Activities"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Reference&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Include&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="System.Workflow.ComponentModel"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Reference&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Include&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="System.Workflow.Runtime"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!--
you probably already have the following --&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Reference&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Include&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Microsoft.SharePoint"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;br&gt;
Save the project file and reload the project
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_20.png"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=131 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_thumb_9.png" width=244 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Now you have the Workflow item templates available, along with the support of the
Workflow designer.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_18.png"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=260 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_thumb_8.png" width=503 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_22.png"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=289 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_thumb_10.png" width=570 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
The final step is to change the base class for the Workflows you create.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
If you are creating a Sequential Workflow, you need to make sure the workflow class
inherits from &lt;em&gt;Microsoft.SharePoint.WorkflowActions.SharePointSequentialWorkflowActivity&lt;/em&gt;.&amp;nbsp;
This will enable the SharePoint Workflow Activities in the Visual Studio Toolbox.&amp;nbsp;
There is no base class for the SharePoint State Machine workflow other than the standard &lt;em&gt;System.Workflow.Activities.StateMachineWorkflowActivity.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_24.png"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=347 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_thumb_11.png" width=151 border=0&gt;&lt;/a&gt;
&lt;/p&gt;
&gt; 
&lt;p&gt;
The one main piece of advice I have is to make sure you set the base class of the
Workflow class before you start working on it.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;When
you change the base class, all child activities will be removed from the Workflow.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;At
least they were removed for me!
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowtoconfigureWorkflowinaclasslibrarypro_B655/image_24.png"&gt;&lt;/a&gt;&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=efd4d366-58c1-488a-b318-5fabde4648b7" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,efd4d366-58c1-488a-b318-5fabde4648b7.aspx</comments>
      <category>Development</category>
      <category>Microsoft Office SharePoint Server</category>
      <category>WSP Development</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=ef5c964f-ad19-4bdf-855d-69a894950a93</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,ef5c964f-ad19-4bdf-855d-69a894950a93.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,ef5c964f-ad19-4bdf-855d-69a894950a93.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=ef5c964f-ad19-4bdf-855d-69a894950a93</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Being Asp.Net developers, we all know we can send email from within custom code using
the virtual SMPT server running on the Web Front End server where our code is running,
but what if you want to use the same SMTP/Exchange settings you configured in Central
Administration?
</p>
        <p>
Luckily, there's a way to do so.
</p>
        <p>
I like to create an object I call <em>SPEmail</em> for encapsulation, then within
the Send method go dig for the info I need from the SPAdministrationWebApplication.Local
and it's OutboundMailServerInstance property.  Once you have these objects, the
information entered in Central Admin can be obtained and be used to set up the standard
System.Net.Mail SmtpClient and MailMessage objects.  
</p>
        <p>
No messing with the web.config file. Nice.
</p>
        <p>
Here's the code for my SPEmail object:
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 97.5%; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #0000ff">public</span>
            <span style="COLOR: #0000ff">class</span> SPEmail
{ <span style="COLOR: #cc6633">#region</span> Constructors <span style="COLOR: #0000ff">public</span> SPEmail()
{ } <span style="COLOR: #cc6633">#endregion</span><span style="COLOR: #cc6633">#region</span> Private
Members <span style="COLOR: #0000ff">string</span> _To = <span style="COLOR: #0000ff">string</span>.Empty; <span style="COLOR: #0000ff">string</span> _Subject
= <span style="COLOR: #0000ff">string</span>.Empty; <span style="COLOR: #0000ff">string</span> _Body
= <span style="COLOR: #0000ff">string</span>.Empty; <span style="COLOR: #0000ff">bool</span> _HTML
= <span style="COLOR: #0000ff">false</span>; <span style="COLOR: #cc6633">#endregion</span><span style="COLOR: #cc6633">#region</span> Public
Properties <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">string</span> To
{ get { <span style="COLOR: #0000ff">return</span><span style="COLOR: #0000ff">this</span>._To;
} set { <span style="COLOR: #0000ff">this</span>._To = <span style="COLOR: #0000ff">value</span>;
} } <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">string</span> Subject
{ get { <span style="COLOR: #0000ff">return</span><span style="COLOR: #0000ff">this</span>._Subject;
} set { <span style="COLOR: #0000ff">this</span>._Subject = <span style="COLOR: #0000ff">value</span>;
} } <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">string</span> Body
{ get { <span style="COLOR: #0000ff">return</span><span style="COLOR: #0000ff">this</span>._Body;
} set { <span style="COLOR: #0000ff">this</span>._Body = <span style="COLOR: #0000ff">value</span>;
} } <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">bool</span> IsHtml
{ get { <span style="COLOR: #0000ff">return</span><span style="COLOR: #0000ff">this</span>._HTML;
} set { <span style="COLOR: #0000ff">this</span>._HTML = <span style="COLOR: #0000ff">value</span>;
} } <span style="COLOR: #cc6633">#endregion</span><span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">void</span> Send()
{ <span style="COLOR: #0000ff">string</span> smtp = <span style="COLOR: #0000ff">string</span>.Empty; <span style="COLOR: #0000ff">string</span> fromAddress
= <span style="COLOR: #0000ff">string</span>.Empty; <span style="COLOR: #0000ff">string</span> replyToAddress
= <span style="COLOR: #0000ff">string</span>.Empty; SPSecurity.RunWithElevatedPrivileges(<span style="COLOR: #0000ff">delegate</span>()
{ SPAdministrationWebApplication adminApp = Microsoft.SharePoint.Administration.SPAdministrationWebApplication.Local;
SPOutboundMailServiceInstance emailService = adminApp.OutboundMailServiceInstance;
smtp = emailService.Server.Address; fromAddress = adminApp.OutboundMailSenderAddress;
replyToAddress = adminApp.OutboundMailReplyToAddress; <span style="COLOR: #0000ff">if</span> (!<span style="COLOR: #0000ff">string</span>.IsNullOrEmpty(<span style="COLOR: #0000ff">this</span>.To))
{ SmtpClient mail = <span style="COLOR: #0000ff">new</span> SmtpClient(); MailMessage
message = <span style="COLOR: #0000ff">new</span> MailMessage(); message.From = <span style="COLOR: #0000ff">new</span> MailAddress(fromAddress);
message.To.Add(<span style="COLOR: #0000ff">this</span>.To); <span style="COLOR: #0000ff">if</span> (!<span style="COLOR: #0000ff">string</span>.IsNullOrEmpty(replyToAddress))
message.ReplyTo = <span style="COLOR: #0000ff">new</span> MailAddress(replyToAddress); <span style="COLOR: #0000ff">if</span> (!<span style="COLOR: #0000ff">string</span>.IsNullOrEmpty(<span style="COLOR: #0000ff">this</span>.Subject))
message.Subject = <span style="COLOR: #0000ff">this</span>.Subject; <span style="COLOR: #0000ff">if</span> (!<span style="COLOR: #0000ff">string</span>.IsNullOrEmpty(<span style="COLOR: #0000ff">this</span>.Body))
message.Body = <span style="COLOR: #0000ff">this</span>.Body; message.IsBodyHtml = <span style="COLOR: #0000ff">this</span>.IsHtml;
mail.Host = smtp; mail.Send(message); } }); } }</pre>
        </div>
        <p>
So - if you want to write your own, there you go!
</p>
        <p>
Sigh...
</p>
        <p>
After I put this together, I found that you can send email from within the SPUtility
object.  SPUtility.SendEmail() will take care of all this for you, too.  
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=ef5c964f-ad19-4bdf-855d-69a894950a93" />
      </body>
      <title>Send email from MOSS using Outbound Email settings in Central Administration</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,ef5c964f-ad19-4bdf-855d-69a894950a93.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/12/14/SendEmailFromMOSSUsingOutboundEmailSettingsInCentralAdministration.aspx</link>
      <pubDate>Fri, 14 Dec 2007 19:23:43 GMT</pubDate>
      <description>&lt;p&gt;
Being Asp.Net developers, we all know we can send email from within custom code using
the virtual SMPT server running on the Web Front End server where our code is running,
but what if you want to use the same SMTP/Exchange settings you configured in Central
Administration?
&lt;/p&gt;
&lt;p&gt;
Luckily, there's a way to do so.
&lt;/p&gt;
&lt;p&gt;
I like to create an object I call &lt;em&gt;SPEmail&lt;/em&gt; for encapsulation, then within
the Send method go dig for the info I need from the SPAdministrationWebApplication.Local
and it's OutboundMailServerInstance property.&amp;nbsp; Once you have these objects, the
information entered in Central Admin can be obtained and be used to set up the standard
System.Net.Mail SmtpClient and MailMessage objects.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
No messing with the web.config file. Nice.
&lt;/p&gt;
&lt;p&gt;
Here's the code for my SPEmail object:
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 97.5%; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;class&lt;/span&gt; SPEmail
{ &lt;span style="COLOR: #cc6633"&gt;#region&lt;/span&gt; Constructors &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; SPEmail()
{ } &lt;span style="COLOR: #cc6633"&gt;#endregion&lt;/span&gt; &lt;span style="COLOR: #cc6633"&gt;#region&lt;/span&gt; Private
Members &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; _To = &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;.Empty; &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; _Subject
= &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;.Empty; &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; _Body
= &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;.Empty; &lt;span style="COLOR: #0000ff"&gt;bool&lt;/span&gt; _HTML
= &lt;span style="COLOR: #0000ff"&gt;false&lt;/span&gt;; &lt;span style="COLOR: #cc6633"&gt;#endregion&lt;/span&gt; &lt;span style="COLOR: #cc6633"&gt;#region&lt;/span&gt; Public
Properties &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; To
{ get { &lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;._To;
} set { &lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;._To = &lt;span style="COLOR: #0000ff"&gt;value&lt;/span&gt;;
} } &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; Subject
{ get { &lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;._Subject;
} set { &lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;._Subject = &lt;span style="COLOR: #0000ff"&gt;value&lt;/span&gt;;
} } &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; Body
{ get { &lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;._Body;
} set { &lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;._Body = &lt;span style="COLOR: #0000ff"&gt;value&lt;/span&gt;;
} } &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;bool&lt;/span&gt; IsHtml
{ get { &lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;._HTML;
} set { &lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;._HTML = &lt;span style="COLOR: #0000ff"&gt;value&lt;/span&gt;;
} } &lt;span style="COLOR: #cc6633"&gt;#endregion&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; Send()
{ &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; smtp = &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;.Empty; &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; fromAddress
= &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;.Empty; &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; replyToAddress
= &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;.Empty; SPSecurity.RunWithElevatedPrivileges(&lt;span style="COLOR: #0000ff"&gt;delegate&lt;/span&gt;()
{ SPAdministrationWebApplication adminApp = Microsoft.SharePoint.Administration.SPAdministrationWebApplication.Local;
SPOutboundMailServiceInstance emailService = adminApp.OutboundMailServiceInstance;
smtp = emailService.Server.Address; fromAddress = adminApp.OutboundMailSenderAddress;
replyToAddress = adminApp.OutboundMailReplyToAddress; &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (!&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;.IsNullOrEmpty(&lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;.To))
{ SmtpClient mail = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; SmtpClient(); MailMessage
message = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; MailMessage(); message.From = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; MailAddress(fromAddress);
message.To.Add(&lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;.To); &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (!&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;.IsNullOrEmpty(replyToAddress))
message.ReplyTo = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; MailAddress(replyToAddress); &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (!&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;.IsNullOrEmpty(&lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;.Subject))
message.Subject = &lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;.Subject; &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (!&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;.IsNullOrEmpty(&lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;.Body))
message.Body = &lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;.Body; message.IsBodyHtml = &lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;.IsHtml;
mail.Host = smtp; mail.Send(message); } }); } }&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
So - if you want to write your own, there you go!
&lt;/p&gt;
&lt;p&gt;
Sigh...
&lt;/p&gt;
&lt;p&gt;
After I put this together, I found that you can send email from within the SPUtility
object.&amp;nbsp; SPUtility.SendEmail() will take care of all this for you, too.&amp;nbsp; 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=ef5c964f-ad19-4bdf-855d-69a894950a93" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,ef5c964f-ad19-4bdf-855d-69a894950a93.aspx</comments>
      <category>Development</category>
      <category>Microsoft Office SharePoint Server</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=4fcd2f35-134f-4e42-8348-21cca7365bac</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,4fcd2f35-134f-4e42-8348-21cca7365bac.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,4fcd2f35-134f-4e42-8348-21cca7365bac.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=4fcd2f35-134f-4e42-8348-21cca7365bac</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Recently, I've seen a lot (read: <em>too many</em>) posts about the release of SP1
for <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=4191A531-A2E9-45E4-B71E-5B0B17108BD2&amp;displaylang=en" target="_blank">WSS3</a> and <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=ad59175c-ad6a-4027-8c2f-db25322f791b&amp;DisplayLang=en" target="_blank">MOSS</a>. 
I, however, wanted to post on the success of applying the upgrade.  Often, people
are concerned about patches and upgrades because they may have heard a story of a
friend who knew this guy, whose sister's IT department applied an upgrade to a mission
critical server and it caused the stock market to crash the oceans to rise two feet.  
</p>
        <p>
Well, no such luck with this set of upgrades.  Everything went fine.  Make
sure you do your research and read the documentation available in the <a href="http://technet.microsoft.com/en-us/office/sharepointserver/bb735839.aspx" target="_blank">TechNet
Service Pack 1 Resource Center</a>, though.  You don't want to be applying just
anything people tell you to.
</p>
        <p>
One thing cool that you may have heard people mention is that ajax.asp.net is now
supported in WSS3 and MOSS.  You still need to <a href="http://sharepoint.microsoft.com/blogs/mike/Lists/Posts/Post.aspx?ID=3" target="_blank">install
and configure ajax.asp.net</a>, which can cause problems if you don't do it complete
and correct, but isn't too difficult.  At least now if you have problems, you
can go to <a href="http://support.microsoft.com/" target="_blank">MS Support</a> for
help.  Here's the snippet from the <a href="http://go.microsoft.com/fwlink/?LinkId=105704&amp;clcid=0x409" target="_blank">SP1
Introduction Document</a> about ajax.asp.net in wss/moss:
</p>
        <blockquote>
          <p>
            <em>Beginning with Windows SharePoint Services 3.0 SP1 and Office SharePoint Server
2007 SP1, developers can use AJAX to create custom Web Parts. Developers can create
Web Parts for asynchronous post back by using either the Microsoft AJAX 1.0 Control
toolkit for Microsoft ASP.NET or the AJAX 1.0 Extensions for ASP.NET. See </em>
            <a href="http://go.microsoft.com/fwlink/?LinkId=105778&amp;clcid=0x409">
              <em>Microsoft
Knowledge Base article 941955</em>
            </a>
            <em> (http://go.microsoft.com/fwlink/?LinkId=105778&amp;clcid=0x409)
for more detail on the workarounds necessary to add an UpdatePanel control to a Web
Part allowing you to leverage the asynchronous AJAX postback. Note that. Service Pack
1 and the AJAX Extensions must first be installed and configured. Also, AJAX components
are not included with Service Pack 1: You must download and install them separately.<br /></em>
          </p>
          <p>
            <em>After you install the AJAX components and Service Pack 1, you can get help from
Microsoft customer support for that configuration.</em>
          </p>
        </blockquote>
        <p>
Also, I applied <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=9EC51594-992C-4165-A997-25DA01F388F5&amp;displaylang=en" target="_blank">Service
Pack 1 for the Office 2007 Suite</a> without any issues, either.  Hopefully,
if there are issues with the upgrades, people will post what they find and how they
resolved.
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=4fcd2f35-134f-4e42-8348-21cca7365bac" />
      </body>
      <title>WSS3/MOSS Service Pack 1 Applied Successfully</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,4fcd2f35-134f-4e42-8348-21cca7365bac.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/12/13/WSS3MOSSServicePack1AppliedSuccessfully.aspx</link>
      <pubDate>Thu, 13 Dec 2007 17:06:32 GMT</pubDate>
      <description>&lt;p&gt;
Recently, I've seen a lot (read: &lt;em&gt;too many&lt;/em&gt;) posts about the release of SP1
for &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=4191A531-A2E9-45E4-B71E-5B0B17108BD2&amp;amp;displaylang=en" target=_blank&gt;WSS3&lt;/a&gt; and &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=ad59175c-ad6a-4027-8c2f-db25322f791b&amp;amp;DisplayLang=en" target=_blank&gt;MOSS&lt;/a&gt;.&amp;nbsp;
I, however, wanted to post on the success of applying the upgrade.&amp;nbsp; Often, people
are concerned about patches and upgrades because they may have heard a story of a
friend who knew this guy, whose sister's IT department applied an upgrade to a mission
critical server and it caused the stock market to crash the oceans to rise two feet.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
Well, no such luck with this set of upgrades.&amp;nbsp; Everything went fine.&amp;nbsp; Make
sure you do your research and read the documentation available in the &lt;a href="http://technet.microsoft.com/en-us/office/sharepointserver/bb735839.aspx" target=_blank&gt;TechNet
Service Pack 1 Resource Center&lt;/a&gt;, though.&amp;nbsp; You don't want to be applying just
anything people tell you to.
&lt;/p&gt;
&lt;p&gt;
One thing cool that you may have heard people mention is that ajax.asp.net is now
supported in WSS3 and MOSS.&amp;nbsp; You still need to &lt;a href="http://sharepoint.microsoft.com/blogs/mike/Lists/Posts/Post.aspx?ID=3" target=_blank&gt;install
and configure ajax.asp.net&lt;/a&gt;, which can cause problems if you don't do it complete
and correct, but isn't too difficult.&amp;nbsp; At least now if you have problems, you
can go to &lt;a href="http://support.microsoft.com/" target=_blank&gt;MS Support&lt;/a&gt; for
help.&amp;nbsp; Here's the snippet from the &lt;a href="http://go.microsoft.com/fwlink/?LinkId=105704&amp;amp;clcid=0x409" target=_blank&gt;SP1
Introduction Document&lt;/a&gt; about ajax.asp.net in wss/moss:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;em&gt;Beginning with Windows SharePoint Services 3.0 SP1 and Office SharePoint Server
2007 SP1, developers can use AJAX to create custom Web Parts. Developers can create
Web Parts for asynchronous post back by using either the Microsoft AJAX 1.0 Control
toolkit for Microsoft ASP.NET or the AJAX 1.0 Extensions for ASP.NET. See &lt;/em&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkId=105778&amp;amp;clcid=0x409"&gt;&lt;em&gt;Microsoft
Knowledge Base article 941955&lt;/em&gt;&lt;/a&gt;&lt;em&gt; (http://go.microsoft.com/fwlink/?LinkId=105778&amp;amp;clcid=0x409)
for more detail on the workarounds necessary to add an UpdatePanel control to a Web
Part allowing you to leverage the asynchronous AJAX postback. Note that. Service Pack
1 and the AJAX Extensions must first be installed and configured. Also, AJAX components
are not included with Service Pack 1: You must download and install them separately.&lt;br&gt;
&lt;/em&gt; 
&lt;p&gt;
&lt;em&gt;After you install the AJAX components and Service Pack 1, you can get help from
Microsoft customer support for that configuration.&lt;/em&gt; 
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Also, I applied &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=9EC51594-992C-4165-A997-25DA01F388F5&amp;amp;displaylang=en" target=_blank&gt;Service
Pack 1 for the Office 2007 Suite&lt;/a&gt; without any issues, either.&amp;nbsp; Hopefully,
if there are issues with the upgrades, people will post what they find and how they
resolved.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=4fcd2f35-134f-4e42-8348-21cca7365bac" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,4fcd2f35-134f-4e42-8348-21cca7365bac.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=c8588c53-a393-441d-b6ac-fa7952c74336</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,c8588c53-a393-441d-b6ac-fa7952c74336.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,c8588c53-a393-441d-b6ac-fa7952c74336.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=c8588c53-a393-441d-b6ac-fa7952c74336</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I'm working on a site which uses Forms Based Authentication, and I want to extend
the standard user profile with some of my own custom properties.
</p>
        <p>
I knew you could define a ProfileProvider in the MOSS web.config file, but the tricky
part was getting and setting the values since the framework is unaware of the provider. 
You can't access the properties at design-time like a normal Asp.Net Web Application,
and I couldn't find any documentation for accessing Profile Provider Properties as
a collection like <em>propcollection["propname"]</em>.  I've seen a couple places
where people talk about creating and using custom profile provider properties in MOSS,
but there was nowhere that explained how to do it.
</p>
        <p>
Then, yesterday there was <a href="http://feeds.feedburner.com/~r/sharepointteamblog/~3/192744732/moss-2007-profile-import-tool-now-available-at-http-www-codeplex-com-sptoolbox.aspx" target="_blank">the
post on the MOSS Team Blog</a> about the <a href="http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=sptoolbox&amp;ReleaseId=8728" target="_blank">Profile
Import Tool</a> being released on CodePlex - which is very cool in itself.  I
figured, <a href="http://www.codeplex.com" target="_blank">CodePlex</a> - open source;
Profile Import - I bet they have code in their project that gets the properties out
in the way I need since it's a dynamic process for importing profile property values. 
Bingo!  Thank you Steve, Ron, and <a href="http://blogs.technet.com/lliu" target="_blank">Lawrence</a>!
</p>
        <p>
Here's the code I used to Get/Set a custom profile property named 'UserCity' for the
current user in MOSS, most of which was pulled and pieced together from the Profile
Import Tool project:
</p>
        <p>
          <strong>Profile section in MOSS web.config:</strong>
        </p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 97.5%; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">profile</span>
            <span style="COLOR: #ff0000">defaultProvider</span>
            <span style="COLOR: #0000ff">="MOSSPortalProfile"</span>
            <span style="COLOR: #ff0000">enabled</span>
            <span style="COLOR: #0000ff">="true"</span>
            <span style="COLOR: #ff0000">automaticSaveEnabled</span>
            <span style="COLOR: #0000ff">="true"</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">providers</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">add</span>
            <span style="COLOR: #ff0000">connectionStringName</span>
            <span style="COLOR: #0000ff">="AspNetDb_ConnectionString"</span>
            <span style="COLOR: #ff0000">applicationName</span>
            <span style="COLOR: #0000ff">="MOSSPortal"</span>
            <span style="COLOR: #ff0000">name</span>
            <span style="COLOR: #0000ff">="MOSSPortalProfile"</span>
            <span style="COLOR: #ff0000">type</span>
            <span style="COLOR: #0000ff">="System.Web.Profile.SqlProfileProvider,System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">providers</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">properties</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">add</span>
            <span style="COLOR: #ff0000">name</span>
            <span style="COLOR: #0000ff">="UserCity"</span>
            <span style="COLOR: #ff0000">customProviderData</span>
            <span style="COLOR: #0000ff">="DisplayName=City;"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">properties</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">profile</span>
            <span style="COLOR: #0000ff">&gt;</span>
          </pre>
        </div>
        <a href="http://11011.net/software/vspaste">
        </a>
        <p>
          <strong>
            <br />
            <br />
Get/Set C# code:</strong>
        </p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 97.5%; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 223px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #008000">//object
to hold the profile properties defined in the web config</span> SettingsPropertyCollection
profileProperties = <span style="COLOR: #0000ff">new</span> SettingsPropertyCollection(); <span style="COLOR: #008000">//get
the profile section from the web config</span> ProfileSection profileConfigSection
= (ProfileSection)ConfigurationManager.GetSection(<span style="COLOR: #006080">"system.web/profile"</span>); <span style="COLOR: #008000">//get
the collection of defined properties</span> RootProfilePropertySettingsCollection
configProperties = profileConfigSection.PropertySettings; <span style="COLOR: #008000">//create
collection to contains properties to pass to the profile provider</span> SettingsPropertyCollection
propertiesToReturn = <span style="COLOR: #0000ff">new</span> SettingsPropertyCollection(); <span style="COLOR: #008000">//populate
the collection with properties from the web config</span><span style="COLOR: #0000ff">foreach</span> (ProfilePropertySettings
configProperty <span style="COLOR: #0000ff">in</span> configProperties) { SettingsProperty
profileProperty = <span style="COLOR: #0000ff">new</span> SettingsProperty(configProperty.Name);
profileProperty.PropertyType = Type.GetType(configProperty.Type); <span style="COLOR: #0000ff">if</span> (profileProperty.PropertyType
== <span style="COLOR: #0000ff">null</span>) { profileProperty.PropertyType = <span style="COLOR: #0000ff">typeof</span>(System.String);
} profileProperty.DefaultValue = configProperty.DefaultValue; propertiesToReturn.Add(profileProperty);
} <span style="COLOR: #008000">//get the profile provider</span> ProfileProvider provider
= ProfileManager.Providers[<span style="COLOR: #006080">"MOSSPortalProfile"</span>]; <span style="COLOR: #008000">//create
a SettingsContext for the current user</span> SettingsContext userContext = <span style="COLOR: #0000ff">new</span> SettingsContext();
userContext[<span style="COLOR: #006080">"UserName"</span>] = SPContext.Current.Web.CurrentUser.Name;
userContext[<span style="COLOR: #006080">"IsAuthenticated"</span>] = <span style="COLOR: #0000ff">true</span>; <span style="COLOR: #008000">//get
the values of the properties for the current user from the database</span> SettingsPropertyValueCollection
returnVal = provider.GetPropertyValues(userContext, propertiesToReturn); <span style="COLOR: #008000">//get
the value out of the collection</span><span style="COLOR: #0000ff">string</span> contactCity
= Convert.ToString(returnVal[<span style="COLOR: #006080">"UserCity"</span>].PropertyValue); <span style="COLOR: #0000ff">if</span> (contactCity
== <span style="COLOR: #0000ff">string</span>.Empty) { contactCity = <span style="COLOR: #006080">"Denver"</span>;
} <span style="COLOR: #008000">//set value</span> returnVal[<span style="COLOR: #006080">"UserCity"</span>].PropertyValue
= contactCity; <span style="COLOR: #008000">//save user profile properties back to
the database</span> provider.SetPropertyValues(userContext, returnVal);</pre>
        </div>
        <br />
By the way, the <a href="http://www.codeplex.com/Project/ProjectDirectory.aspx?TagName=Sharepoint" target="_blank">SharePoint
project sites</a> on <a href="http://www.codeplex.com" target="_blank">CodePlex</a> are
great places to learn about the inner workings of WSS3/MOSS.  By scouring the
source code of the projects, you can extract some very cool ways to develop on the
platform.<img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=c8588c53-a393-441d-b6ac-fa7952c74336" /></body>
      <title>Get/Set custom profile properties in Profile Provider for MOSS</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,c8588c53-a393-441d-b6ac-fa7952c74336.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/11/30/GetSetCustomProfilePropertiesInProfileProviderForMOSS.aspx</link>
      <pubDate>Fri, 30 Nov 2007 18:34:14 GMT</pubDate>
      <description>&lt;p&gt;
I'm working on a site which uses Forms Based Authentication, and I want to extend
the standard user profile with some of my own custom properties.
&lt;/p&gt;
&lt;p&gt;
I knew you could define a ProfileProvider in the MOSS web.config file, but the tricky
part was getting and setting the values since the framework is unaware of the provider.&amp;nbsp;
You can't access the properties at design-time like a normal Asp.Net Web Application,
and I couldn't find any documentation for accessing Profile Provider Properties as
a collection like &lt;em&gt;propcollection["propname"]&lt;/em&gt;.&amp;nbsp; I've seen a couple places
where people talk about creating and using custom profile provider properties in MOSS,
but there was nowhere that explained how to do it.
&lt;/p&gt;
&lt;p&gt;
Then, yesterday there was &lt;a href="http://feeds.feedburner.com/~r/sharepointteamblog/~3/192744732/moss-2007-profile-import-tool-now-available-at-http-www-codeplex-com-sptoolbox.aspx" target=_blank&gt;the
post on the MOSS Team Blog&lt;/a&gt; about the &lt;a href="http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=sptoolbox&amp;amp;ReleaseId=8728" target=_blank&gt;Profile
Import Tool&lt;/a&gt; being released on CodePlex - which is very cool in itself.&amp;nbsp; I
figured, &lt;a href="http://www.codeplex.com" target=_blank&gt;CodePlex&lt;/a&gt; - open source;
Profile Import - I bet they have code in their project that gets the properties out
in the way I need since it's a dynamic process for importing profile property values.&amp;nbsp;
Bingo!&amp;nbsp; Thank you Steve, Ron, and &lt;a href="http://blogs.technet.com/lliu" target=_blank&gt;Lawrence&lt;/a&gt;!
&lt;/p&gt;
&lt;p&gt;
Here's the code I used to Get/Set a custom profile property named 'UserCity' for the
current user in MOSS, most of which was pulled and pieced together from the Profile
Import Tool project:
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Profile section in MOSS web.config:&lt;/strong&gt;
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 97.5%; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;profile&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;defaultProvider&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="MOSSPortalProfile"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;enabled&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="true"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;automaticSaveEnabled&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="true"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;providers&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;add&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;connectionStringName&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="AspNetDb_ConnectionString"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;applicationName&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="MOSSPortal"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="MOSSPortalProfile"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;type&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="System.Web.Profile.SqlProfileProvider,System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;providers&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;properties&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;add&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="UserCity"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;customProviderData&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="DisplayName=City;"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;properties&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;profile&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt; 
&lt;p&gt;
&lt;strong&gt;
&lt;br&gt;
&lt;br&gt;
Get/Set C# code:&lt;/strong&gt;
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 97.5%; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 223px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #008000"&gt;//object
to hold the profile properties defined in the web config&lt;/span&gt; SettingsPropertyCollection
profileProperties = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; SettingsPropertyCollection(); &lt;span style="COLOR: #008000"&gt;//get
the profile section from the web config&lt;/span&gt; ProfileSection profileConfigSection
= (ProfileSection)ConfigurationManager.GetSection(&lt;span style="COLOR: #006080"&gt;"system.web/profile"&lt;/span&gt;); &lt;span style="COLOR: #008000"&gt;//get
the collection of defined properties&lt;/span&gt; RootProfilePropertySettingsCollection
configProperties = profileConfigSection.PropertySettings; &lt;span style="COLOR: #008000"&gt;//create
collection to contains properties to pass to the profile provider&lt;/span&gt; SettingsPropertyCollection
propertiesToReturn = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; SettingsPropertyCollection(); &lt;span style="COLOR: #008000"&gt;//populate
the collection with properties from the web config&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;foreach&lt;/span&gt; (ProfilePropertySettings
configProperty &lt;span style="COLOR: #0000ff"&gt;in&lt;/span&gt; configProperties) { SettingsProperty
profileProperty = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; SettingsProperty(configProperty.Name);
profileProperty.PropertyType = Type.GetType(configProperty.Type); &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (profileProperty.PropertyType
== &lt;span style="COLOR: #0000ff"&gt;null&lt;/span&gt;) { profileProperty.PropertyType = &lt;span style="COLOR: #0000ff"&gt;typeof&lt;/span&gt;(System.String);
} profileProperty.DefaultValue = configProperty.DefaultValue; propertiesToReturn.Add(profileProperty);
} &lt;span style="COLOR: #008000"&gt;//get the profile provider&lt;/span&gt; ProfileProvider provider
= ProfileManager.Providers[&lt;span style="COLOR: #006080"&gt;"MOSSPortalProfile"&lt;/span&gt;]; &lt;span style="COLOR: #008000"&gt;//create
a SettingsContext for the current user&lt;/span&gt; SettingsContext userContext = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; SettingsContext();
userContext[&lt;span style="COLOR: #006080"&gt;"UserName"&lt;/span&gt;] = SPContext.Current.Web.CurrentUser.Name;
userContext[&lt;span style="COLOR: #006080"&gt;"IsAuthenticated"&lt;/span&gt;] = &lt;span style="COLOR: #0000ff"&gt;true&lt;/span&gt;; &lt;span style="COLOR: #008000"&gt;//get
the values of the properties for the current user from the database&lt;/span&gt; SettingsPropertyValueCollection
returnVal = provider.GetPropertyValues(userContext, propertiesToReturn); &lt;span style="COLOR: #008000"&gt;//get
the value out of the collection&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; contactCity
= Convert.ToString(returnVal[&lt;span style="COLOR: #006080"&gt;"UserCity"&lt;/span&gt;].PropertyValue); &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (contactCity
== &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;.Empty) { contactCity = &lt;span style="COLOR: #006080"&gt;"Denver"&lt;/span&gt;;
} &lt;span style="COLOR: #008000"&gt;//set value&lt;/span&gt; returnVal[&lt;span style="COLOR: #006080"&gt;"UserCity"&lt;/span&gt;].PropertyValue
= contactCity; &lt;span style="COLOR: #008000"&gt;//save user profile properties back to
the database&lt;/span&gt; provider.SetPropertyValues(userContext, returnVal);&lt;/pre&gt;
&lt;/div&gt;
&lt;br&gt;
By the way, the &lt;a href="http://www.codeplex.com/Project/ProjectDirectory.aspx?TagName=Sharepoint" target=_blank&gt;SharePoint
project sites&lt;/a&gt; on &lt;a href="http://www.codeplex.com" target=_blank&gt;CodePlex&lt;/a&gt; are
great places to learn about the inner workings of WSS3/MOSS.&amp;nbsp; By scouring the
source code of the projects, you can extract some very cool ways to develop on the
platform.&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=c8588c53-a393-441d-b6ac-fa7952c74336" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,c8588c53-a393-441d-b6ac-fa7952c74336.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
      <category>Development</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=98549584-5c4c-4044-adc2-fc88ced1d68d</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,98549584-5c4c-4044-adc2-fc88ced1d68d.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,98549584-5c4c-4044-adc2-fc88ced1d68d.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=98549584-5c4c-4044-adc2-fc88ced1d68d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Just completed applying the security rollups for WSS/MOSS to fix the <a href="http://www.microsoft.com/technet/security/bulletin/ms07-059.mspx">Elevation
of Privilege security vulnerability</a> as well as fixing the daylight savings time
change issues.  I followed <a href="http://msmvps.com/blogs/shane/archive/2007/10/18/please-install-the-sharepoint-updates-on-your-server.aspx">Shane
Young's post on performing the install</a> and it was relatively painless and worked
fine.  I did see the 'Failure to start service SPSearchServiceInstance...' warning
during step 8, but running <em>stsadm -o osearch -action start</em> (<a href="http://technet2.microsoft.com/Office/en-us/library/f484f5f2-35bb-4d70-bf56-dd1c4c287c721033.mspx?mfr=true">as
described on TechNet</a>) after the configuration wizard completed restarted the Search
service without any problems.
</p>
        <p>
One thing I was a little confused about was the proper order of how to apply things
in a farm because of the warning that pops up in the Configuration Wizard about needing
to install the updates and run the Configuration Wizard on all other servers before
the one currently being configured.  Shane describes his install for only one
server, and Joel Oleson says that you need to install and run everything on all servers
on his <a href="http://blogs.msdn.com/joelo/archive/2007/10/16/sharepoint-faq-on-dst-and-october-9th-public-update.aspx">FAQ
about the patches</a>, but doesn't give any particular order.
</p>
        <p>
I really don't think it the order matters, but here's what I did on my 2x1 farm (2
WFEs and 1 Application Server).  Central Admin runs on the App server.
</p>
        <p>
1) Installed the executables on all servers.  The WFEs required reboots after
each patch was applied.
</p>
        <p>
2) Ran the Configuration Wizard on the App server.
</p>
        <p>
3) Ran the Configuration Wizard on the WFEs.
</p>
        <p>
I think that the only thing that matters is that the patches are applied to all servers
in the farm before the Configuration Wizard is run anywhere.  Then it doesn't
matter the order of the servers that you run the Configuration Wizard, just make sure
you run it on all of them.
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=98549584-5c4c-4044-adc2-fc88ced1d68d" />
      </body>
      <title>Applying the MS07-059 Security Rollups for WSS/MOSS</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,98549584-5c4c-4044-adc2-fc88ced1d68d.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/10/21/ApplyingTheMS07059SecurityRollupsForWSSMOSS.aspx</link>
      <pubDate>Sun, 21 Oct 2007 06:23:01 GMT</pubDate>
      <description>&lt;p&gt;
Just completed applying the security rollups for WSS/MOSS to fix the &lt;a href="http://www.microsoft.com/technet/security/bulletin/ms07-059.mspx"&gt;Elevation
of Privilege security vulnerability&lt;/a&gt; as well as fixing the daylight savings time
change issues.&amp;nbsp;&amp;nbsp;I followed &lt;a href="http://msmvps.com/blogs/shane/archive/2007/10/18/please-install-the-sharepoint-updates-on-your-server.aspx"&gt;Shane
Young's post on performing the install&lt;/a&gt; and it was relatively painless and worked
fine.&amp;nbsp; I did see the 'Failure to start service SPSearchServiceInstance...' warning
during step 8, but running &lt;em&gt;stsadm -o osearch -action start&lt;/em&gt; (&lt;a href="http://technet2.microsoft.com/Office/en-us/library/f484f5f2-35bb-4d70-bf56-dd1c4c287c721033.mspx?mfr=true"&gt;as
described on TechNet&lt;/a&gt;) after the configuration wizard completed restarted the Search
service without any problems.
&lt;/p&gt;
&lt;p&gt;
One thing I was a little confused about was the proper order of how to apply things
in a farm because of the warning that pops up in the Configuration Wizard about needing
to install the updates and run the Configuration Wizard on all other servers before
the one currently being configured.&amp;nbsp; Shane describes his install for only one
server, and Joel Oleson says that you need to install and run everything on all servers
on his &lt;a href="http://blogs.msdn.com/joelo/archive/2007/10/16/sharepoint-faq-on-dst-and-october-9th-public-update.aspx"&gt;FAQ
about the patches&lt;/a&gt;, but doesn't give any particular order.
&lt;/p&gt;
&lt;p&gt;
I really don't think it the order matters, but here's what I did on my 2x1 farm (2
WFEs and 1 Application Server).&amp;nbsp; Central Admin runs on the App server.
&lt;/p&gt;
&lt;p&gt;
1) Installed the executables on all servers.&amp;nbsp; The WFEs required reboots after
each patch was applied.
&lt;/p&gt;
&lt;p&gt;
2) Ran the Configuration Wizard on the App&amp;nbsp;server.
&lt;/p&gt;
&lt;p&gt;
3) Ran the Configuration Wizard on the WFEs.
&lt;/p&gt;
&lt;p&gt;
I think that the only thing that matters is that the patches are applied to all servers
in the farm before the Configuration Wizard is run anywhere.&amp;nbsp; Then it doesn't
matter the order of the servers that you run the Configuration Wizard, just make sure
you run it on all of them.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=98549584-5c4c-4044-adc2-fc88ced1d68d" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,98549584-5c4c-4044-adc2-fc88ced1d68d.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=8edd0509-118e-4320-854d-71085108d322</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,8edd0509-118e-4320-854d-71085108d322.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,8edd0509-118e-4320-854d-71085108d322.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=8edd0509-118e-4320-854d-71085108d322</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The <a href="http://blogs.msdn.com/sharepoint/archive/2007/10/13/announcing-the-community-kit-for-sharepoint-internet-extranet-edition-forms-based-authentication-solution.aspx?CommentPosted=true#commentmessage">Community
Kit for SharePoint: Internet/Extranet Edition (CKS:IEE)</a> is a tool that contains
many useful pieces for both users and administrators of a publicly accessible
SharePoint site and extends the already powerful Forms Based Authentication functionality
of MOSS.
</p>
        <p>
Here's the play-by-play for installing the CKS:IEE and creating an anonymously
accessible Internet site that has FBA enabled for sub-sites using the CKS:IEE:
</p>
        <p>
1) Go to the <a href="http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=CKS&amp;ReleaseId=7675">CodePlex
site for the CKS:IEE project</a>.
</p>
        <p>
2) The CKS:IEE doesn't set up Forms Based Authentication so I needed to follow the
post by Dan Attis: Office SharePoint Server 2007 - <a href="http://devcow.com/blogs/jdattis/archive/2007/02/23/Office_SharePoint_Server_2007_Forms_Based_Authentication_FBA_Walkthrough_Part_1.aspx">Forms
Based Authentication (FBA) Walk-through - Part 1</a>.  If you haven't set up
Forms Based Authentication yet, this is THE post to follow, as it gets FBA up and
running with minimal complexity. I set my site up with the Collaboration Portal template,
rather than the Blank Site that Dan used in his post. 
</p>
        <p>
Make sure you can browse to the site and login using the default MOSS FBA login page
before you install the CKS:IEE solution.
</p>
        <p>
3) Download FBAManagement.zip from the CodePlex site, extract all the files, and run <em>deploy
[your_site_url]</em> from a command prompt.  The wsp will be added to the solution
store, deployed to the site specified, and the features will be activated.<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image.png" atomicselection="true"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="191" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_thumb.png" width="240" border="0" /></a></p>
        <p>
4) Edit the default page of your site, add the Login Web Part to the page from
the FBA Self Management group on the Add Web Part dialog.<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_1.png" atomicselection="true"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="237" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_thumb_1.png" width="240" border="0" /></a>  
</p>
        <p>
Set the Chrome Type on the Login Web Page to None.  This will hide the web part
when a user is logged in.
</p>
        <p>
5) I want to have the default page of the site be anonymous, so that when users go
to the URL, they are presented with the home page, not the login page.  To set
up anonymous access, I followed Bil Simser's post <a href="http://weblogs.asp.net/bsimser/archive/2006/09/25/Enabling-anonymous-access-in-SharePoint-2007.aspx">Enabling
anonymous access in SharePoint 2007</a>.  I had to close all browser windows
after I followed Bil's steps to get it working right.  
</p>
        <p>
When I went back to the site, here's what I saw:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_2.png" atomicselection="true"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="150" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_thumb_2.png" width="240" border="0" /></a></p>
        <p>
You'll notice that everything is visible to the unauthenticated user. Document Center,
News, Reports, etc.  When you first set up anonymous access, everything is accessible
to the anonymous user, so you need to scale back the permissions on the sub-sites. 
This is accomplished by editing the permission on the sub-sites, and then turning
off anonymous access.
</p>
        <p>
a) Break inheritance by clicking 'Edit Permissions' in the Actions menu of the Site
Permissions list of the sub-site.<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_3.png" atomicselection="true"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="159" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_thumb_3.png" width="240" border="0" /></a></p>
        <p>
b) Click the Anonymous Access link of the now visible Settings menu.<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_4.png" atomicselection="true"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="105" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_thumb_4.png" width="240" border="0" /></a></p>
        <p>
c) Click the radio button to allow anonymous users to access nothing.<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_5.png" atomicselection="true"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="135" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_thumb_5.png" width="240" border="0" /></a></p>
        <p>
I did this for all subsites, and here's how it looked when browsed by an unauthenticated
user.<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_9.png" atomicselection="true"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="172" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_thumb_9.png" width="240" border="0" /></a></p>
        <p>
The View All Site Content link is still there in the Quick Launch, but you can deal
with that later when you set up your custom master pages and page layouts.
</p>
        <p>
6) The Login Web Part understands the QueryString values that are present in the URL
if the user is trying to access a page they don't have permissions to <em>(ie: ?ReturnUrl=%2fSearchCenter%2f_layouts%2fAuthenticate.aspx%3fSource%3d%252fSearchCenter&amp;Source=%2fSearchCenter)</em> This
way you can have a page that is managed via CMS services, and when the user logs in
correctly, they will be taken to the page they were originally trying to access.  
</p>
        <p>
The first step for this to happen is to change the forms login page in the web.config
for the site. Change the line
</p>
        <p>
&lt;forms loginUrl="/_layouts/login.aspx" /&gt;
</p>
        <p>
to
</p>
        <p>
&lt;forms loginUrl="/Pages/login.aspx" /&gt;
</p>
        <p>
Now, create a new page in the root site's Pages library named Login.  Add some
text like 'You are trying to access a page with invalid permissions, please try again.'
and add the login web part.  Should look something like this: 
<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_10.png" atomicselection="true"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="148" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_thumb_10.png" width="240" border="0" /></a></p>
        <p>
Publish the page.  
</p>
        <p>
That's it! We now have a publicly accessible site with Forms Based Authentication
that has a default page with anonymous access, and a login page that is managed by
SharePoint with CMS content placeholders on it, rather than the flat out-of-box login
page.
</p>
        <p>
I plan on having posts that explain using the other web parts included with the
CKS:IEE, and I'm also looking to put a custom workflow on the Site Membership Review
List. So stay tuned...
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=8edd0509-118e-4320-854d-71085108d322" />
      </body>
      <title>Install and Configure the Community Kit for SharePoint: Internet/Extranet Edition</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,8edd0509-118e-4320-854d-71085108d322.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/10/19/InstallAndConfigureTheCommunityKitForSharePointInternetExtranetEdition.aspx</link>
      <pubDate>Fri, 19 Oct 2007 22:23:15 GMT</pubDate>
      <description>&lt;p&gt;
The &lt;a href="http://blogs.msdn.com/sharepoint/archive/2007/10/13/announcing-the-community-kit-for-sharepoint-internet-extranet-edition-forms-based-authentication-solution.aspx?CommentPosted=true#commentmessage"&gt;Community
Kit for SharePoint: Internet/Extranet Edition (CKS:IEE)&lt;/a&gt; is&amp;nbsp;a tool that contains
many useful pieces for both users and administrators&amp;nbsp;of a publicly accessible
SharePoint site and extends the already powerful Forms Based Authentication functionality
of MOSS.
&lt;/p&gt;
&lt;p&gt;
Here's the play-by-play for installing the CKS:IEE and&amp;nbsp;creating an anonymously
accessible Internet site that has&amp;nbsp;FBA enabled for sub-sites using the CKS:IEE:
&lt;/p&gt;
&lt;p&gt;
1) Go to the &lt;a href="http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=CKS&amp;amp;ReleaseId=7675"&gt;CodePlex
site for the CKS:IEE project&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
2) The CKS:IEE doesn't set up Forms Based Authentication so I needed to follow the
post by Dan Attis: Office SharePoint Server 2007 - &lt;a href="http://devcow.com/blogs/jdattis/archive/2007/02/23/Office_SharePoint_Server_2007_Forms_Based_Authentication_FBA_Walkthrough_Part_1.aspx"&gt;Forms
Based Authentication (FBA) Walk-through - Part 1&lt;/a&gt;.&amp;nbsp; If you haven't set up
Forms Based Authentication yet, this is THE post to follow, as it gets FBA up and
running with minimal complexity. I set my site up with the Collaboration Portal template,
rather than&amp;nbsp;the Blank Site that Dan used in his post.&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Make sure you can browse to the site and login using the default MOSS FBA login page
before you install the CKS:IEE solution.
&lt;/p&gt;
&lt;p&gt;
3) Download FBAManagement.zip from the CodePlex site, extract all the files, and run &lt;em&gt;deploy
[your_site_url]&lt;/em&gt; from a command prompt.&amp;nbsp; The wsp will be added to the solution
store, deployed to the site specified, and the features will be activated.&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image.png" atomicselection="true"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=191 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_thumb.png" width=240 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
4) Edit the default page of your site, add the Login&amp;nbsp;Web Part to the page from
the FBA Self Management group on the Add Web Part dialog.&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_1.png" atomicselection="true"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=237 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_thumb_1.png" width=240 border=0&gt;&lt;/a&gt; &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Set the Chrome Type on the Login Web Page to None.&amp;nbsp; This will hide the web part
when a user is logged in.
&lt;/p&gt;
&lt;p&gt;
5) I want to have the default page of the site be anonymous, so that when users go
to the URL, they are presented with the home page, not the login page.&amp;nbsp; To set
up anonymous access, I followed Bil Simser's post &lt;a href="http://weblogs.asp.net/bsimser/archive/2006/09/25/Enabling-anonymous-access-in-SharePoint-2007.aspx"&gt;Enabling
anonymous access in SharePoint 2007&lt;/a&gt;.&amp;nbsp; I had to close all browser windows
after I followed Bil's steps to get it working right.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
When I went back to the site, here's what I saw:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_2.png" atomicselection="true"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=150 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_thumb_2.png" width=240 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
You'll notice that everything is visible to the unauthenticated user. Document Center,
News, Reports, etc.&amp;nbsp; When you first set up anonymous access, everything is accessible
to the anonymous user, so you need to scale back the permissions on the sub-sites.&amp;nbsp;
This is accomplished by editing the permission on the sub-sites, and then turning
off anonymous access.
&lt;/p&gt;
&lt;p&gt;
a) Break inheritance by clicking 'Edit Permissions' in the Actions menu of the Site
Permissions list of the sub-site.&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_3.png" atomicselection="true"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=159 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_thumb_3.png" width=240 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
b) Click the Anonymous Access link of the now visible Settings menu.&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_4.png" atomicselection="true"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=105 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_thumb_4.png" width=240 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
c) Click the radio button to allow anonymous users to access nothing.&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_5.png" atomicselection="true"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=135 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_thumb_5.png" width=240 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
I did this for all subsites, and here's how it looked when browsed by an unauthenticated
user.&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_9.png" atomicselection="true"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=172 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_thumb_9.png" width=240 border=0&gt; &lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
The View All Site Content link is still there in the Quick Launch, but you can deal
with that later when you set up your custom master pages and page layouts.
&lt;/p&gt;
&lt;p&gt;
6) The Login Web Part understands the QueryString values that are present in the URL
if the user is trying to access a page they don't have permissions to &lt;em&gt;(ie: ?ReturnUrl=%2fSearchCenter%2f_layouts%2fAuthenticate.aspx%3fSource%3d%252fSearchCenter&amp;amp;Source=%2fSearchCenter)&lt;/em&gt; This
way you can have a page that is managed via CMS services, and when the user logs in
correctly, they will be taken to the page they were originally trying to access.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
The first step for this to happen is to change the forms login page in the web.config
for the site. Change the line
&lt;/p&gt;
&lt;p&gt;
&amp;lt;forms loginUrl="/_layouts/login.aspx" /&amp;gt;
&lt;/p&gt;
&lt;p&gt;
to
&lt;/p&gt;
&lt;p&gt;
&amp;lt;forms loginUrl="/Pages/login.aspx" /&amp;gt;
&lt;/p&gt;
&lt;p&gt;
Now, create a new page in the root site's Pages library named Login.&amp;nbsp; Add some
text like 'You are trying to access a page with invalid permissions, please try again.'
and add the login web part.&amp;nbsp; Should look something like this: 
&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_10.png" atomicselection="true"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=148 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/InstallandConfiguretheCommunityKitforSha_E660/image_thumb_10.png" width=240 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Publish the page.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
That's it! We now have a publicly accessible site with Forms Based Authentication
that has a default page with anonymous access, and a login page that is managed by
SharePoint with CMS content placeholders on it, rather than the flat out-of-box login
page.
&lt;/p&gt;
&lt;p&gt;
I plan on having posts that explain using the&amp;nbsp;other web parts included with the
CKS:IEE, and I'm also looking to put a custom workflow on the Site Membership Review
List. So stay tuned...
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=8edd0509-118e-4320-854d-71085108d322" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,8edd0509-118e-4320-854d-71085108d322.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=3a2b67d9-9ccc-4ff7-b158-cf37d738a458</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,3a2b67d9-9ccc-4ff7-b158-cf37d738a458.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,3a2b67d9-9ccc-4ff7-b158-cf37d738a458.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=3a2b67d9-9ccc-4ff7-b158-cf37d738a458</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Just received a nice little sting...
</p>
        <p>
I love the Telerik Editor for MOSS, so I use it almost on every page.  I wanted
to perform an upgrade to the 4.4.0.0 version, but I just got slammed by a big gotcha!
</p>
        <p>
I've always followed the <a href="http://www.telerik.com/help/radeditormoss/Using%20RadEditor%20in%20Web%20Content%20Management%20scenario.html">Telerik
documentation for adding the editor to a page layout</a>.  But I must say, after
today, I don't agree at all!
</p>
        <p>
When Telerik releases a new version of the RadEditor, they change the version number
on the assembly, naturally.  The downfall of this is that because of the new
version number, you have to go to every page layout and change the version number
in the Register tag at the top of the page.  This stinks!
</p>
        <p>
To keep yourself from having this same problem, place the <a href="http://msdn2.microsoft.com/en-us/library/ms164640.aspx">control
reference in the web config file</a> of the sites that you are using the RadEditor. 
This will allow you to update the control reference only once next time, not on every
single page layout file.
</p>
        <p>
This should be done for all Telerik controls used on page layouts...
</p>
        <p>
Here's another little thing that might be worth doing:<br />
The image browser in the RadEditor for MOSS doesn't allow you to traverse the site
structure like the OOB MOSS RichTextEditor, therefore you can't choose images from
the SiteCollectionImages library.  To fix this, open the editor's tools
file (located at \Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\4.1.0.0__1f131a624888eeed\RadControls\Editor)
and rename the <strong>ImageManager </strong>tool to <strong>MOSSImageManager</strong>. 
Got this gem on the <a href="http://www.telerik.com/community/forums/thread/b311D-hattg.aspx">Telerik
forum</a>...
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=3a2b67d9-9ccc-4ff7-b158-cf37d738a458" />
      </body>
      <title>Upgrading Telerik Editor for MOSS Gotcha: Place Telerik control references in web.config!</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,3a2b67d9-9ccc-4ff7-b158-cf37d738a458.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/10/18/UpgradingTelerikEditorForMOSSGotchaPlaceTelerikControlReferencesInWebconfig.aspx</link>
      <pubDate>Thu, 18 Oct 2007 06:02:48 GMT</pubDate>
      <description>&lt;p&gt;
Just received a nice little sting...
&lt;/p&gt;
&lt;p&gt;
I love the Telerik Editor for MOSS, so I use it almost on every page.&amp;nbsp; I wanted
to perform an upgrade to the 4.4.0.0 version, but I just got slammed by a big gotcha!
&lt;/p&gt;
&lt;p&gt;
I've always followed the &lt;a href="http://www.telerik.com/help/radeditormoss/Using%20RadEditor%20in%20Web%20Content%20Management%20scenario.html"&gt;Telerik
documentation for adding the editor to a page layout&lt;/a&gt;.&amp;nbsp; But I must say, after
today, I don't agree at all!
&lt;/p&gt;
&lt;p&gt;
When Telerik releases a new version of the RadEditor, they change the version number
on the assembly, naturally.&amp;nbsp; The downfall of this is that because of the new
version number, you have to go to every page layout and change the version number
in the Register tag at the top of the page.&amp;nbsp; This stinks!
&lt;/p&gt;
&lt;p&gt;
To keep yourself from having this same problem, place the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms164640.aspx"&gt;control
reference in the web config file&lt;/a&gt; of the sites that you are using the RadEditor.&amp;nbsp;
This will allow you to update the control reference only once next time, not on every
single page layout file.
&lt;/p&gt;
&lt;p&gt;
This should be done for all Telerik controls used on page layouts...
&lt;/p&gt;
&lt;p&gt;
Here's another little thing that might be worth doing:&lt;br&gt;
The image browser in the RadEditor for MOSS doesn't allow you to traverse the site
structure like the OOB MOSS RichTextEditor, therefore you can't choose images from
the SiteCollectionImages library.&amp;nbsp; To&amp;nbsp;fix this, open the editor's tools
file (located at&amp;nbsp;\Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\4.1.0.0__1f131a624888eeed\RadControls\Editor)
and rename the &lt;strong&gt;ImageManager &lt;/strong&gt;tool to &lt;strong&gt;MOSSImageManager&lt;/strong&gt;.&amp;nbsp;
Got this gem on the &lt;a href="http://www.telerik.com/community/forums/thread/b311D-hattg.aspx"&gt;Telerik
forum&lt;/a&gt;...
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=3a2b67d9-9ccc-4ff7-b158-cf37d738a458" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,3a2b67d9-9ccc-4ff7-b158-cf37d738a458.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
      <category>Telerik</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=db1e97bd-7082-4d05-8505-8149d2480103</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,db1e97bd-7082-4d05-8505-8149d2480103.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,db1e97bd-7082-4d05-8505-8149d2480103.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=db1e97bd-7082-4d05-8505-8149d2480103</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Bless me father, for I have silenced.  It's been 22 days since my last posting.
</p>
        <p>
Ahhh... So I'm stoked that I now have some new ground to break! The last gig is just
about up, and I'm getting ready to start on the next one.  This is one of my
favorite points in a project.  The blank slate. The white canvas.
</p>
        <p>
Looks like this one's going to be an Internet facing branding portal, where the
client can provide advertising and marketing agencies with brand guidelines and product
images.  The client previously used a graphics server product that was built
by Adobe, but is no longer supported.  <a href="http://www.equil.com/Internet/Equil/Products/MediaRich+for+SharePoint/index.htm" target="_blank">Equilibrium's
MediaRich for SharePoint</a> product looks like it's going to be a good fit in MOSS
for the needs that the client has.
</p>
        <p>
This client also has some interesting requirements around how a user is able to access
the site, and it looks like the <a title="http://blogs.msdn.com/sharepoint/archive/2007/10/13/announcing-the-community-kit-for-sharepoint-internet-extranet-edition-forms-based-authentication-solution.aspx" href="http://blogs.msdn.com/sharepoint/archive/2007/10/13/announcing-the-community-kit-for-sharepoint-internet-extranet-edition-forms-based-authentication-solution.aspx">Community
Kit for SharePoint: Internet/Extranet Edition Forms-Based Authentication</a> solution
is going to hit the mark pretty close.  We're going to need a custom workflow
on the Site Membership Review List, but that should be fairly easy to integrate into
the solution.
</p>
        <p>
We're going to be doing some CMS with some heavy customizations, too, so that should
be a lot of fun.  We've got a very talented designer that we're working with,
and I can't wait to see how the final product is going to look.  From
the comps I've seen, it's going to be very slick. 
</p>
        <p>
I'm also looking forward to getting back to the blogging.  Being that we've got
the CKS: Internet and MediaRich lined up, I'm hoping to document the process of the
install and configuration, as well as the migration of client's digital assets from
the old, unsupported Adobe product to the Equilibrium product.  Did I mention
that the Adobe product is no longer supported? Well, it's not. Nice.
</p>
        <p>
So, stay tuned.  I'm warming up a new VHD in my dev domain in the morning...
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=db1e97bd-7082-4d05-8505-8149d2480103" />
      </body>
      <title>Next!... CKS: Internet &amp;amp; MediaRich for SharePoint</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,db1e97bd-7082-4d05-8505-8149d2480103.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/10/18/NextCKSInternetAmpMediaRichForSharePoint.aspx</link>
      <pubDate>Thu, 18 Oct 2007 04:31:22 GMT</pubDate>
      <description>&lt;p&gt;
Bless me father, for I have silenced.&amp;nbsp; It's been 22 days since my last posting.
&lt;/p&gt;
&lt;p&gt;
Ahhh... So I'm stoked that I now have some new ground to break! The last gig is just
about up, and I'm getting ready to start on the next one.&amp;nbsp; This is one of my
favorite points in a project.&amp;nbsp; The blank slate. The white canvas.
&lt;/p&gt;
&lt;p&gt;
Looks like this one's&amp;nbsp;going to be an Internet facing branding portal, where the
client can provide advertising and marketing agencies with brand guidelines and product
images.&amp;nbsp; The client previously used a graphics server&amp;nbsp;product that was built
by Adobe, but is no longer supported.&amp;nbsp;&amp;nbsp;&lt;a href="http://www.equil.com/Internet/Equil/Products/MediaRich+for+SharePoint/index.htm" target=_blank&gt;Equilibrium's
MediaRich for SharePoint&lt;/a&gt; product looks like it's going to be a good fit in MOSS
for the needs that the client has.
&lt;/p&gt;
&lt;p&gt;
This client also has some interesting requirements around how a user is able to access
the site, and it looks like the &lt;a title=http://blogs.msdn.com/sharepoint/archive/2007/10/13/announcing-the-community-kit-for-sharepoint-internet-extranet-edition-forms-based-authentication-solution.aspx href="http://blogs.msdn.com/sharepoint/archive/2007/10/13/announcing-the-community-kit-for-sharepoint-internet-extranet-edition-forms-based-authentication-solution.aspx"&gt;Community
Kit for SharePoint: Internet/Extranet Edition Forms-Based Authentication&lt;/a&gt; solution
is going to hit the mark pretty close.&amp;nbsp; We're going to need a custom workflow
on the Site Membership Review List, but that should be fairly easy to integrate into
the solution.
&lt;/p&gt;
&lt;p&gt;
We're going to be doing some CMS with some heavy customizations, too, so that should
be a lot of fun.&amp;nbsp; We've got a very talented designer that we're working with,
and I can't wait to see&amp;nbsp;how the&amp;nbsp;final product is going to look.&amp;nbsp; From
the comps I've seen, it's going to be very slick.&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
I'm also looking forward to getting back to the blogging.&amp;nbsp; Being that we've got
the CKS: Internet and MediaRich lined up, I'm hoping to document the process of the
install and configuration, as well as the migration of client's digital assets from
the old, unsupported Adobe product to the Equilibrium product.&amp;nbsp; Did I mention
that the Adobe product is no longer supported? Well, it's not. Nice.
&lt;/p&gt;
&lt;p&gt;
So, stay tuned.&amp;nbsp; I'm warming up a new VHD in my dev domain in the morning...
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=db1e97bd-7082-4d05-8505-8149d2480103" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,db1e97bd-7082-4d05-8505-8149d2480103.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=11c863de-154b-483b-be0c-e24aa40e4357</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,11c863de-154b-483b-be0c-e24aa40e4357.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,11c863de-154b-483b-be0c-e24aa40e4357.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=11c863de-154b-483b-be0c-e24aa40e4357</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
With all the talk about SharePoint as an application platform lately, I figured it
might be good to post on the way I like to describe SharePoint to clients.
</p>
        <p>
Sure, you get a lot of neat features out of the box with SharePoint, but I've seen
plenty of deer-in-headlight looks after people hear everything
the product has to offer and the exponential amount of solutions that are possible
when you look a little deeper.  Even after conversing a great deal about
what SharePoint is and how it can help an organization, there are always a few folks
who have that 'but... I don't get it!' look.  Usually, it's the business-focused
people who understand the idea of SharePoint right away, but I've found that it's
the folks who are deep-technical in nature, but have been exposed to MOSS only
through reading some articles and maybe been through a little training, who have
a harder time grasping the SharePoint concept.  Let's face it, it's a new way
of thought for most techies.
</p>
        <p>
One thing I heard in February 2006 struck a cord with me for some reason: <em>'Everything
in SharePoint is a list.'  </em>Got me thinking.  I did a ton of MCMS02
development, so I was used to performing app dev as using a robust API, and not heavily
leveraging SQL.  Couple that with the article <a href="http://msdn.microsoft.com/msdnmag/issues/06/08/gatheringmoss/" target="_blank">Gathering
MOSS</a> in the August 2006 issue of MSDN by one of the newest members of the
MOSS blogging community, Ted Pattison, app dev in WSSv3 clicked.
</p>
        <p>
Almost every client that I've talked to about SharePoint has had at least some
technical experience in their careers, and even if they haven't, they probably
are familiar with the way a database is set up, so why not have them think about SharePoint
in way that they already understand?
</p>
        <p>
When I've explained this, I <em>always</em> see the light bulb go on:
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/RelatetoSharePointasaDatabasethetwoline_AA5F/image_1.png" atomicselection="true">
            <img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="459" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/RelatetoSharePointasaDatabasethetwoline_AA5F/image_thumb_1.png" width="400" border="0" /> </a>
          <br />
        </p>
        <p>
WSSv3 even introduces <a href="http://office.microsoft.com/en-us/sharepointtechnology/HA101736671033.aspx" target="_blank">index
columns</a> and <a href="http://www.u2u.info/Blogs/Patrick/Lists/Posts/Post.aspx?ID=1561" target="_blank">cross-list
querying</a> to allow for more database comparisons, and there are plenty others.
</p>
        <p>
With the current argument going on around SharePoint as an application platform, maybe
this will help those folks who are against the platform have the light bulb go on,
too.  Sure, as AC and Joel have said, the developer experience might not be the
greatest right now, but give it time.  At least it's better than punch cards!
</p>
        <p>
----------
</p>
        <p>
Note - yes, I know that all applications aren't meant to be in SharePoint, but I can see
how all applications could be... ;)
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=11c863de-154b-483b-be0c-e24aa40e4357" />
      </body>
      <title>Relate to SharePoint as a Database - the two line up pretty well...</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,11c863de-154b-483b-be0c-e24aa40e4357.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/09/25/RelateToSharePointAsADatabaseTheTwoLineUpPrettyWell.aspx</link>
      <pubDate>Tue, 25 Sep 2007 18:06:57 GMT</pubDate>
      <description>&lt;p&gt;
With all the talk about SharePoint as an application platform lately, I figured it
might be good to post on the way I like to describe SharePoint to&amp;nbsp;clients.
&lt;/p&gt;
&lt;p&gt;
Sure, you get a lot of neat features out of the box with SharePoint, but I've seen
plenty&amp;nbsp;of&amp;nbsp;deer-in-headlight looks&amp;nbsp;after people hear&amp;nbsp;everything
the product has to offer and the exponential amount of solutions that are possible
when you&amp;nbsp;look a little deeper.&amp;nbsp; Even after conversing a great deal about
what SharePoint is and how it can help an organization, there are always a few&amp;nbsp;folks
who have that 'but... I don't get it!' look.&amp;nbsp; Usually, it's the business-focused
people who understand the idea of SharePoint right away, but I've found that it's
the folks who are&amp;nbsp;deep-technical in nature, but have been exposed to MOSS only
through reading some articles and maybe been through&amp;nbsp;a little training, who have
a harder time grasping the SharePoint concept.&amp;nbsp; Let's face it, it's a new way
of thought for most techies.
&lt;/p&gt;
&lt;p&gt;
One thing I heard in February 2006&amp;nbsp;struck a cord with me for some reason: &lt;em&gt;'Everything
in SharePoint is a list.'&amp;nbsp; &lt;/em&gt;Got me thinking.&amp;nbsp; I did a ton of MCMS02
development, so I was used to performing app dev as using a robust API, and not heavily
leveraging SQL.&amp;nbsp; Couple that with the&amp;nbsp;article &lt;a href="http://msdn.microsoft.com/msdnmag/issues/06/08/gatheringmoss/" target=_blank&gt;Gathering
MOSS&lt;/a&gt;&amp;nbsp;in the August 2006 issue of MSDN by one of the newest members of the
MOSS blogging community, Ted Pattison, app dev in&amp;nbsp;WSSv3 clicked.
&lt;/p&gt;
&lt;p&gt;
Almost every client that&amp;nbsp;I've talked to about SharePoint has had at least some
technical experience in their careers, and&amp;nbsp;even if they haven't, they probably
are familiar with the way a database is set up, so why not have them think about SharePoint
in way that they already understand?
&lt;/p&gt;
&lt;p&gt;
When I've explained this, I &lt;em&gt;always&lt;/em&gt; see the light bulb go on:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/RelatetoSharePointasaDatabasethetwoline_AA5F/image_1.png" atomicselection="true"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=459 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/RelatetoSharePointasaDatabasethetwoline_AA5F/image_thumb_1.png" width=400 border=0&gt;&amp;nbsp;&lt;/a&gt; 
&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;
WSSv3 even introduces &lt;a href="http://office.microsoft.com/en-us/sharepointtechnology/HA101736671033.aspx" target=_blank&gt;index
columns&lt;/a&gt;&amp;nbsp;and &lt;a href="http://www.u2u.info/Blogs/Patrick/Lists/Posts/Post.aspx?ID=1561" target=_blank&gt;cross-list
querying&lt;/a&gt;&amp;nbsp;to allow for more database comparisons, and there are plenty others.
&lt;/p&gt;
&lt;p&gt;
With the current argument going on around SharePoint as an application platform, maybe
this will help those folks who are against the platform have the light bulb go on,
too.&amp;nbsp; Sure, as AC and Joel have said, the developer experience might not be the
greatest right now, but give it time.&amp;nbsp; At least it's better than punch cards!
&lt;/p&gt;
&lt;p&gt;
----------
&lt;/p&gt;
&lt;p&gt;
Note - yes, I know that all applications aren't meant to be in SharePoint, but I can&amp;nbsp;see
how all applications could be... ;)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=11c863de-154b-483b-be0c-e24aa40e4357" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,11c863de-154b-483b-be0c-e24aa40e4357.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=24a27e7a-2bb3-41b5-a29b-484ee74ede68</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,24a27e7a-2bb3-41b5-a29b-484ee74ede68.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,24a27e7a-2bb3-41b5-a29b-484ee74ede68.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=24a27e7a-2bb3-41b5-a29b-484ee74ede68</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Ok, so you really don't develop a custom site definition as a Feature in the <a href="http://www.codeproject.com/spoint/ExtendingSPS.asp">WSSv3
sense of the word 'feature</a>', but you can create a <a href="http://msdn2.microsoft.com/en-us/library/bb466225.aspx">solution
package</a> which contains all the needed pieces for the custom site definition, including
any Features you want activated on the site when it's first created.  
</p>
        <p>
While there's <a href="http://search.live.com/results.aspx?q=custom+site+definition&amp;src=IE-SearchBox">plenty
of documentation around creating custom site definitions</a> out there, I figured
it would be beneficial to explain the steps needed to create the solution and deploy
everything as a a single entity into WSSv3 as a WSP.
</p>
        <p>
For this example, I'm going to create a custom version of the Team Site template without
any significant changes because I don't want to deep dive into how to create a custom
site definition.   I'm then going to add a Label control to the default.aspx
and populate it's value in a new code-code behind class for the default.aspx page
that's not included out of the box. 
</p>
        <p>
While I don't like forcing an install any anyone, I'm going to use the <a href="http://blog.richfinn.net/blog/2007/09/19/VisualStudio2005TemplateWithInstallerForBuildingMOSSSolutionPackages.aspx">Visual
Studio 2005 project template I created</a> which will take care of most of the tricky
pieces that are required to create and deploy the solution  This thing really does
make custom solution development using Visual Studio for WSS a snap.  Please download
it and check it out.
</p>
        <p>
Once you've installed the Visual Studio project template correctly, create a new project
using the MOSS Solution Builder Project template.  For this example, I named
the project Example.CustomSiteSolution.<br /><br />
 <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CustomSiteDefinitionasfeature_9691/image_1.png" atomicselection="true"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="171" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CustomSiteDefinitionasfeature_9691/image_thumb_1.png" width="240" border="0" /></a></p>
        <p>
After the project has been created, you should <a href="http://msdn2.microsoft.com/en-us/library/xc31ft41.aspx">sign
the assembly</a> using your own key file, but for the sake of this example, I'm going
to leave the temp.snk file where it is.
</p>
        <p>
Build the project.  This will ensure that the assembly is in place so we can
get the public key token using the <a href="http://blog.richfinn.net/blog/2007/07/06/WhatIsThePublicKeyTokenOfMyAssemblyWithoutHavingToDropItInTheGAC.aspx">sn.exe
-T method</a>.  Once you have the public key token, replace the [Your_PKT] placeholder
in the ManifestTemplate.xml file.
</p>
        <p>
Navigate in Windows Explorer to \12\TEMPLATE\1033\XML.  The xml files here contain
the information needed by WSS to know what templates are available for sites
to be created.  Bill Baer has a good post on <a href="http://blogs.technet.com/wbaer/archive/2007/03/25/understanding-webtemp-xml.aspx" target="_blank">understanding
the webtemp files</a> if you want to know more about the specifics and the schema.
</p>
        <p>
Since we're going to be creating a custom version of the Team Site template, copy
the webtemp.xml file, and paste it into the \TEMPLATE\1033\XML directory of your VS
project.  Rename it to <em>'webtemp.customsitesolution.xml</em>'. The new name
doesn't matter too much other than that it has to start with <em>webtemp</em>, but
it's a good idea to have it relate to the solution to which it's attached.
</p>
        <p>
Open the xml file and delete all the Template elements except for the one with the
Name="STS".  Change the name to be CustomSiteExample, and change the ID to a
number over 10000.  Also delete the other Configuration elements except for the
first one with the ID of 0.  You can also change the name and description of
the configuration element to be whatever you want.
</p>
        <p>
The final version of the file should look like this:
</p>
        <div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4">
          <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <p>
              <span style="color: #0000ff">&lt;?</span>
              <span style="color: #800000">xml</span>
              <span style="color: #ff0000">version</span>
              <span style="color: #0000ff">="1.0"</span>
              <span style="color: #ff0000">encoding</span>
              <span style="color: #0000ff">="utf-8"</span>?<span style="color: #0000ff">&gt;</span><span style="color: #008000">&lt;!--
_lcid="1033" _version="12.0.4518" _dal="1" --&gt;</span><span style="color: #008000">&lt;!--
_LocalBinding --&gt;</span><span style="color: #0000ff">&lt;</span><span style="color: #800000">Templates</span><span style="color: #ff0000">xmlns:ows</span><span style="color: #0000ff">="Microsoft
SharePoint"</span><span style="color: #0000ff">&gt;</span><span style="color: #0000ff">&lt;</span><span style="color: #800000">Template</span><span style="color: #ff0000">Name</span><span style="color: #0000ff">="CustomSiteExample"</span><span style="color: #ff0000">ID</span><span style="color: #0000ff">="111000"</span><span style="color: #0000ff">&gt;</span><span style="color: #0000ff">&lt;</span><span style="color: #800000">Configuration</span><span style="color: #ff0000">ID</span><span style="color: #0000ff">="0"</span><span style="color: #ff0000">Title</span><span style="color: #0000ff">="Custom
Site Exmaple Site"</span><span style="color: #ff0000">Hidden</span><span style="color: #0000ff">="FALSE"</span><span style="color: #ff0000">ImageUrl</span><span style="color: #0000ff">="/_layouts/images/stsprev.png"</span><span style="color: #ff0000">Description</span><span style="color: #0000ff">="An
example site for learning to create a new site definition."</span><span style="color: #ff0000">DisplayCategory</span><span style="color: #0000ff">="Collaboration"</span><span style="color: #0000ff">&gt;</span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">Configuration</span><span style="color: #0000ff">&gt;</span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">Template</span><span style="color: #0000ff">&gt;</span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">Templates</span><span style="color: #0000ff">&gt;</span></p>
            <p>
              <span style="color: #0000ff">
              </span> 
</p>
          </pre>
        </div>
        <p>
          <br />
          <em>NOTE: Dang, I made a mistake in my original VS template.  I had originally
named the SiteTemplates directory 'SiteDefinitions'.  If you've downloaded the
VS template since 9/23, this has been fixed.  If you got the template before
then, renaming the SiteDefinitions folder to be SiteTemplates works, or you can <a href="http://blog.richfinn.net/blog/2007/09/19/VisualStudio2005TemplateWithInstallerForBuildingMOSSSolutionPackages.aspx">download
and install it again</a>.  Whoops...</em>
        </p>
        <p>
Now navigate in Windows Explorer to \12\TEMPLATE\SiteTemplates. All of the folders
in here are the site templates.  Because we are creating a copy of the Team
site template, copy the 'sts' folder - the Team Site definition - into the Template\SiteTemplates
directory of the VS project and rename it to match the Name attribute value of the
webtemp.customsitesolution.xml file, which I named CustomSiteExample, as shown above.
</p>
        <p>
The directory structure of the project should now look like this:<br /><br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_9.png" atomicselection="true"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="215" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_thumb_9.png" width="240" border="0" /></a>  
</p>
        <p>
Open the onet.xml file in TEMPLATE\SiteDefinitions\CustomSiteExample\xml of your VS
project.  This is the primary configuration file of the site definition. 
(I hear that onet stands for Office.NET, in case you're wondering.)  To make
this next part a little more manageable, collapse the primary nodes of the xml file
so that it looks like this:<br /><br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CustomSiteDefinitionasfeature_9691/image_4.png" atomicselection="true"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="128" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CustomSiteDefinitionasfeature_9691/image_thumb_4.png" width="240" border="0" /></a></p>
        <p>
One of the first things I like to do in onet is add a new attribute to the
Project element. Adding ' xmlns="<a href="http://schemas.microsoft.com/sharepoint/">http://schemas.microsoft.com/sharepoint/</a>"
' to the element will give you Intellisence in the onet file - a huge help.
</p>
        <p>
Change the /Project[@Title] value to be 'Custom Site Definition'
</p>
        <p>
Expand the Configurations section and delete all of the Configuration nodes except
for IDs -1 and 0<br /><br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CustomSiteDefinitionasfeature_9691/image_5.png" atomicselection="true"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="53" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CustomSiteDefinitionasfeature_9691/image_thumb_5.png" width="240" border="0" /></a></p>
        <p>
The /Project/Configurations/Configuration[@ID=0] node corresponds with the /Templates/Template[@ID=0]
node we have in the webtemp.customsitesolution.xml file.  If you want to create
other custom site definitions that are similar to the one we're creating first, then
all you need to do is create a new Configuration node with ID=1 in both the webtemp
file and the onet file.
</p>
        <p>
Next, expand the Modules element (/Project/Modules NOT /Project/Configuration[@ID=0]/Modules),
and delete all of the Module elements except for the one where @Name=Default.
</p>
        <p>
Essentially, that's it for creating the custom site definition.  If you wanted
to deploy the solution as it is right now, you'd have an exact replica of the Team
Site template, with a different name.  By building your Visual Studio project,
having used the MOSS Solution Builder Project template, all the pieces are in the
right place for creating a WSP file, and you should have a file named Exmapl.CustomSiteSolution.wsp
in the /wsp directory of the project, as shown below.
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CustomSiteDefinitionasfeature_9691/image_3.png" atomicselection="true">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="240" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CustomSiteDefinitionasfeature_9691/image_thumb_3.png" width="219" border="0" />
          </a>
        </p>
        <p>
Now, to create a code behind file for the default.aspx page that is included in the
site definition.
</p>
        <p>
In the CreateSiteExample folder in Visual Studio, create a new class file named default.aspx.cs. 
It should sit right next to default.aspx.  Change the namespace to <em>Example.CustomSiteSolution.CustomSiteExample</em>. 
Change the name of the class from @default to _default.<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_10.png" atomicselection="true"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_thumb_10.png" border="0" /></a></p>
        <p>
Make the page inherit from WebPartPage by adding ' : WebPartPage' after the class
name so that the file looks like this:<br /><br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_1.png" atomicselection="true"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="90" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_thumb_1.png" width="486" border="0" /></a></p>
        <p>
Here's a neat little trick: See the little red box beneath WebPartPage? That
means that Visual Studio wants to help you out using a little love from the built-in
Refactoring functionality.  Whenever you see this, press Shift+Alt+F10. 
A little menu will open with the refactoring options available.  In this case,
because we have a reference to Microsoft.SharePoint, Visual Studio wants to add out
using statement for us.<br /><br />
 <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_3.png" atomicselection="true"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="138" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_thumb_3.png" width="603" border="0" /></a></p>
        <p>
Now we need to add this namespace to the manifest.xml in the SafeControls section
so the code will be allowed to run in the SharePoint context, so we need to add it
to the SafeControls section of the ManifestTemplate.xml file, which will now
look like this:
</p>
        <div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4">
          <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <p>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">SafeControls</span>
              <span style="color: #0000ff">&gt;</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">SafeControl</span>
              <span style="color: #ff0000">Safe</span>
              <span style="color: #0000ff">="True"</span>
              <br />
       <span style="color: #ff0000">Assembly</span><span style="color: #0000ff">="Example.CustomSiteSolution,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=ef72d5cefb9f703d"</span></p>
            <p>
              <span style="color: #ff0000">Namespace</span>
              <span style="color: #0000ff">="Example.CustomSiteSolution"</span>
              <span style="color: #ff0000">TypeName</span>
              <span style="color: #0000ff">="*"</span>
              <span style="color: #0000ff">/&gt;</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">SafeControl</span>
              <span style="color: #ff0000">Safe</span>
              <span style="color: #0000ff">="True"</span>
            </p>
            <p>
              <span style="color: #ff0000">Assembly</span>
              <span style="color: #0000ff">="Example.CustomSiteSolution,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=ef72d5cefb9f703d"</span>
            </p>
            <p>
              <span style="color: #ff0000">Namespace</span>
              <span style="color: #0000ff">="Example.CustomSiteSolution.CustomSiteExample"</span>
              <span style="color: #ff0000">TypeName</span>
              <span style="color: #0000ff">="*"</span>
              <span style="color: #0000ff">/&gt;</span>
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">SafeControls</span>
              <span style="color: #0000ff">&gt;</span>
            </p>
          </pre>
        </div>
        <p>
When the project is built, the ManifestTemplate.xml is merged with auto-generated
files to create the manifest.xml needed for the solution.<br /><br />
In the default.aspx, locate the Page directive at the top of the page.  It should
look like this:<br /></p>
        <div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4">
          <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <span style="background-color: #ffff00">&lt;%@
Page language="C#" MasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c"
%&gt;</span>
          </pre>
        </div>
        <p>
Change the Inherits attribute value to be "Example.CustomSiteSolution.CustomSiteExample._default."
This ties the page to the new code behind file.
</p>
        <p>
Place a asp:Label control named <em>lblBreadCrumbHello</em> right before the breadcrumb
control so that it looks like this:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_4.png" atomicselection="true"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="64" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_thumb_4.png" width="591" border="0" /></a></p>
        <p>
In the default.aspx.cs class, declare the Label control in the class like this:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_5.png" atomicselection="true"><img height="84" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_thumb_5.png" width="379" border="0" /></a></p>
        <p>
This is similar to the way the .designer files work in the Asp.Net Web Application
projects, but we have to add them by hand in WSS development.  I wouldn't be
surprised if WSS development in Visual Studio eventually works just like Asp.Net
application projects, but until then, this isn't that bad.
</p>
        <p>
Now, create a method to handle the Page_Load event in the class, and populate the
asp:label control like this:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_6.png" atomicselection="true"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="138" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_thumb_6.png" width="454" border="0" /></a></p>
        <p>
When you create a site, the breadcrumb should look like this:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_7.png" atomicselection="true"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="73" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_thumb_7.png" width="335" border="0" /></a></p>
        <p>
That's it!  Now let's deploy the solution...
</p>
        <p>
To deploy, open both the deploy.cmd and upgrade.cmd files in the DeploymentScripts
directory of your VS project.  At the top, there's a line that looks like this:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_8.png" atomicselection="true"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="19" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_thumb_8.png" width="309" border="0" /></a> <br />
Change the value of SITE_URL to be the URL of your site you want to deploy the solution
to.  Do the same for the upgrade.cmd file while you're at it.
</p>
        <p>
To deploy the solution, navigate in Windows Explorer to the DeploymentScripts directory
for the project.  Double-click deploy.cmd to execute the deployment command. 
You might see an error the first time you deply saying that the solution is not in
the solution store because the deployment script tries to delete the solution
from the solution store first.  This is needed because if you add new features
to the solution, you needed to execute the deploysolution operation of stsadm in order
for the features to be installed correctly.
</p>
        <p>
If you are not adding new features, you can execute the upgrade.cmd file.  This
file updates the files on the server with the latest versions, as well as updating
the assembly with any code changes.  Chris O' Brian has a good post on <a href="http://sharepointnutsandbolts.blogspot.com/2007/05/feature-stapling.html">adding
features to site definitions</a>.
</p>
        <p>
After you deploy the solution for the first time, even though the ResetWebServer attribute
in the manifest.xml is set to true, it's a good idea to run IISReset on the WFE servers
to ensure that the new site definition is picked up.  You shouldn't have to do
this for subsequent deployments.
</p>
        <p>
When you choose to create a new site, you should see the new site definition in the
list of available templates:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_11.png" atomicselection="true"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_thumb_11.png" border="0" /></a></p>
        <p>
There, a custom site definition deployed as a solution (using the Visual Studio Solution
Project template) to all WFE servers running in your farm - one of the joys of
solutions.  Quick and easy, hopefully...
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=24a27e7a-2bb3-41b5-a29b-484ee74ede68" />
      </body>
      <title>Creating and deploying a Custom Site Definition as a feature</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,24a27e7a-2bb3-41b5-a29b-484ee74ede68.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/09/23/CreatingAndDeployingACustomSiteDefinitionAsAFeature.aspx</link>
      <pubDate>Sun, 23 Sep 2007 16:42:25 GMT</pubDate>
      <description>&lt;p&gt;
Ok, so you really don't develop a custom site definition as a Feature in the &lt;a href="http://www.codeproject.com/spoint/ExtendingSPS.asp"&gt;WSSv3
sense of the word 'feature&lt;/a&gt;', but you can create a &lt;a href="http://msdn2.microsoft.com/en-us/library/bb466225.aspx"&gt;solution
package&lt;/a&gt; which contains all the needed pieces for the custom site definition, including
any Features you want activated on the site when it's first created.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
While there's &lt;a href="http://search.live.com/results.aspx?q=custom+site+definition&amp;amp;src=IE-SearchBox"&gt;plenty
of documentation around creating custom site definitions&lt;/a&gt;&amp;nbsp;out there, I figured
it would be beneficial to explain the steps needed to create the solution and deploy
everything as a&amp;nbsp;a single entity into WSSv3 as a WSP.
&lt;/p&gt;
&lt;p&gt;
For this example, I'm going to create a custom version of the Team Site template without
any significant changes because I don't want to deep dive into how to create a custom
site definition.&amp;nbsp;&amp;nbsp; I'm then going to add a Label control to the default.aspx
and populate it's value in a new code-code behind class for&amp;nbsp;the default.aspx&amp;nbsp;page
that's not included out of the box. 
&lt;/p&gt;
&lt;p&gt;
While I don't like forcing an install any anyone, I'm going to use the &lt;a href="http://blog.richfinn.net/blog/2007/09/19/VisualStudio2005TemplateWithInstallerForBuildingMOSSSolutionPackages.aspx"&gt;Visual
Studio 2005 project template I created&lt;/a&gt; which will take care of most of the tricky
pieces that are required to create and deploy the solution&amp;nbsp; This thing really&amp;nbsp;does
make custom solution development using Visual Studio for WSS a snap.&amp;nbsp; Please&amp;nbsp;download
it and check it out.
&lt;/p&gt;
&lt;p&gt;
Once you've installed the Visual Studio project template correctly, create a new project
using the MOSS Solution Builder Project&amp;nbsp;template.&amp;nbsp; For this example, I named
the project Example.CustomSiteSolution.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CustomSiteDefinitionasfeature_9691/image_1.png" atomicselection="true"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="171" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CustomSiteDefinitionasfeature_9691/image_thumb_1.png" width="240" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
After the project has been created, you should &lt;a href="http://msdn2.microsoft.com/en-us/library/xc31ft41.aspx"&gt;sign
the assembly&lt;/a&gt; using your own key file, but for the sake of this example, I'm going
to leave the temp.snk file where it is.
&lt;/p&gt;
&lt;p&gt;
Build the project.&amp;nbsp; This will ensure that the assembly is in place so we can
get the public key token using the &lt;a href="http://blog.richfinn.net/blog/2007/07/06/WhatIsThePublicKeyTokenOfMyAssemblyWithoutHavingToDropItInTheGAC.aspx"&gt;sn.exe
-T method&lt;/a&gt;.&amp;nbsp; Once you have the public key token, replace the [Your_PKT] placeholder
in the ManifestTemplate.xml file.
&lt;/p&gt;
&lt;p&gt;
Navigate in Windows Explorer to \12\TEMPLATE\1033\XML.&amp;nbsp; The xml files here contain
the information needed by WSS to know what&amp;nbsp;templates are available for sites
to be created.&amp;nbsp; Bill Baer has a good post on &lt;a href="http://blogs.technet.com/wbaer/archive/2007/03/25/understanding-webtemp-xml.aspx" target="_blank"&gt;understanding
the webtemp files&lt;/a&gt;&amp;nbsp;if you want to know more about the specifics and the schema.
&lt;/p&gt;
&lt;p&gt;
Since we're going to be creating a custom version of the Team Site template, copy
the webtemp.xml file, and paste it into the \TEMPLATE\1033\XML directory of your VS
project.&amp;nbsp; Rename it to &lt;em&gt;'webtemp.customsitesolution.xml&lt;/em&gt;'. The new name
doesn't matter too much other than that it has to start with &lt;em&gt;webtemp&lt;/em&gt;, but
it's a good idea to have it relate to the solution to which it's attached.
&lt;/p&gt;
&lt;p&gt;
Open the xml file and delete all the Template elements except for the one with the
Name="STS".&amp;nbsp; Change the name to be CustomSiteExample, and change the ID to a
number over 10000.&amp;nbsp; Also delete the other Configuration elements except for the
first one with the ID of 0.&amp;nbsp; You can also change the name and description of
the configuration element to be whatever you want.
&lt;/p&gt;
&lt;p&gt;
The final version of the file should look like this:
&lt;/p&gt;
&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;
&lt;p&gt;
&lt;span style="color: #0000ff"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #800000"&gt;xml&lt;/span&gt; &lt;span style="color: #ff0000"&gt;version&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="1.0"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;encoding&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="utf-8"&lt;/span&gt;?&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #008000"&gt;&amp;lt;!--
_lcid="1033" _version="12.0.4518" _dal="1" --&amp;gt;&lt;/span&gt; &lt;span style="color: #008000"&gt;&amp;lt;!--
_LocalBinding --&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Templates&lt;/span&gt; &lt;span style="color: #ff0000"&gt;xmlns:ows&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Microsoft
SharePoint"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Template&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="CustomSiteExample"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="111000"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Configuration&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Title&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Custom
Site Exmaple Site"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Hidden&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="FALSE"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ImageUrl&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="/_layouts/images/stsprev.png"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Description&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="An
example site for learning to create a new site definition."&lt;/span&gt; &lt;span style="color: #ff0000"&gt;DisplayCategory&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Collaboration"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Configuration&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Template&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Templates&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color: #0000ff"&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;br&gt;
&lt;em&gt;NOTE: Dang, I made a mistake in my original VS template.&amp;nbsp; I had originally
named the SiteTemplates directory 'SiteDefinitions'.&amp;nbsp; If you've downloaded the
VS template since 9/23, this has been fixed.&amp;nbsp; If&amp;nbsp;you got the template before
then, renaming the SiteDefinitions folder to be SiteTemplates works, or you can &lt;a href="http://blog.richfinn.net/blog/2007/09/19/VisualStudio2005TemplateWithInstallerForBuildingMOSSSolutionPackages.aspx"&gt;download
and install it again&lt;/a&gt;.&amp;nbsp; Whoops...&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
Now navigate in Windows Explorer to \12\TEMPLATE\SiteTemplates. All of the folders
in&amp;nbsp;here are the site templates.&amp;nbsp; Because we are creating a copy of the Team
site template, copy the 'sts' folder - the Team Site definition - into the Template\SiteTemplates
directory of the VS project and rename it to match the Name attribute value of the
webtemp.customsitesolution.xml file, which I named CustomSiteExample, as shown above.
&lt;/p&gt;
&lt;p&gt;
The directory structure of the project should now look like this:&lt;br&gt;
&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_9.png" atomicselection="true"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="215" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_thumb_9.png" width="240" border="0"&gt;&lt;/a&gt; &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Open the onet.xml file in TEMPLATE\SiteDefinitions\CustomSiteExample\xml of your VS
project.&amp;nbsp; This is the primary configuration file of the site definition.&amp;nbsp;
(I hear that onet stands for Office.NET, in case you're wondering.)&amp;nbsp; To make
this next part a little more manageable, collapse the primary nodes of the xml file
so that it looks like this:&lt;br&gt;
&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CustomSiteDefinitionasfeature_9691/image_4.png" atomicselection="true"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="128" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CustomSiteDefinitionasfeature_9691/image_thumb_4.png" width="240" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
One of the first things I like to do in&amp;nbsp;onet&amp;nbsp;is add a new attribute to the
Project element. Adding ' xmlns="&lt;a href="http://schemas.microsoft.com/sharepoint/"&gt;http://schemas.microsoft.com/sharepoint/&lt;/a&gt;"
' to the element will give you Intellisence in the onet file - a huge help.
&lt;/p&gt;
&lt;p&gt;
Change the /Project[@Title] value to be 'Custom Site Definition'
&lt;/p&gt;
&lt;p&gt;
Expand the Configurations section and delete all of the Configuration nodes except
for IDs -1 and 0&lt;br&gt;
&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CustomSiteDefinitionasfeature_9691/image_5.png" atomicselection="true"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="53" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CustomSiteDefinitionasfeature_9691/image_thumb_5.png" width="240" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
The /Project/Configurations/Configuration[@ID=0]&amp;nbsp;node corresponds with the /Templates/Template[@ID=0]
node we have in the webtemp.customsitesolution.xml file.&amp;nbsp; If you want to create
other custom site definitions that are similar to the one we're creating first, then
all you need to do is create a new Configuration node with ID=1 in both the webtemp
file and the onet file.
&lt;/p&gt;
&lt;p&gt;
Next, expand the Modules&amp;nbsp;element (/Project/Modules NOT /Project/Configuration[@ID=0]/Modules),
and delete all of the Module elements except for the one where @Name=Default.
&lt;/p&gt;
&lt;p&gt;
Essentially, that's it for creating the custom site definition.&amp;nbsp; If you wanted
to deploy the solution as it is right now, you'd have an exact replica of the Team
Site template, with a different name.&amp;nbsp; By building your Visual Studio project,
having used the MOSS Solution Builder Project template, all the pieces are in the
right place for creating a WSP file, and you should have a file named Exmapl.CustomSiteSolution.wsp
in the /wsp directory of the project, as shown below.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CustomSiteDefinitionasfeature_9691/image_3.png" atomicselection="true"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="240" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CustomSiteDefinitionasfeature_9691/image_thumb_3.png" width="219" border="0"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Now, to create a code behind file for the default.aspx page that is included in the
site definition.
&lt;/p&gt;
&lt;p&gt;
In the CreateSiteExample folder in Visual Studio, create a new class file named default.aspx.cs.&amp;nbsp;
It should sit right next to default.aspx.&amp;nbsp; Change the namespace to &lt;em&gt;Example.CustomSiteSolution.CustomSiteExample&lt;/em&gt;.&amp;nbsp;
Change the name of the class from @default to _default.&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_10.png" atomicselection="true"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_thumb_10.png" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Make the page inherit from WebPartPage by adding ' : WebPartPage' after the class
name so that the file looks like this:&lt;br&gt;
&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_1.png" atomicselection="true"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="90" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_thumb_1.png" width="486" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Here's a neat little trick: See the little red box beneath&amp;nbsp;WebPartPage? That
means that Visual Studio wants to help you out using a little love from the built-in
Refactoring functionality.&amp;nbsp; Whenever you see this, press Shift+Alt+F10.&amp;nbsp;
A little menu will open with the refactoring options available.&amp;nbsp; In this case,
because we have a reference to Microsoft.SharePoint, Visual Studio wants to add out
using statement for us.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_3.png" atomicselection="true"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="138" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_thumb_3.png" width="603" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Now we need to add this namespace to the manifest.xml in the SafeControls section
so the code will be allowed to run in the SharePoint context, so we need to add it
to the SafeControls section of the&amp;nbsp;ManifestTemplate.xml file, which will now
look like this:
&lt;/p&gt;
&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;
&lt;p&gt;
&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;SafeControls&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;SafeControl&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Safe&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="True"&lt;/span&gt; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #ff0000"&gt;Assembly&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Example.CustomSiteSolution,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=ef72d5cefb9f703d"&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color: #ff0000"&gt;Namespace&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Example.CustomSiteSolution"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;TypeName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="*"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;SafeControl&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Safe&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="True"&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color: #ff0000"&gt;Assembly&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Example.CustomSiteSolution,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=ef72d5cefb9f703d"&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color: #ff0000"&gt;Namespace&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Example.CustomSiteSolution.CustomSiteExample"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;TypeName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="*"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;SafeControls&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
When the project is built, the ManifestTemplate.xml is merged with auto-generated
files to create the manifest.xml needed for the solution.&lt;br&gt;
&lt;br&gt;
In the default.aspx, locate the Page directive at the top of the page.&amp;nbsp; It should
look like this:&lt;br&gt;
&lt;/p&gt;
&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="background-color: #ffff00"&gt;&amp;lt;%@
Page language="C#" MasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c"
%&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
Change the Inherits attribute value to be "Example.CustomSiteSolution.CustomSiteExample._default."
This ties the page to the new code behind file.
&lt;/p&gt;
&lt;p&gt;
Place a asp:Label control named &lt;em&gt;lblBreadCrumbHello&lt;/em&gt; right before the breadcrumb
control so that it looks like this:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_4.png" atomicselection="true"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="64" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_thumb_4.png" width="591" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
In the default.aspx.cs class, declare the Label control in the class like this:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_5.png" atomicselection="true"&gt;&lt;img height="84" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_thumb_5.png" width="379" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
This is similar to the way the .designer files work in the Asp.Net Web Application
projects, but we have to add them by hand in WSS development.&amp;nbsp; I wouldn't be
surprised if WSS development in Visual Studio eventually&amp;nbsp;works just like&amp;nbsp;Asp.Net
application projects, but until then, this isn't that bad.
&lt;/p&gt;
&lt;p&gt;
Now, create a method to handle the Page_Load event in the class, and populate the
asp:label control like this:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_6.png" atomicselection="true"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="138" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_thumb_6.png" width="454" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
When you create a site, the breadcrumb should look like this:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_7.png" atomicselection="true"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="73" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_thumb_7.png" width="335" border="0"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
That's it!&amp;nbsp; Now let's deploy&amp;nbsp;the solution...
&lt;/p&gt;
&lt;p&gt;
To deploy,&amp;nbsp;open both the&amp;nbsp;deploy.cmd and upgrade.cmd files in the DeploymentScripts
directory of your VS project.&amp;nbsp; At the top, there's a line that looks like this:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_8.png" atomicselection="true"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="19" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_thumb_8.png" width="309" border="0"&gt;&lt;/a&gt;&amp;nbsp;&lt;br&gt;
Change the value of SITE_URL to be the URL of your site you want to deploy the solution
to.&amp;nbsp; Do the same for the upgrade.cmd file while you're at it.
&lt;/p&gt;
&lt;p&gt;
To deploy the solution, navigate in Windows Explorer to the DeploymentScripts directory
for the project.&amp;nbsp; Double-click deploy.cmd to execute the deployment command.&amp;nbsp;
You might see an error the first time you deply saying that the solution is not in
the solution store&amp;nbsp;because the deployment script tries to delete the solution
from the solution store first.&amp;nbsp; This is needed because if you add new features
to the solution, you needed to execute the deploysolution operation of stsadm in order
for the features to be installed correctly.
&lt;/p&gt;
&lt;p&gt;
If you are not adding new features, you can execute the upgrade.cmd file.&amp;nbsp; This
file updates the files on the server with the latest versions, as well as updating
the assembly with any code changes.&amp;nbsp; Chris O' Brian has a good post on &lt;a href="http://sharepointnutsandbolts.blogspot.com/2007/05/feature-stapling.html"&gt;adding
features to site definitions&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
After you deploy the solution for the first time, even though the ResetWebServer attribute
in the manifest.xml is set to true, it's a good idea to run IISReset on the WFE servers
to ensure that the new site definition is picked up.&amp;nbsp; You shouldn't have to do
this for subsequent deployments.
&lt;/p&gt;
&lt;p&gt;
When you choose to create a new site, you should see the new site definition in the
list of available templates:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_11.png" atomicselection="true"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatinganddeployingaCustomSiteDefinitio_7721/image_thumb_11.png" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
There, a custom site definition deployed as a solution (using the Visual Studio Solution
Project template) to all WFE servers running in your farm - one&amp;nbsp;of the joys of
solutions.&amp;nbsp; Quick and easy, hopefully...
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=24a27e7a-2bb3-41b5-a29b-484ee74ede68" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,24a27e7a-2bb3-41b5-a29b-484ee74ede68.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
      <category>WSP Development</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=5f5b55fb-41a9-4549-93ac-a0296ad96bc8</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,5f5b55fb-41a9-4549-93ac-a0296ad96bc8.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,5f5b55fb-41a9-4549-93ac-a0296ad96bc8.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=5f5b55fb-41a9-4549-93ac-a0296ad96bc8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A while ago, I released my little executable for creating WSPs that could be incorporated
into the build process of Visual Studio 2005 similar to <a href="http://www.keutmann.dk/">Carsten
Keutmann</a>'s <a href="http://www.codeplex.com/wspbuilder" target="_blank">WSPBuilder</a>. The
downfall was that there was a lot of configuration you had to do to get it working. 
So, now I've created a Visual Studio project template which is pre-configured with
all the needed elements for building the WSP.  All you need to to is use the
choose the project template and build.
</p>
        <p>
Here's what you need to get going...
</p>
        <p>
1) <a href="https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=wspprojecttemplate&amp;ReleaseId=8747" target="_blank">Download
the installer for the template</a> onto your MOSS development server.  When
you run the exe, it will unpack to c:\createddf, and you'll see a console window open
saying 'Configuring Visual Studio, please wait...'.  Don't delete or move the
c:\createddf directory!
</p>
        <p>
2) Close Visual Studio and re-open
</p>
        <p>
3) Create a new project, and choose the MOSS Solution Builder Project template from
the SharePoint_RF project type group.  Make sure to name your project with no
spaces...<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/VisualStudio2005templatewithinstallerfor_EF31/image.png" atomicselection="true"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="321" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/VisualStudio2005templatewithinstallerfor_EF31/image_thumb.png" width="432" border="0" /></a></p>
        <p>
4) The solution explorer should look like this once the project opens (click img to
expand):<br /><br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/VisualStudio2005templatewithinstallerfor_EF31/image_2.png" atomicselection="true"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="240" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/VisualStudio2005templatewithinstallerfor_EF31/image_thumb_2.png" width="143" border="0" /></a><br />
There is a temp.snk file which will be used to sign your assembly unless you change
it, which you should.
</p>
        <p>
5) Build the project
</p>
        <p>
7) Open ManifestTemplate.xml<br />
- The solution guid is unique for this solution<br />
- This file is your handle on having control over what's in the manifest.xml file
in the wsp.  If you want other namespaces to be included in the safe controls
section, put them in.  The same rules apply as in the <a href="http://blog.richfinn.net/blog/2007/08/30/CreateDDFWSPToolNowWithManifest.aspx" target="_blank">previous
wsp packaging tool</a> I created earlier.<br /><br />
8) Open the deploy.cmd file in the DeploymentScripts directory.  Change the SITE_URL
variable to be the address of the web application you want to deploy the solution
to.<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/VisualStudio2005templatewithinstallerfor_EF31/image_3.png" atomicselection="true"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="107" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/VisualStudio2005templatewithinstallerfor_EF31/image_thumb_3.png" width="411" border="0" /></a></p>
        <p>
9) Navigate to the DeploymentScripts directory in Windows Explorer, and double-click
deploy.cmd.  Make sure you have the stsadm directory added to your path environment
variables.  You could also create an external tool in Visual Stuido so you never
need to leave the IDE.  
</p>
        <p>
The first time you run the deploy.cmd, you might see an error saying that the solution
does not exist in the solution store.  Just hit enter.  The deploy.cmd tries
to delete, then add, then deploy the solution.  You can tweak the file so that
features are activated, as well.  There's an upgrade.cmd for upgrading your solution,
as well.  Just make sure you remember to change the SITE_URL variable.
</p>
        <p>
If you have any questions, <a href="javascript:var e1='%67%6d%61%69%6c%2e%63%6f%6d',e2='mailto: ', e3='%62%6c%6f%67%2e%72%69%63%68%66%69%6e%6e%2e%6e%65%74';var e0=e2+e3+'%40'+e1+'?Subject=Comments on: Rich Finn';(window.location?window.location.replace(e0):document.write(e0));" target="_blank">please
ask</a>.
</p>
        <p>
Enjoy!
</p>
        <p>
Update (10/18/2007)
</p>
        <p>
Released a newer version of the template, here's some of the updates:
</p>
        <div>1) I took out the sample pages from the layouts directory because I wasn't
able to achieve exactly what I was trying to do. Essentially, I was trying to demonstrate how
to have ASPX and ASCX files with code behind, but I just didn't like how
it was sitting in the template. I explain how to do the same thing in my post
on <a href="http://blog.richfinn.net/blog/2007/09/23/CreatingAndDeployingACustomSiteDefinitionAsAFeature.aspx">deploying
a site definition as a feature</a>, and <a href="http://www.andrewconnell.com/blog/archive/2007/09/30/6126.aspx">Andrew
Connell explains how to</a> on his blog, too.
</div>
        <div> 
</div>
        <div>2) The ManifestTemplate.xml file was changed so that you no longer need to worry
about putting the public key token into the file.  The <strong>[ThisAssemblyName] </strong>placeholder
in the file is replaced with the correct information when you build the project after
you sign it.  Once you sign the project, you need to build the project twice,
as the signing process takes too long, and the assembly full name isn't yet available. 
Once it is, you can build it normally from then on.
</div>
        <div> 
</div>
        <div>3) You don't need to worry about adding features to the FeatureManifest section
in ManifestTemplate.xml. In fact, you don't need a FeatureManifest section in ManifestTemplate
at all.  Custom features in the Features directory of the project will have their
feature.xml files added to the manifest.xml output by the build.  If you don't
want a feature included in the manifest, add '.exclude' to the custom feature's directory
name.
</div>
        <div> 
</div>
        <div>4) If you want other assemblies included in the wsp, like non-GAC'd assemblies
or 3rd party assemblies, you can add them to the Assemblies directory in your project. 
They will get added to the root of the wsp, but you need to add the appropriate
assembly lines in the ManifestTemplate.xml file.
</div>
        <div> 
</div>
        <div>
          <strong>Support for Visual Studio 2008:</strong>
        </div>
        <div> 
</div>
        <div>Execute InstallWSPBuilder.exe in c:\createddf via command line, but add the parameter <font color="#000000">'/2008'. 
This will set up the template in VS08.</font></div>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=5f5b55fb-41a9-4549-93ac-a0296ad96bc8" />
      </body>
      <title>Visual Studio 2005 template (with installer) for building MOSS Solution Packages</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,5f5b55fb-41a9-4549-93ac-a0296ad96bc8.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/09/19/VisualStudio2005TemplateWithInstallerForBuildingMOSSSolutionPackages.aspx</link>
      <pubDate>Wed, 19 Sep 2007 23:00:37 GMT</pubDate>
      <description>&lt;p&gt;
A while ago, I released my little executable for creating WSPs that could be incorporated
into the build process of Visual Studio 2005 similar to &lt;a href="http://www.keutmann.dk/"&gt;Carsten
Keutmann&lt;/a&gt;'s &lt;a href="http://www.codeplex.com/wspbuilder" target=_blank&gt;WSPBuilder&lt;/a&gt;.&amp;nbsp;The
downfall was that there was a lot of configuration you had to do to get it working.&amp;nbsp;
So, now I've created a Visual Studio project template which is pre-configured with
all the needed elements for building the WSP.&amp;nbsp; All you need to to is use the
choose the project template and build.
&lt;/p&gt;
&lt;p&gt;
Here's what you need to get going...
&lt;/p&gt;
&lt;p&gt;
1) &lt;a href="https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=wspprojecttemplate&amp;amp;ReleaseId=8747" target=_blank&gt;Download
the installer for the template&lt;/a&gt;&amp;nbsp;onto your MOSS development server.&amp;nbsp; When
you run the exe, it will unpack to c:\createddf, and you'll see a console window open
saying 'Configuring Visual Studio, please wait...'.&amp;nbsp; Don't delete or move the
c:\createddf directory!
&lt;/p&gt;
&lt;p&gt;
2) Close Visual Studio and re-open
&lt;/p&gt;
&lt;p&gt;
3) Create a new project, and choose the MOSS Solution Builder Project template from
the SharePoint_RF project type group.&amp;nbsp; Make sure to name your project with no
spaces...&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/VisualStudio2005templatewithinstallerfor_EF31/image.png" atomicselection="true"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=321 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/VisualStudio2005templatewithinstallerfor_EF31/image_thumb.png" width=432 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
4) The solution explorer should look like this once the project opens (click img to
expand):&lt;br&gt;
&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/VisualStudio2005templatewithinstallerfor_EF31/image_2.png" atomicselection="true"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=240 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/VisualStudio2005templatewithinstallerfor_EF31/image_thumb_2.png" width=143 border=0&gt; &lt;/a&gt;
&lt;br&gt;
There is a temp.snk file which will be used to sign your assembly unless you change
it, which you should.
&lt;/p&gt;
&lt;p&gt;
5) Build the project
&lt;/p&gt;
&lt;p&gt;
7) Open ManifestTemplate.xml&lt;br&gt;
- The solution guid is unique for this solution&lt;br&gt;
- This file is your handle on having control over what's in the manifest.xml file
in the wsp.&amp;nbsp; If you want other namespaces to be included in the safe controls
section, put them in.&amp;nbsp; The same rules apply as in the &lt;a href="http://blog.richfinn.net/blog/2007/08/30/CreateDDFWSPToolNowWithManifest.aspx" target=_blank&gt;previous
wsp packaging tool&lt;/a&gt; I created earlier.&lt;br&gt;
&lt;br&gt;
8) Open the deploy.cmd file in the DeploymentScripts directory.&amp;nbsp; Change the SITE_URL
variable to be the address of the web application you want to deploy the solution
to.&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/VisualStudio2005templatewithinstallerfor_EF31/image_3.png" atomicselection="true"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=107 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/VisualStudio2005templatewithinstallerfor_EF31/image_thumb_3.png" width=411 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
9) Navigate to the DeploymentScripts directory in Windows Explorer, and double-click
deploy.cmd.&amp;nbsp; Make sure you have the stsadm directory added to your path environment
variables.&amp;nbsp; You could also create an external tool in Visual Stuido so you never
need to leave the IDE.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
The first time you run the deploy.cmd, you might see an error saying that the solution
does not exist in the solution store.&amp;nbsp; Just hit enter.&amp;nbsp; The deploy.cmd tries
to delete, then add, then deploy the solution.&amp;nbsp; You can tweak the file so that
features are activated, as well.&amp;nbsp; There's an upgrade.cmd for upgrading your solution,
as well.&amp;nbsp; Just make sure you remember to change the SITE_URL variable.
&lt;/p&gt;
&lt;p&gt;
If you have any questions, &lt;a href="javascript:var e1='%67%6d%61%69%6c%2e%63%6f%6d',e2='mailto: ', e3='%62%6c%6f%67%2e%72%69%63%68%66%69%6e%6e%2e%6e%65%74';var e0=e2+e3+'%40'+e1+'?Subject=Comments on: Rich Finn';(window.location?window.location.replace(e0):document.write(e0));" target=_blank&gt;please
ask&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Enjoy!
&lt;/p&gt;
&lt;p&gt;
Update (10/18/2007)
&lt;/p&gt;
&lt;p&gt;
Released a newer version of the template, here's some of the updates:
&lt;/p&gt;
&lt;div&gt;1) I took out the sample pages from the layouts directory because&amp;nbsp;I wasn't
able to achieve exactly what I was trying to do. Essentially, I was trying to demonstrate&amp;nbsp;how
to have ASPX and ASCX&amp;nbsp;files with code behind, but I&amp;nbsp;just didn't like how
it was sitting in the template.&amp;nbsp;I explain how to do the same thing in my post
on &lt;a href="http://blog.richfinn.net/blog/2007/09/23/CreatingAndDeployingACustomSiteDefinitionAsAFeature.aspx"&gt;deploying
a site definition as a feature&lt;/a&gt;, and &lt;a href="http://www.andrewconnell.com/blog/archive/2007/09/30/6126.aspx"&gt;Andrew
Connell explains how to&lt;/a&gt;&amp;nbsp;on his blog, too.
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;2) The ManifestTemplate.xml file was changed so that you no longer need to worry
about putting the public key token into the file.&amp;nbsp; The &lt;strong&gt;[ThisAssemblyName] &lt;/strong&gt;placeholder
in the file is replaced with the correct information when you build the project after
you sign it.&amp;nbsp; Once you sign the project, you need to build the project twice,
as the signing process takes too long, and the assembly full name isn't yet available.&amp;nbsp;
Once it is, you&amp;nbsp;can build it normally from then on.
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;3) You don't need to worry about adding features to the FeatureManifest section
in ManifestTemplate.xml. In fact, you don't need a FeatureManifest section in ManifestTemplate
at all.&amp;nbsp; Custom features in the Features directory of the project will have their
feature.xml files added to the manifest.xml output by the build.&amp;nbsp; If you don't
want a feature included in the manifest, add '.exclude' to the custom feature's directory
name.
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;4) If you want other assemblies included in the wsp, like non-GAC'd assemblies
or 3rd party assemblies, you can add them to the Assemblies directory in your project.&amp;nbsp;
They will get added to the root of the&amp;nbsp;wsp, but you need to add the appropriate
assembly lines in the ManifestTemplate.xml file.
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;Support for Visual Studio 2008:&lt;/strong&gt;
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;Execute InstallWSPBuilder.exe in c:\createddf via command line, but add the parameter &lt;font color=#000000&gt;'/2008'.&amp;nbsp;
This will set up the template in VS08.&lt;/font&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=5f5b55fb-41a9-4549-93ac-a0296ad96bc8" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,5f5b55fb-41a9-4549-93ac-a0296ad96bc8.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
      <category>WSP Development</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=a580d611-8c4b-4d7a-8429-c6774a7590c1</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,a580d611-8c4b-4d7a-8429-c6774a7590c1.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,a580d611-8c4b-4d7a-8429-c6774a7590c1.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=a580d611-8c4b-4d7a-8429-c6774a7590c1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
When creating a content crawl schedule in MOSS, after pressing ok, the form came back
with an access denied message...<br /><br />
Error message: <font color="#ff0000">ERROR: Access is denied. (Exception from HRESULT:
x80070005 (E_ACCESSDENIED))</font></p>
        <p>
Resolution: <a title="http://support.microsoft.com/default.aspx/kb/926959" href="http://support.microsoft.com/default.aspx/kb/926959">http://support.microsoft.com/default.aspx/kb/926959</a></p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=a580d611-8c4b-4d7a-8429-c6774a7590c1" />
      </body>
      <title>Access Denied error creating content crawl schedule</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,a580d611-8c4b-4d7a-8429-c6774a7590c1.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/08/31/AccessDeniedErrorCreatingContentCrawlSchedule.aspx</link>
      <pubDate>Fri, 31 Aug 2007 13:37:21 GMT</pubDate>
      <description>&lt;p&gt;
When creating a content crawl schedule in MOSS, after pressing ok, the form came back
with an access denied message...&lt;br&gt;
&lt;br&gt;
Error message: &lt;font color=#ff0000&gt;ERROR: Access is denied. (Exception from HRESULT:
x80070005 (E_ACCESSDENIED))&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Resolution: &lt;a title=http://support.microsoft.com/default.aspx/kb/926959 href="http://support.microsoft.com/default.aspx/kb/926959"&gt;http://support.microsoft.com/default.aspx/kb/926959&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=a580d611-8c4b-4d7a-8429-c6774a7590c1" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,a580d611-8c4b-4d7a-8429-c6774a7590c1.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=a2596f20-43d6-4beb-a1c1-e5529ec32f18</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,a2596f20-43d6-4beb-a1c1-e5529ec32f18.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,a2596f20-43d6-4beb-a1c1-e5529ec32f18.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=a2596f20-43d6-4beb-a1c1-e5529ec32f18</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Yesterday, I released <a href="http://blog.richfinn.net/blog/2007/08/29/CreateDDFAndWSPByBuildingYourVisualStudioProject.aspx">a
little tool that creates the ddf and wsp files as part of the vs build process</a>. 
The downfall was that you still had to manage all those templatefile lines in the
manifest file.  This morning, I fixed that.
</p>
        <p>
The way the app works now is that it looks for a file in your project called <em>ManifestTemplate.xml</em>. 
Because there are so many different things you can do in the manifest, I didn't want
to take control away from being able to customize the manifest file.  Maybe you
have multiple assemblies you want to include, or you have resource files. 
I'm just concerned about the <em>TemplateFiles</em> section right now because it can
get pretty overwhelming.
</p>
        <p>
The ManifestTemplate.xml file is essentially exactly like your old manifest.xml, just
without the TemplateFiles section.  This tool takes ManifestTemplate.xml, and
through the same process used to create the ddf file, appends the TemplateFiles section
to it with all the needed child TemplateFile nodes, and outputs the manifest.xml
file to the root of your project.  This way you still have complete control over
what's going on in the manifest, but can add and remove files from the template directory
all you want.
</p>
        <p>
Here's the build process steps:<br />
1) Dev builds project<br />
2) ManifestTemplate.xml is transformed to manifest.xml with all TemplateFiles included<br />
3) Manifest.xml file created at root of project<br />
4) DDF file created at root of project<br />
5) Assembly is compiled<br />
6) WSP file created in /wsp directory
</p>
        <p>
          <a href="https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=wspprojecttemplate&amp;ReleaseId=8747">View
Codeplex Site for executable and source code</a>
        </p>
        <p>
        </p>
        <p>
Check out the post yesterday for <a href="http://blog.richfinn.net/blog/2007/08/29/CreateDDFAndWSPByBuildingYourVisualStudioProject.aspx">installation
and configuration instructions</a></p>
        <p>
        </p>
        <p>
Latest release notes:<br />
- Better error handling than yesterday<br />
- Don't want a file included in the solution, add '.exclude' to the filename<br />
- Files in the root directory of a feature (ie:/Template/FEATURES/featurename)
are excluded, as those files should be in Feature.xml's ElementManifests section<br />
- resx files or files included in a directory named <em>Resources</em> are
included in the ddf, but not in template files, as those should be in the <em>RootFiles</em> or <em>Resources</em> section<br />
- ListTemplate files for a custom list definition, if included in a directory named
ListTemplates, are also not included in the TemplateFiles section of the manifest.
These files should be in the list definition's Feature.xml. Any other files in the
ListTemplates directory are excluded.
</p>
        <p>
Update(9/23/07): I've created a <a href="http://blog.richfinn.net/blog/2007/09/19/VisualStudio2005TemplateWithInstallerForBuildingMOSSSolutionPackages.aspx">Visual
Studio 2005 project tempate for wsp development</a>. Check it out!
</p>
        <p>
Example ManifestTemplate.xml (same as manifest.xml,but no template files section):
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">Solution</span>
            <span style="COLOR: #ff0000">SolutionId</span>
            <span style="COLOR: #0000ff">="3ECF115B-B0C1-457e-87DB-D844FB763775"</span>
            <span style="COLOR: #ff0000">xmlns</span>
            <span style="COLOR: #0000ff">="http://schemas.microsoft.com/sharepoint/"</span>
            <span style="COLOR: #ff0000">ResetWebServer</span>
            <span style="COLOR: #0000ff">="TRUE"</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">Assemblies</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">Assembly</span>
            <span style="COLOR: #ff0000">DeploymentTarget</span>
            <span style="COLOR: #0000ff">="GlobalAssemblyCache"</span>
            <span style="COLOR: #ff0000">Location</span>
            <span style="COLOR: #0000ff">="assembly.dll"</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">SafeControls</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">SafeControl</span>
            <span style="COLOR: #ff0000">Safe</span>
            <span style="COLOR: #0000ff">="True"</span>
            <span style="COLOR: #ff0000">Assembly</span>
            <span style="COLOR: #0000ff">="assembly,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=[your pkt]"</span>
            <span style="COLOR: #ff0000">Namespace</span>
            <span style="COLOR: #0000ff">="assembly"</span>
            <span style="COLOR: #ff0000">TypeName</span>
            <span style="COLOR: #0000ff">="*"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">SafeControl</span>
            <span style="COLOR: #ff0000">Safe</span>
            <span style="COLOR: #0000ff">="True"</span>
            <span style="COLOR: #ff0000">Assembly</span>
            <span style="COLOR: #0000ff">="assembly,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=[your pkt]"</span>
            <span style="COLOR: #ff0000">Namespace</span>
            <span style="COLOR: #0000ff">="assembly.ServerControls"</span>
            <span style="COLOR: #ff0000">TypeName</span>
            <span style="COLOR: #0000ff">="*"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">Assembly</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">Assembly</span>
            <span style="COLOR: #ff0000">DeploymentTarget</span>
            <span style="COLOR: #0000ff">="GlobalAssemblyCache"</span>
            <span style="COLOR: #ff0000">Location<font color="#0000ff">="3rdParty</font></span>
            <font color="#0000ff">.<span style="COLOR: #ff0000">dll</span></font>"<span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SafeControls</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SafeControl</span><span style="COLOR: #ff0000">Safe</span><span style="COLOR: #0000ff">="True"</span><span style="COLOR: #ff0000">Assembly</span><span style="COLOR: #0000ff">="3rdParty,
Version=4.3.8.0, Culture=neutral, PublicKeyToken=kjh2kh32kjh21j"</span><span style="COLOR: #ff0000">Namespace</span><span style="COLOR: #0000ff">="3rdParty.WebControls"</span><span style="COLOR: #ff0000">TypeName</span><span style="COLOR: #0000ff">="*"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">SafeControls</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">Assembly</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">Assemblies</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">Resources</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">Resource</span><span style="COLOR: #ff0000">Location</span><span style="COLOR: #0000ff">="CustomResources\CustomResources.en-US.resx"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">Resource</span><span style="COLOR: #ff0000">Location</span><span style="COLOR: #0000ff">="CustomResources\CustomResources.resx"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">Resources</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">FeatureManifests</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">FeatureManifest</span><span style="COLOR: #ff0000">Location</span><span style="COLOR: #0000ff">="CustomFeature1\Feature.xml"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">FeatureManifest</span><span style="COLOR: #ff0000">Location</span><span style="COLOR: #0000ff">="CustomFeature2\Feature.xml"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">FeatureManifests</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">RootFiles</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">RootFile</span><span style="COLOR: #ff0000">Location</span><span style="COLOR: #0000ff">="CustomResources\CustomResources.en-US.resx"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">RootFile</span><span style="COLOR: #ff0000">Location</span><span style="COLOR: #0000ff">="CustomResources\CustomResources.resx"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">RootFiles</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">Solution</span><span style="COLOR: #0000ff">&gt;</span></pre>
        </div>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=a2596f20-43d6-4beb-a1c1-e5529ec32f18" />
      </body>
      <title>Create DDF/WSP Tool - now with Manifest!</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,a2596f20-43d6-4beb-a1c1-e5529ec32f18.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/08/30/CreateDDFWSPToolNowWithManifest.aspx</link>
      <pubDate>Thu, 30 Aug 2007 17:14:25 GMT</pubDate>
      <description>&lt;p&gt;
Yesterday, I released &lt;a href="http://blog.richfinn.net/blog/2007/08/29/CreateDDFAndWSPByBuildingYourVisualStudioProject.aspx"&gt;a
little tool that creates the ddf and wsp files as part of the vs build process&lt;/a&gt;.&amp;nbsp;
The downfall was that you still had to manage all those templatefile lines in the
manifest file.&amp;nbsp; This morning, I fixed that.
&lt;/p&gt;
&lt;p&gt;
The way the app works now is that it looks for a file in your project called &lt;em&gt;ManifestTemplate.xml&lt;/em&gt;.&amp;nbsp;
Because there are so many different things you can do in the manifest, I didn't want
to take control away from being able to customize the manifest file.&amp;nbsp; Maybe you
have multiple assemblies you&amp;nbsp;want to include, or you have resource files.&amp;nbsp;
I'm just concerned about the &lt;em&gt;TemplateFiles&lt;/em&gt; section right now because it can
get pretty overwhelming.
&lt;/p&gt;
&lt;p&gt;
The ManifestTemplate.xml file is essentially exactly like your old manifest.xml, just
without the TemplateFiles section.&amp;nbsp; This tool takes ManifestTemplate.xml, and
through the same process used to create the ddf file, appends the TemplateFiles section
to it with all the&amp;nbsp;needed child TemplateFile nodes, and outputs the manifest.xml
file to the root of your project.&amp;nbsp; This way you still have complete control over
what's going on in the manifest, but can add and remove files from the template directory
all you want.
&lt;/p&gt;
&lt;p&gt;
Here's the build process steps:&lt;br&gt;
1) Dev builds project&lt;br&gt;
2) ManifestTemplate.xml is transformed to manifest.xml with all TemplateFiles included&lt;br&gt;
3) Manifest.xml file created at root of project&lt;br&gt;
4) DDF file created at root of project&lt;br&gt;
5) Assembly is compiled&lt;br&gt;
6) WSP file created in /wsp directory
&lt;/p&gt;
&lt;p&gt;
&lt;a href="https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=wspprojecttemplate&amp;amp;ReleaseId=8747"&gt;View
Codeplex Site for executable and source code&lt;/a&gt; 
&lt;p&gt;
&lt;p&gt;
Check out the post yesterday for &lt;a href="http://blog.richfinn.net/blog/2007/08/29/CreateDDFAndWSPByBuildingYourVisualStudioProject.aspx"&gt;installation
and configuration instructions&lt;/a&gt; 
&lt;p&gt;
&lt;p&gt;
Latest release notes:&lt;br&gt;
- Better error handling than yesterday&lt;br&gt;
- Don't want a file included in the solution, add '.exclude' to the filename&lt;br&gt;
- Files&amp;nbsp;in the&amp;nbsp;root directory&amp;nbsp;of a feature (ie:/Template/FEATURES/featurename)
are excluded, as those files should be in Feature.xml's ElementManifests section&lt;br&gt;
- resx&amp;nbsp;files or files included in a directory named &lt;em&gt;Resources&lt;/em&gt;&amp;nbsp;are
included in the ddf, but not in template files, as&amp;nbsp;those should be in the &lt;em&gt;RootFiles&lt;/em&gt; or &lt;em&gt;Resources&lt;/em&gt; section&lt;br&gt;
- ListTemplate files for a custom list definition, if included in a directory named
ListTemplates, are also not included in the TemplateFiles section of the manifest.
These files should be in the list definition's Feature.xml. Any other files in the
ListTemplates directory are excluded.
&lt;/p&gt;
&lt;p&gt;
Update(9/23/07): I've created a &lt;a href="http://blog.richfinn.net/blog/2007/09/19/VisualStudio2005TemplateWithInstallerForBuildingMOSSSolutionPackages.aspx"&gt;Visual
Studio 2005 project tempate for wsp development&lt;/a&gt;. Check it out!
&lt;/p&gt;
&lt;p&gt;
Example ManifestTemplate.xml (same as manifest.xml,but no template files section):
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Solution&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;SolutionId&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="3ECF115B-B0C1-457e-87DB-D844FB763775"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="http://schemas.microsoft.com/sharepoint/"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ResetWebServer&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="TRUE"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assemblies&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assembly&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;DeploymentTarget&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="GlobalAssemblyCache"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="assembly.dll"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControls&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControl&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Safe&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="True"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Assembly&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="assembly,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=[your pkt]"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Namespace&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="assembly"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;TypeName&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="*"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControl&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Safe&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="True"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Assembly&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="assembly,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=[your pkt]"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Namespace&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="assembly.ServerControls"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;TypeName&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="*"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assembly&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assembly&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;DeploymentTarget&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="GlobalAssemblyCache"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;font color=#0000ff&gt;="3rdParty&lt;/font&gt;&lt;/span&gt;&lt;font color=#0000ff&gt;.&lt;span style="COLOR: #ff0000"&gt;dll&lt;/span&gt;&lt;/font&gt;"&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControls&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControl&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Safe&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="True"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Assembly&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="3rdParty,
Version=4.3.8.0, Culture=neutral, PublicKeyToken=kjh2kh32kjh21j"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Namespace&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="3rdParty.WebControls"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;TypeName&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="*"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControls&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assembly&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assemblies&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Resources&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Resource&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="CustomResources\CustomResources.en-US.resx"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Resource&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="CustomResources\CustomResources.resx"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Resources&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;FeatureManifests&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;FeatureManifest&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="CustomFeature1\Feature.xml"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;FeatureManifest&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="CustomFeature2\Feature.xml"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;FeatureManifests&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;RootFiles&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;RootFile&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="CustomResources\CustomResources.en-US.resx"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;RootFile&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="CustomResources\CustomResources.resx"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;RootFiles&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Solution&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=a2596f20-43d6-4beb-a1c1-e5529ec32f18" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,a2596f20-43d6-4beb-a1c1-e5529ec32f18.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
      <category>WSP Development</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=52640863-95ec-45a4-9309-123c93af3148</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,52640863-95ec-45a4-9309-123c93af3148.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,52640863-95ec-45a4-9309-123c93af3148.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=52640863-95ec-45a4-9309-123c93af3148</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
After wasting so much time by forgetting to add files to the ddf file (and just messing
with the ddf file in general) I said to myself, there HAS to be a better way to do
this DDF into WSP thing! So this morning I created a little program in an hour
and a half that creates my ddf file and then packages everything up into a wsp
for me. All I need to do is build my project.  I figured I'd share this tool,
so here it is...
</p>
        <p>
          <a href="https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=wspprojecttemplate&amp;ReleaseId=8747">Visit
Codeplex site for source and executables</a>
        </p>
        <p>
The most effective way to set up the Visual Studio environment for wsp development
I've found is to set up your folder structure to mirror the Templates directory in
the 12 hive, so this tool assumes that's what you're doing, too.
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreateDDFandWSPbybuildingyourVisualStudi_AA38/image_3.png" atomicselection="true">
            <img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="270" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreateDDFandWSPbybuildingyourVisualStudi_AA38/image_thumb_3.png" width="238" border="0" />
          </a>
        </p>
        <p>
If you have your project set up this way, this tool will go through the Template directory
of your project and pull out all the files that are not either a .CS or a .SSC (source
safe file).  If you get the source of this tool, you can see how the file exclusions
are managed and add your own.
</p>
        <p>
The one downfall right now is that this tool won't create the manifest.xml file for
you.  I'd like to get to that eventually, but there was just too much complexity
in the way the manifest file works to do the whole thing in under two hours.
</p>
        <p>
Install instructions:<br />
1) Either get the executable or build the project<br />
2) Put the CreateDDF.exe file in c:/CreateDDF<br />
3) In your moss solution project in Visual Studio, right click on the project
and choose 'Unload Project'<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreateDDFandWSPbybuildingyourVisualStudi_AA38/image.png" atomicselection="true"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="240" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreateDDFandWSPbybuildingyourVisualStudi_AA38/image_thumb.png" width="160" border="0" /></a></p>
        <p>
4) Once the project has been unloaded, right click it again, and choose 'Edit projectname.csproj'<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreateDDFandWSPbybuildingyourVisualStudi_AA38/image_1.png" atomicselection="true"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="121" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreateDDFandWSPbybuildingyourVisualStudi_AA38/image_thumb_1.png" width="240" border="0" /></a></p>
        <p>
5) Scroll all the way to the bottom of the .csproj file where you see the following
code
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #008000">&lt;!--
To modify your build process, add your task inside one of the </span>
            <span style="COLOR: #008000"> targets
below and uncomment it. </span>
            <span style="COLOR: #008000"> Other similar extension
points exist, see Microsoft.Common.targets.</span>
            <span style="COLOR: #008000"> &lt;Target
Name="BeforeBuild"&gt;</span>
            <span style="COLOR: #008000"> &lt;/Target&gt;</span>
            <span style="COLOR: #008000"> &lt;Target
Name="AfterBuild"&gt;</span>
            <span style="COLOR: #008000"> &lt;/Target&gt;</span>
            <span style="COLOR: #008000"> --&gt;</span>
          </pre>
        </div>
        <p>
          <br />
          <br />
6) Change the above code to:
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">Target</span>
            <span style="COLOR: #ff0000">Name</span>
            <span style="COLOR: #0000ff">="BeforeBuild"</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">Exec</span>
            <span style="COLOR: #ff0000">Command</span>
            <span style="COLOR: #0000ff">="$(MakeWSPPath)
-n $(MSBuildProjectName)"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">Target</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">Target</span>
            <span style="COLOR: #ff0000">Name</span>
            <span style="COLOR: #0000ff">="AfterBuild"</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">Exec</span>
            <span style="COLOR: #ff0000">Command</span>
            <span style="COLOR: #0000ff">="$(MakeCabPath)
/F $(MSBuildProjectName).ddf /D CabinetNameTemplate=$(MSBuildProjectName).wsp /D DiskDirectory1=wsp"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">Target</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">PropertyGroup</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">MakeWSPPath</span>
            <span style="COLOR: #0000ff">&gt;</span>"C:\CreateDDF\CreateDDF.exe"<span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">MakeWSPPath</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">MakeCabPath</span><span style="COLOR: #0000ff">&gt;</span>"C:\Windows\System32\makecab.exe"<span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">MakeCabPath</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">PropertyGroup</span><span style="COLOR: #0000ff">&gt;</span></pre>
        </div>
        <p>
 
</p>
        <p>
7) Save the file and reload the project (click yes if you see a popup message)<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreateDDFandWSPbybuildingyourVisualStudi_AA38/image_2.png" atomicselection="true"><img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="118" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreateDDFandWSPbybuildingyourVisualStudi_AA38/image_thumb_2.png" width="240" border="0" /></a></p>
        <p>
8) Build the project, and a directory named 'wsp' will be created along side the /bin
directory.  The wsp file will be in there.
</p>
        <p>
Enjoy...
</p>
        <p>
(Thanks to <a href="http://www.andrewconnell.com/blog/">Andrew Connell</a> for the
tweaking of the .csproj tip. Got that part from the <a href="http://www.telerik.com/documents/MOSS_whitepaper.pdf">Telerik
integration guide</a> he did)
</p>
        <p>
Update(9/23/07): I've created a <a href="http://blog.richfinn.net/blog/2007/09/19/VisualStudio2005TemplateWithInstallerForBuildingMOSSSolutionPackages.aspx">Visual
Studio 2005 project tempate for wsp development</a>. Check it out!
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=52640863-95ec-45a4-9309-123c93af3148" />
      </body>
      <title>Create DDF and WSP by building your Visual Studio project</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,52640863-95ec-45a4-9309-123c93af3148.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/08/29/CreateDDFAndWSPByBuildingYourVisualStudioProject.aspx</link>
      <pubDate>Wed, 29 Aug 2007 18:06:25 GMT</pubDate>
      <description>&lt;p&gt;
After wasting so much time by forgetting to add files to the ddf file (and just messing
with the ddf file in general) I said to myself, there HAS to be a better way to do
this DDF&amp;nbsp;into WSP thing! So this morning I created a little program in an hour
and a half that creates my ddf file and then packages everything up into a&amp;nbsp;wsp
for me. All I need to do is build my project.&amp;nbsp; I figured I'd share this tool,
so here it is...
&lt;/p&gt;
&lt;p&gt;
&lt;a href="https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=wspprojecttemplate&amp;amp;ReleaseId=8747"&gt;Visit
Codeplex site for source and executables&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
The most effective way to set up the Visual Studio environment for&amp;nbsp;wsp development
I've found is to set up your folder structure to mirror the Templates directory in
the 12 hive, so this tool assumes that's what you're doing, too.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreateDDFandWSPbybuildingyourVisualStudi_AA38/image_3.png" atomicselection="true"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=270 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreateDDFandWSPbybuildingyourVisualStudi_AA38/image_thumb_3.png" width=238 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
If you have your project set up this way, this tool will go through the Template directory
of your project and pull out all the files that are not either a .CS or a .SSC (source
safe file).&amp;nbsp; If you get the source of this tool, you can see how the file exclusions
are managed and add your own.
&lt;/p&gt;
&lt;p&gt;
The one downfall right now is that this tool won't create the manifest.xml file for
you.&amp;nbsp; I'd like to get to that eventually, but there was&amp;nbsp;just too much complexity
in the way the manifest file works to do the whole thing in under two hours.
&lt;/p&gt;
&lt;p&gt;
Install instructions:&lt;br&gt;
1) Either get the executable or build the project&lt;br&gt;
2) Put the CreateDDF.exe file&amp;nbsp;in c:/CreateDDF&lt;br&gt;
3) In your moss solution project&amp;nbsp;in Visual Studio, right click on the project
and choose 'Unload Project'&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreateDDFandWSPbybuildingyourVisualStudi_AA38/image.png" atomicselection="true"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=240 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreateDDFandWSPbybuildingyourVisualStudi_AA38/image_thumb.png" width=160 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
4) Once the project has been unloaded, right click it again, and choose 'Edit projectname.csproj'&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreateDDFandWSPbybuildingyourVisualStudi_AA38/image_1.png" atomicselection="true"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=121 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreateDDFandWSPbybuildingyourVisualStudi_AA38/image_thumb_1.png" width=240 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
5) Scroll all the way to the bottom of the .csproj file where you see the following
code
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #008000"&gt;&amp;lt;!--
To modify your build process, add your task inside one of the &lt;/span&gt; &lt;span style="COLOR: #008000"&gt; targets
below and uncomment it. &lt;/span&gt; &lt;span style="COLOR: #008000"&gt; Other similar extension
points exist, see Microsoft.Common.targets.&lt;/span&gt; &lt;span style="COLOR: #008000"&gt; &amp;lt;Target
Name="BeforeBuild"&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt; &amp;lt;/Target&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt; &amp;lt;Target
Name="AfterBuild"&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt; &amp;lt;/Target&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt; --&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;br&gt;
&lt;br&gt;
6) Change the above code&amp;nbsp;to:
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Target&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="BeforeBuild"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Exec&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Command&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="$(MakeWSPPath)
-n $(MSBuildProjectName)"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Target&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Target&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="AfterBuild"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Exec&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Command&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="$(MakeCabPath)
/F $(MSBuildProjectName).ddf /D CabinetNameTemplate=$(MSBuildProjectName).wsp /D DiskDirectory1=wsp"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Target&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;PropertyGroup&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;MakeWSPPath&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;"C:\CreateDDF\CreateDDF.exe"&lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;MakeWSPPath&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;MakeCabPath&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;"C:\Windows\System32\makecab.exe"&lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;MakeCabPath&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;PropertyGroup&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
7) Save the file and reload the project (click yes if you see a popup message)&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreateDDFandWSPbybuildingyourVisualStudi_AA38/image_2.png" atomicselection="true"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=118 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreateDDFandWSPbybuildingyourVisualStudi_AA38/image_thumb_2.png" width=240 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
8) Build the project, and a directory named 'wsp' will be created along side the /bin
directory.&amp;nbsp; The wsp file will be in there.
&lt;/p&gt;
&lt;p&gt;
Enjoy...
&lt;/p&gt;
&lt;p&gt;
(Thanks to &lt;a href="http://www.andrewconnell.com/blog/"&gt;Andrew Connell&lt;/a&gt; for the
tweaking of the .csproj tip. Got that part&amp;nbsp;from the &lt;a href="http://www.telerik.com/documents/MOSS_whitepaper.pdf"&gt;Telerik
integration guide&lt;/a&gt; he did)
&lt;/p&gt;
&lt;p&gt;
Update(9/23/07): I've created a &lt;a href="http://blog.richfinn.net/blog/2007/09/19/VisualStudio2005TemplateWithInstallerForBuildingMOSSSolutionPackages.aspx"&gt;Visual
Studio 2005 project tempate for wsp development&lt;/a&gt;. Check it out!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=52640863-95ec-45a4-9309-123c93af3148" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,52640863-95ec-45a4-9309-123c93af3148.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
      <category>WSP Development</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=efa1ea9a-037f-4978-b827-cb7dd3e0ad1c</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,efa1ea9a-037f-4978-b827-cb7dd3e0ad1c.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,efa1ea9a-037f-4978-b827-cb7dd3e0ad1c.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=efa1ea9a-037f-4978-b827-cb7dd3e0ad1c</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
So, <a href="http://www.sharepointblogs.com/mossman">The Mossman</a> commented on
my <a href="http://blog.richfinn.net/blog/2007/08/14/CustomCMOSSNavigationUsingPortalSiteMapProvider.aspx">post
yesterday</a> saying that a little source around the PSMP would be nice, so
just for him, here it is.  I figured it would be good to build on <a href="http://www.telerik.com/products/sharepoint/integration-guide.aspx">Andrew
Connell's Telerik MOSS Integration Guide</a>, so this example shows how to create
your own top-level menu in a custom server-control using the <a href="http://www.telerik.com/products/aspnet/controls/menu/overview.aspx">Telerik
RadMenu</a> and the <a href="http://msdn2.microsoft.com/en-us/library/ms582344.aspx">PortalSiteMapProvider</a>. 
I know not everybody will have the license for the Telerik RadMenu, so if you don't,
hopefully you'll be able to take this example and pull out of it what
you need.
</p>
        <p>
Also, I posted this post on top of the one yesterday, whoops. 
There's a good lesson on locally saving your postings. Sorry if it's shown up new
a couple of times for some of you. Wish I could figure out why...
</p>
        <p>
This solution shows how you could add custom attributes on each RadMenuItem from SPField
values in the PublishingPage along with a custom client-side script event
handler. 
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/downloads/RadMenu_PSMP_Source.txt" target="_blank">Download
the source for the complete control</a> in a text file, if you'd like it.
</p>
        <p>
The menu created will look like the following and will pop a JavaScript alert with
the relevant PublishingPage and SPWeb GUIDs when clicked:<br /><br />
 <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/SampleCodeforCustomCMOSSNavigationUsingP_8BCC/PSMP_Menu.jpg" atomicselection="true"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="117" alt="PSMP_Menu" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/SampleCodeforCustomCMOSSNavigationUsingP_8BCC/PSMP_Menu_thumb.jpg" width="366" border="0" /></a></p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 750px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <p>
              <span style="COLOR: #0000ff">protected</span>
              <span style="COLOR: #0000ff">override</span>
              <span style="COLOR: #0000ff">void</span> CreateChildControls()
{ <span style="COLOR: #008000">//Get the root publishingweb web for the site</span> PublishingWeb
rootWeb = PublishingWeb.GetPublishingWeb(SPContext.Current.Site.RootWeb); <span style="COLOR: #008000">//Get
the URL of the default page in the web</span><span style="COLOR: #0000ff">string</span> defaultPageUrl
= rootWeb.DefaultPage.ServerRelativeUrl; <span style="COLOR: #008000">//find the item
in the PSMP</span> PortalListItemSiteMapNode smnHome = (PortalListItemSiteMapNode)PortalSiteMapProvider.
</p>
            <p>
CurrentNavSiteMapProviderNoEncode.FindSiteMapNode(defaultPageUrl); <span style="COLOR: #008000">//initialize
the RadMenu</span> RadMenu menu = <span style="COLOR: #0000ff">new</span> RadMenu();
menu.ID = <span style="COLOR: #006080">"MainMenu"</span>; menu.RadControlsDir = <span style="COLOR: #006080">"/_wpresources/RadMenu.Net2/4.3.2.0__bbe59a8ad3533e68/RadControls"</span>;
menu.Skin = <span style="COLOR: #006080">"Outlook"</span>; <span style="COLOR: #008000">//Set
the client-side clicked event handler</span> menu.OnClientItemClicked = <span style="COLOR: #006080">"MainMenu_RadMenuItemClicked"</span>; <span style="COLOR: #008000">//create
the first menu item for the default (home) page</span> RadMenuItem rmiHome = createMenuItem(smnHome);
menu.Items.Add(rmiHome); <span style="COLOR: #008000">//iterate through each one of
the pages and subsites and create menu items for them</span><span style="COLOR: #0000ff">foreach</span> (SiteMapNode
smnTopLevelItem <span style="COLOR: #0000ff">in</span> smnHome.ParentNode.ChildNodes)
{ RadMenuItem rmiTopLevelItem = createMenuItem(smnTopLevelItem); <span style="COLOR: #008000">//if
the current sitemap has children, create a submenu for it</span><span style="COLOR: #0000ff">if</span> (smnTopLevelItem.HasChildNodes)
{ <span style="COLOR: #0000ff">foreach</span> (SiteMapNode smnChildItem <span style="COLOR: #0000ff">in</span> smnTopLevelItem.ChildNodes)
{ RadMenuItem rmiChildItem = createMenuItem(smnChildItem); rmiTopLevelItem.Items.Add(rmiChildItem);
} } menu.Items.Add(rmiTopLevelItem); } <span style="COLOR: #0000ff">this</span>.Controls.Add(menu); <span style="COLOR: #008000">//create
the client-side script for the RadMenuItemClicked event handler</span> StringBuilder
sbScript = <span style="COLOR: #0000ff">new</span> StringBuilder(); sbScript.Append(Environment.NewLine
+ <span style="COLOR: #006080">"&lt;script language=\"javascript\"&gt;"</span>); sbScript.Append(Environment.NewLine
+ <span style="COLOR: #006080">"function MainMenu_RadMenuItemClicked(sender, eventArgs)"</span>);
sbScript.Append(Environment.NewLine + <span style="COLOR: #006080">"{"</span>); sbScript.Append(Environment.NewLine
+ <span style="COLOR: #006080">"var pageGuid = eventArgs.Item.GetAttribute(\"PageGuid\");"</span>);
sbScript.Append(Environment.NewLine + <span style="COLOR: #006080">"var webGuid =
eventArgs.Item.GetAttribute(\"WebGuid\");"</span>); sbScript.Append(Environment.NewLine
+ <span style="COLOR: #006080">"alert(\"WebGuid:\" + webGuid + \" PageGuid:\" + pageGuid);"</span>);
sbScript.Append(Environment.NewLine + <span style="COLOR: #006080">"}"</span>); sbScript.Append(Environment.NewLine
+ <span style="COLOR: #006080">"&lt;/script&gt;"</span>); <span style="COLOR: #0000ff">this</span>.Page.ClientScript.RegisterStartupScript(<span style="COLOR: #0000ff">typeof</span>(<span style="COLOR: #0000ff">string</span>), <span style="COLOR: #006080">"RadMenu_MainMenu_RadMenuItemClicked"</span>,
sbScript.ToString()); } <span style="COLOR: #008000">/// &lt;summary&gt;</span><span style="COLOR: #008000">///
Create a RadMenuItem from a SiteMapNode</span><span style="COLOR: #008000">/// &lt;/summary&gt;</span><span style="COLOR: #008000">///
&lt;param name="siteMapNode"&gt;SiteMapNode used to create RadMenuItem &lt;/param&gt;</span><span style="COLOR: #008000">///
&lt;returns&gt;RadMenuItem&lt;/returns&gt;</span><span style="COLOR: #0000ff">private</span> RadMenuItem
createMenuItem(SiteMapNode siteMapNode) { RadMenuItem menuItem = <span style="COLOR: #0000ff">new</span> RadMenuItem();
menuItem.NavigateUrl = siteMapNode.Url; menuItem.Text = siteMapNode.Title; SPListItem
listItem = <span style="COLOR: #0000ff">null</span>; <span style="COLOR: #008000">//if
the SiteMapNode is the default page, it will be a PortalWebSiteMapNode</span><span style="COLOR: #0000ff">if</span> (siteMapNode <span style="COLOR: #0000ff">is</span> PortalWebSiteMapNode)
listItem = getListItemFromPortalSiteMapNode((PortalWebSiteMapNode)siteMapNode); <span style="COLOR: #0000ff">if</span> (siteMapNode <span style="COLOR: #0000ff">is</span> PortalListItemSiteMapNode)
listItem = getListItemFromPortalSiteMapNode((PortalListItemSiteMapNode)siteMapNode); <span style="COLOR: #008000">//create
the custom attributes on the list item</span><span style="COLOR: #0000ff">if</span> (listItem
!= <span style="COLOR: #0000ff">null</span>) { menuItem.Attributes.Add(<span style="COLOR: #006080">"PageGuid"</span>,
listItem.UniqueId.ToString(<span style="COLOR: #006080">"N"</span>)); menuItem.Attributes.Add(<span style="COLOR: #006080">"WebGuid"</span>,
listItem.Web.ID.ToString(<span style="COLOR: #006080">"N"</span>)); menuItem.ToolTip
= listItem.Fields[<span style="COLOR: #006080">"MenuItemToolTip"</span>].GetFieldValueAsText(listItem[<span style="COLOR: #006080">"MenuItemToolTip"</span>]);
} <span style="COLOR: #0000ff">else</span> { menuItem.Attributes.Add(<span style="COLOR: #006080">"PageGuid"</span>, <span style="COLOR: #0000ff">string</span>.Empty);
menuItem.Attributes.Add(<span style="COLOR: #006080">"WebGuid"</span>, <span style="COLOR: #0000ff">string</span>.Empty);
menuItem.ToolTip = siteMapNode.Title; } <span style="COLOR: #0000ff">return</span> menuItem;
} <span style="COLOR: #0000ff">private</span> SPListItem getListItemFromPortalSiteMapNode(PortalListItemSiteMapNode
siteMapNode) { SPWeb web = SPContext.Current.Site.AllWebs[siteMapNode.WebId]; PublishingWeb
pubWeb = PublishingWeb.GetPublishingWeb(web); SPListItem pageItem = pubWeb.PagesList.Items[siteMapNode.UniqueId]; <span style="COLOR: #0000ff">return</span> pageItem;
} <span style="COLOR: #0000ff">private</span> SPListItem getListItemFromPortalSiteMapNode(PortalWebSiteMapNode
siteMapNode) { SPWeb web = SPContext.Current.Site.AllWebs[siteMapNode.WebId]; PublishingWeb
pubWeb = PublishingWeb.GetPublishingWeb(web); SPListItem pageItem = <span style="COLOR: #0000ff">null</span>; <span style="COLOR: #0000ff">if</span>(pubWeb.DefaultPage
!= <span style="COLOR: #0000ff">null</span>) pageItem = pubWeb.PagesList.Items[pubWeb.DefaultPage.Item.UniqueId]; <span style="COLOR: #0000ff">return</span> pageItem;
}
</p>
          </pre>
        </div>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=efa1ea9a-037f-4978-b827-cb7dd3e0ad1c" />
      </body>
      <title>Sample Code for Custom C# MOSS Navigation Using PortalSiteMapProvider</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,efa1ea9a-037f-4978-b827-cb7dd3e0ad1c.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/08/15/SampleCodeForCustomCMOSSNavigationUsingPortalSiteMapProvider.aspx</link>
      <pubDate>Wed, 15 Aug 2007 12:24:05 GMT</pubDate>
      <description>&lt;p&gt;
So, &lt;a href="http://www.sharepointblogs.com/mossman"&gt;The Mossman&lt;/a&gt; commented on
my &lt;a href="http://blog.richfinn.net/blog/2007/08/14/CustomCMOSSNavigationUsingPortalSiteMapProvider.aspx"&gt;post
yesterday&lt;/a&gt; saying&amp;nbsp;that a little source around the PSMP would be nice,&amp;nbsp;so
just for him,&amp;nbsp;here it is.&amp;nbsp; I figured it would be good to build on &lt;a href="http://www.telerik.com/products/sharepoint/integration-guide.aspx"&gt;Andrew
Connell's Telerik MOSS Integration Guide&lt;/a&gt;, so this example&amp;nbsp;shows how to create
your own top-level menu in a custom server-control&amp;nbsp;using the &lt;a href="http://www.telerik.com/products/aspnet/controls/menu/overview.aspx"&gt;Telerik
RadMenu&lt;/a&gt; and the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms582344.aspx"&gt;PortalSiteMapProvider&lt;/a&gt;.&amp;nbsp;
I know not everybody will have the license for the Telerik RadMenu, so if you don't,
hopefully&amp;nbsp;you'll be able to&amp;nbsp;take this example and pull out&amp;nbsp;of it what
you need.
&lt;/p&gt;
&lt;p&gt;
Also, I&amp;nbsp;posted this post on top of the one&amp;nbsp;yesterday,&amp;nbsp;whoops.&amp;nbsp;
There's a good lesson on locally saving your postings. Sorry if it's shown up new
a couple of times for some of you. Wish I could figure out why...
&lt;/p&gt;
&lt;p&gt;
This solution shows how you could add custom attributes on each RadMenuItem from&amp;nbsp;SPField
values&amp;nbsp;in the PublishingPage&amp;nbsp;along with a custom client-side script event
handler. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/downloads/RadMenu_PSMP_Source.txt" target=_blank&gt;Download
the source for the complete control&lt;/a&gt; in a text file, if you'd like it.
&lt;/p&gt;
&lt;p&gt;
The menu created will look like the following and will pop a JavaScript alert with
the relevant PublishingPage and SPWeb GUIDs when clicked:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/SampleCodeforCustomCMOSSNavigationUsingP_8BCC/PSMP_Menu.jpg" atomicselection="true"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=117 alt=PSMP_Menu src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/SampleCodeforCustomCMOSSNavigationUsingP_8BCC/PSMP_Menu_thumb.jpg" width=366 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 750px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;
&lt;p&gt;
&lt;span style="COLOR: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; CreateChildControls()
{ &lt;span style="COLOR: #008000"&gt;//Get the root publishingweb web for the site&lt;/span&gt; PublishingWeb
rootWeb = PublishingWeb.GetPublishingWeb(SPContext.Current.Site.RootWeb); &lt;span style="COLOR: #008000"&gt;//Get
the URL of the default page in the web&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; defaultPageUrl
= rootWeb.DefaultPage.ServerRelativeUrl; &lt;span style="COLOR: #008000"&gt;//find the item
in the PSMP&lt;/span&gt; PortalListItemSiteMapNode smnHome = (PortalListItemSiteMapNode)PortalSiteMapProvider.
&lt;/p&gt;
&lt;p&gt;
CurrentNavSiteMapProviderNoEncode.FindSiteMapNode(defaultPageUrl); &lt;span style="COLOR: #008000"&gt;//initialize
the RadMenu&lt;/span&gt; RadMenu menu = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; RadMenu();
menu.ID = &lt;span style="COLOR: #006080"&gt;"MainMenu"&lt;/span&gt;; menu.RadControlsDir = &lt;span style="COLOR: #006080"&gt;"/_wpresources/RadMenu.Net2/4.3.2.0__bbe59a8ad3533e68/RadControls"&lt;/span&gt;;
menu.Skin = &lt;span style="COLOR: #006080"&gt;"Outlook"&lt;/span&gt;; &lt;span style="COLOR: #008000"&gt;//Set
the client-side clicked event handler&lt;/span&gt; menu.OnClientItemClicked = &lt;span style="COLOR: #006080"&gt;"MainMenu_RadMenuItemClicked"&lt;/span&gt;; &lt;span style="COLOR: #008000"&gt;//create
the first menu item for the default (home) page&lt;/span&gt; RadMenuItem rmiHome = createMenuItem(smnHome);
menu.Items.Add(rmiHome); &lt;span style="COLOR: #008000"&gt;//iterate through each one of
the pages and subsites and create menu items for them&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;foreach&lt;/span&gt; (SiteMapNode
smnTopLevelItem &lt;span style="COLOR: #0000ff"&gt;in&lt;/span&gt; smnHome.ParentNode.ChildNodes)
{ RadMenuItem rmiTopLevelItem = createMenuItem(smnTopLevelItem); &lt;span style="COLOR: #008000"&gt;//if
the current sitemap has children, create a submenu for it&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (smnTopLevelItem.HasChildNodes)
{ &lt;span style="COLOR: #0000ff"&gt;foreach&lt;/span&gt; (SiteMapNode smnChildItem &lt;span style="COLOR: #0000ff"&gt;in&lt;/span&gt; smnTopLevelItem.ChildNodes)
{ RadMenuItem rmiChildItem = createMenuItem(smnChildItem); rmiTopLevelItem.Items.Add(rmiChildItem);
} } menu.Items.Add(rmiTopLevelItem); } &lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;.Controls.Add(menu); &lt;span style="COLOR: #008000"&gt;//create
the client-side script for the RadMenuItemClicked event handler&lt;/span&gt; StringBuilder
sbScript = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; StringBuilder(); sbScript.Append(Environment.NewLine
+ &lt;span style="COLOR: #006080"&gt;"&amp;lt;script language=\"javascript\"&amp;gt;"&lt;/span&gt;); sbScript.Append(Environment.NewLine
+ &lt;span style="COLOR: #006080"&gt;"function MainMenu_RadMenuItemClicked(sender, eventArgs)"&lt;/span&gt;);
sbScript.Append(Environment.NewLine + &lt;span style="COLOR: #006080"&gt;"{"&lt;/span&gt;); sbScript.Append(Environment.NewLine
+ &lt;span style="COLOR: #006080"&gt;"var pageGuid = eventArgs.Item.GetAttribute(\"PageGuid\");"&lt;/span&gt;);
sbScript.Append(Environment.NewLine + &lt;span style="COLOR: #006080"&gt;"var webGuid =
eventArgs.Item.GetAttribute(\"WebGuid\");"&lt;/span&gt;); sbScript.Append(Environment.NewLine
+ &lt;span style="COLOR: #006080"&gt;"alert(\"WebGuid:\" + webGuid + \" PageGuid:\" + pageGuid);"&lt;/span&gt;);
sbScript.Append(Environment.NewLine + &lt;span style="COLOR: #006080"&gt;"}"&lt;/span&gt;); sbScript.Append(Environment.NewLine
+ &lt;span style="COLOR: #006080"&gt;"&amp;lt;/script&amp;gt;"&lt;/span&gt;); &lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;.Page.ClientScript.RegisterStartupScript(&lt;span style="COLOR: #0000ff"&gt;typeof&lt;/span&gt;(&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;), &lt;span style="COLOR: #006080"&gt;"RadMenu_MainMenu_RadMenuItemClicked"&lt;/span&gt;,
sbScript.ToString()); } &lt;span style="COLOR: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;///
Create a RadMenuItem from a SiteMapNode&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;///
&amp;lt;param name="siteMapNode"&amp;gt;SiteMapNode used to create RadMenuItem &amp;lt;/param&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;///
&amp;lt;returns&amp;gt;RadMenuItem&amp;lt;/returns&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;private&lt;/span&gt; RadMenuItem
createMenuItem(SiteMapNode siteMapNode) { RadMenuItem menuItem = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; RadMenuItem();
menuItem.NavigateUrl = siteMapNode.Url; menuItem.Text = siteMapNode.Title; SPListItem
listItem = &lt;span style="COLOR: #0000ff"&gt;null&lt;/span&gt;; &lt;span style="COLOR: #008000"&gt;//if
the SiteMapNode is the default page, it will be a PortalWebSiteMapNode&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (siteMapNode &lt;span style="COLOR: #0000ff"&gt;is&lt;/span&gt; PortalWebSiteMapNode)
listItem = getListItemFromPortalSiteMapNode((PortalWebSiteMapNode)siteMapNode); &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (siteMapNode &lt;span style="COLOR: #0000ff"&gt;is&lt;/span&gt; PortalListItemSiteMapNode)
listItem = getListItemFromPortalSiteMapNode((PortalListItemSiteMapNode)siteMapNode); &lt;span style="COLOR: #008000"&gt;//create
the custom attributes on the list item&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (listItem
!= &lt;span style="COLOR: #0000ff"&gt;null&lt;/span&gt;) { menuItem.Attributes.Add(&lt;span style="COLOR: #006080"&gt;"PageGuid"&lt;/span&gt;,
listItem.UniqueId.ToString(&lt;span style="COLOR: #006080"&gt;"N"&lt;/span&gt;)); menuItem.Attributes.Add(&lt;span style="COLOR: #006080"&gt;"WebGuid"&lt;/span&gt;,
listItem.Web.ID.ToString(&lt;span style="COLOR: #006080"&gt;"N"&lt;/span&gt;)); menuItem.ToolTip
= listItem.Fields[&lt;span style="COLOR: #006080"&gt;"MenuItemToolTip"&lt;/span&gt;].GetFieldValueAsText(listItem[&lt;span style="COLOR: #006080"&gt;"MenuItemToolTip"&lt;/span&gt;]);
} &lt;span style="COLOR: #0000ff"&gt;else&lt;/span&gt; { menuItem.Attributes.Add(&lt;span style="COLOR: #006080"&gt;"PageGuid"&lt;/span&gt;, &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;.Empty);
menuItem.Attributes.Add(&lt;span style="COLOR: #006080"&gt;"WebGuid"&lt;/span&gt;, &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;.Empty);
menuItem.ToolTip = siteMapNode.Title; } &lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt; menuItem;
} &lt;span style="COLOR: #0000ff"&gt;private&lt;/span&gt; SPListItem getListItemFromPortalSiteMapNode(PortalListItemSiteMapNode
siteMapNode) { SPWeb web = SPContext.Current.Site.AllWebs[siteMapNode.WebId]; PublishingWeb
pubWeb = PublishingWeb.GetPublishingWeb(web); SPListItem pageItem = pubWeb.PagesList.Items[siteMapNode.UniqueId]; &lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt; pageItem;
} &lt;span style="COLOR: #0000ff"&gt;private&lt;/span&gt; SPListItem getListItemFromPortalSiteMapNode(PortalWebSiteMapNode
siteMapNode) { SPWeb web = SPContext.Current.Site.AllWebs[siteMapNode.WebId]; PublishingWeb
pubWeb = PublishingWeb.GetPublishingWeb(web); SPListItem pageItem = &lt;span style="COLOR: #0000ff"&gt;null&lt;/span&gt;; &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt;(pubWeb.DefaultPage
!= &lt;span style="COLOR: #0000ff"&gt;null&lt;/span&gt;) pageItem = pubWeb.PagesList.Items[pubWeb.DefaultPage.Item.UniqueId]; &lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt; pageItem;
}
&lt;/p&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=efa1ea9a-037f-4978-b827-cb7dd3e0ad1c" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,efa1ea9a-037f-4978-b827-cb7dd3e0ad1c.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
      <category>Navigation</category>
      <category>Telerik</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=f969269a-751e-47b9-bb6e-6bb95cc19908</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,f969269a-751e-47b9-bb6e-6bb95cc19908.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,f969269a-751e-47b9-bb6e-6bb95cc19908.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=f969269a-751e-47b9-bb6e-6bb95cc19908</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I was talking to a client who was having difficulty developing a navigation control
using the methods described in most of the documentation out there, which explains
creating a custom Site Map Provider which inherits from the <a href="http://msdn2.microsoft.com/en-us/library/ms582344.aspx">PortalSiteMapProvider</a> (PSMP)object. 
There was just no way they were going to get exactly what they were looking for in
relation to what their high-priced 3rd-party designer delivered. 
</p>
        <p>
 
</p>
        <p>
After taking some time to do some exploration, and being a big proponent of web server
controls in the MOSS context, I knew this was the way they needed to go.  I found
a great post by Chris Richard on the MS ECM Team Blog that explained <a href="http://blogs.msdn.com/ecm/archive/2007/05/23/increased-performance-for-moss-apps-using-the-portalsitemapprovider.aspx">how
the PortalSiteMapProvider deals with performance issues</a> found often in costly
navigation rendering routines.  This post also explained how to use the PSMP
object in custom code - something that caught my eye. 
</p>
        <p>
There are a few instances of the PSMP that are defined in the MOSS web.config that
can be accessed through the PSM object:<br /><a href="http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.publishing.navigation.portalsitemapprovider.combinednavsitemapprovider.aspx">PortalSiteMapProvider.CombinedNavSiteMapProvider</a>:
attached to the global or top nav menus<br /><a href="http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.publishing.navigation.portalsitemapprovider.currentnavsitemapprovider.aspx">PortalSiteMapProvider.CurrentNavSiteMapProvider</a>:
attached to the current, or "Quick Launch" nav menu<br /><a href="http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.publishing.navigation.portalsitemapprovider.currentnavsitemapprovidernoencode.aspx">PortalSiteMapProvider.CurrentNavSiteMapProviderNoEncode</a>:
attached to the breadcrumb nav<br /><a href="http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.publishing.navigation.portalsitemapprovider.globalnavsitemapprovider.aspx">PortalSiteMapProvider.GlobalNavSiteMapProvider</a>:
Get the map for the global nav<br /><a href="http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.publishing.navigation.portalsitemapprovider.websitemapprovider.aspx">PortalSiteMapProvider.WebSiteMapProvider</a>:
enumerates Web sites (SPWebs) in the site collection 
</p>
        <p>
Essentially, all of these object are set with the current SPContext, so they are already
security-trimmed and ready to use as-is for the user currently browsing the site. 
The special one for me here is the CurrentNavSiteMapProviderNoEncode, which includes
the pages, not just the webs. There is a limitation which Chris mentions in that this
provider doesn't return the default page in a web, rather just a reference to the
web itself, but that's ok - he explains a workaround to this if you're interested... 
</p>
        <p>
Essentially, my client's problem is that they have a left-side tree navigation, kind
of.  There's some interesting display logic that, like I said earlier, just doesn't
work with the out-of-box implementation. Without going into what they really
needed to accomplish, I figure it would be good to explain how to use the object to
answer some of the common questions in a custom navigation scenario. 
</p>
        <p>
1) Where Am I Now?<br />
2) Where's That Page? 
</p>
        <p>
        </p>
        <p>
Luckily, the CurrentNavSiteMapProviderNoEncode has a method that makes finding stuff
pretty easy.  <i>FindSiteMapNode()</i>. This method has three overloads,
all which return a <a href="http://msdn2.microsoft.com/en-us/library/system.web.sitemapnode.aspx">SiteMapNode</a> object. 
</p>
        <p>
The first overload takes an HttpContext as a parameter and is great for finding
where you're at now.  The second overload takes a URL and can be used for
finding any SiteMapNode given the URL provided.  The third takes both a
URL and an SPWeb object as context. 
</p>
        <p>
Here's some examples on how you use this along with the Publishing object model: 
</p>
        <p>
        </p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #008000">//In
a server control, find the SiteMapNode for the current HttpContext </span> SiteMapNode
siteNode = PortalSiteMapProvider.CurrentNavSiteMapProviderNoEncode.FindSiteMapNode(Context); <span style="COLOR: #008000">///
&lt;summary&gt; </span><span style="COLOR: #008000">/// Find SiteMapNode for PublishingWeb
object </span><span style="COLOR: #008000">/// &lt;/summary&gt; </span><span style="COLOR: #008000">///
&lt;param name="web"&gt;PublishingWeb object to retrieve in PortalSiteMapProvider&lt;/param&gt; </span><span style="COLOR: #008000">///
&lt;returns&gt;SiteMapNode object representing given PublishingWeb object&lt;/returns&gt; </span><span style="COLOR: #0000ff">protected</span> SiteMapNode
GetSiteNodeForPubWeb(PublishingWeb web) { <span style="COLOR: #0000ff">string</span> url
= web.Url + <span style="COLOR: #006080">"/"</span> + web.DefaultPage.Url; SiteMapNode
siteNode = PortalSiteMapProvider.CurrentNavSiteMapProviderNoEncode.FindSiteMapNode(url); <span style="COLOR: #0000ff">return</span> siteNode;
} </pre>
        </div>
        <p>
 
</p>
        <p>
The <a href="http://msdn2.microsoft.com/en-us/library/system.web.sitemapnode.aspx">SiteMapNode</a> object
contains everything needed to walk around in the hierarchy of the PSMP, and should
allow you conquer any custom display logic any tricky designer can throw at you...
</p>
        <p>
Update: I added a follow-up post to this one with some <a class="TitleLinkStyle" href="http://blog.richfinn.net/blog/2007/08/15/SampleCodeForCustomCMOSSNavigationUsingPortalSiteMapProvider.aspx" rel="bookmark">Sample
Code for a Custom C# MOSS Navigation Using PortalSiteMapProvider</a></p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=f969269a-751e-47b9-bb6e-6bb95cc19908" />
      </body>
      <title>Custom C# MOSS Navigation Using PortalSiteMapProvider</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,f969269a-751e-47b9-bb6e-6bb95cc19908.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/08/14/CustomCMOSSNavigationUsingPortalSiteMapProvider.aspx</link>
      <pubDate>Tue, 14 Aug 2007 19:47:48 GMT</pubDate>
      <description>&lt;p&gt;
I was talking to a client who was having difficulty developing a navigation control
using the methods described in most of the documentation out there, which explains
creating a custom Site Map Provider which inherits from the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms582344.aspx"&gt;PortalSiteMapProvider&lt;/a&gt; (PSMP)object.&amp;nbsp;
There was just no way they were going to get exactly what they were looking for in
relation to what their high-priced&amp;nbsp;3rd-party designer delivered. 
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
After taking some time to do some exploration, and being a big proponent of web server
controls in the MOSS context, I knew this was the way they needed to go.&amp;nbsp; I found
a great post by Chris Richard on the MS ECM Team Blog that explained &lt;a href="http://blogs.msdn.com/ecm/archive/2007/05/23/increased-performance-for-moss-apps-using-the-portalsitemapprovider.aspx"&gt;how
the PortalSiteMapProvider deals with performance issues&lt;/a&gt; found often in costly
navigation rendering routines.&amp;nbsp; This post also explained how to use the PSMP
object in custom code - something that caught my eye. 
&lt;/p&gt;
&lt;p&gt;
There are a few instances of the PSMP that are defined in the MOSS web.config that
can be accessed through the PSM object:&lt;br&gt;
&lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.publishing.navigation.portalsitemapprovider.combinednavsitemapprovider.aspx"&gt;PortalSiteMapProvider.CombinedNavSiteMapProvider&lt;/a&gt;:
attached to the global or top nav menus&lt;br&gt;
&lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.publishing.navigation.portalsitemapprovider.currentnavsitemapprovider.aspx"&gt;PortalSiteMapProvider.CurrentNavSiteMapProvider&lt;/a&gt;:
attached to the current, or "Quick Launch" nav menu&lt;br&gt;
&lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.publishing.navigation.portalsitemapprovider.currentnavsitemapprovidernoencode.aspx"&gt;PortalSiteMapProvider.CurrentNavSiteMapProviderNoEncode&lt;/a&gt;:
attached to the breadcrumb nav&lt;br&gt;
&lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.publishing.navigation.portalsitemapprovider.globalnavsitemapprovider.aspx"&gt;PortalSiteMapProvider.GlobalNavSiteMapProvider&lt;/a&gt;:
Get the map for the global nav&lt;br&gt;
&lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.publishing.navigation.portalsitemapprovider.websitemapprovider.aspx"&gt;PortalSiteMapProvider.WebSiteMapProvider&lt;/a&gt;:
enumerates Web sites (SPWebs) in the site collection 
&lt;/p&gt;
&lt;p&gt;
Essentially, all of these object are set with the current SPContext, so they are already
security-trimmed and ready to use as-is for the user currently browsing the site.&amp;nbsp;
The special one for me here is the CurrentNavSiteMapProviderNoEncode, which includes
the pages, not just the webs. There is a limitation which Chris mentions in that this
provider doesn't return the default page in a web, rather just a reference to the
web itself, but that's ok - he explains a workaround to this if you're interested... 
&lt;/p&gt;
&lt;p&gt;
Essentially, my client's problem is that they have a left-side tree navigation, kind
of.&amp;nbsp; There's some interesting display logic that, like I said earlier, just doesn't
work with the out-of-box implementation.&amp;nbsp;Without going into what they really
needed to accomplish, I figure it would be good to explain how to use the object to
answer some of the common questions in a custom navigation scenario. 
&lt;/p&gt;
&lt;p&gt;
1) Where Am I Now?&lt;br&gt;
2) Where's That Page? 
&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;
Luckily, the CurrentNavSiteMapProviderNoEncode has a method that makes finding stuff
pretty easy.&amp;nbsp; &lt;i&gt;FindSiteMapNode()&lt;/i&gt;. This method&amp;nbsp;has three overloads,
all which return a &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.sitemapnode.aspx"&gt;SiteMapNode&lt;/a&gt; object. 
&lt;p&gt;
The first overload&amp;nbsp;takes an HttpContext as a parameter and is great for finding
where you're at now.&amp;nbsp; The second overload&amp;nbsp;takes a URL and can be used for
finding any SiteMapNode given the URL provided.&amp;nbsp; The third&amp;nbsp;takes both a
URL and an SPWeb object as context. 
&lt;p&gt;
Here's some examples on how you use this along with the Publishing object model: 
&lt;p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #008000"&gt;//In
a server control, find the SiteMapNode for the current HttpContext &lt;/span&gt; SiteMapNode
siteNode = PortalSiteMapProvider.CurrentNavSiteMapProviderNoEncode.FindSiteMapNode(Context); &lt;span style="COLOR: #008000"&gt;///
&amp;lt;summary&amp;gt; &lt;/span&gt; &lt;span style="COLOR: #008000"&gt;/// Find SiteMapNode for PublishingWeb
object &lt;/span&gt; &lt;span style="COLOR: #008000"&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt; &lt;span style="COLOR: #008000"&gt;///
&amp;lt;param name="web"&amp;gt;PublishingWeb object to retrieve in PortalSiteMapProvider&amp;lt;/param&amp;gt; &lt;/span&gt; &lt;span style="COLOR: #008000"&gt;///
&amp;lt;returns&amp;gt;SiteMapNode object representing given PublishingWeb object&amp;lt;/returns&amp;gt; &lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;protected&lt;/span&gt; SiteMapNode
GetSiteNodeForPubWeb(PublishingWeb web) { &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; url
= web.Url + &lt;span style="COLOR: #006080"&gt;"/"&lt;/span&gt; + web.DefaultPage.Url; SiteMapNode
siteNode = PortalSiteMapProvider.CurrentNavSiteMapProviderNoEncode.FindSiteMapNode(url); &lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt; siteNode;
} &lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
The &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.sitemapnode.aspx"&gt;SiteMapNode&lt;/a&gt; object
contains everything needed to walk around in the hierarchy of the PSMP, and should
allow you conquer any custom display logic any tricky designer can throw at you...
&lt;/p&gt;
&lt;p&gt;
Update: I added a follow-up post to this one with some &lt;a class=TitleLinkStyle href="http://blog.richfinn.net/blog/2007/08/15/SampleCodeForCustomCMOSSNavigationUsingPortalSiteMapProvider.aspx" rel=bookmark&gt;Sample
Code for a Custom C# MOSS Navigation Using PortalSiteMapProvider&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=f969269a-751e-47b9-bb6e-6bb95cc19908" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,f969269a-751e-47b9-bb6e-6bb95cc19908.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
      <category>Navigation</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=3b813e47-22c0-4923-ba4c-5a6561fe592a</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,3b813e47-22c0-4923-ba4c-5a6561fe592a.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,3b813e47-22c0-4923-ba4c-5a6561fe592a.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=3b813e47-22c0-4923-ba4c-5a6561fe592a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Recently, <a href="http://www.andrewconnell.com/index.aspx">Andrew Connell</a> published
a <a href="http://www.telerik.com/products/sharepoint/integration-guide.aspx">white
paper on the Telerik site</a> explaining <a href="http://www.telerik.com/documents/MOSS_whitepaper.pdf">how
to create WSP files for the Telerik ASP.Net controls</a>.  In the document, AC
used the RadMenu control as his example, but I noticed that there was a couple
of entries in the SafeControls block of the manifest.xml file that were specific to
the RadMenu control.  This made wonder if there were other controls that needed
control-specific SafeControls entries, so I decided to take a look.
</p>
        <p>
Most of the controls have a couple of different namespaces referenced, and the RadCalendar
takes things a step further and references the RadInput control, which means that the
RadInput.Net2.dll assembly needs to be packaged with it.
</p>
        <p>
Andrew's document is awesome, but I wanted to post this as a supplement to answer
potential questions around the manifest.xml file if you want to deploy any of the
other RadControls into your MOSS farm.
</p>
        <p>
Assuming that you already have the Telerik Editor for MOSS, I'm ignoring the entries
needed for the RadSpell and the RadEditor controls, as they are shipped with it...
</p>
        <p>
          <strong>RadAjax</strong>
        </p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">Assembly</span>
            <span style="COLOR: #ff0000">DeploymentTarget</span>
            <span style="COLOR: #0000ff">="GlobalAssemblyCache"</span>
            <span style="COLOR: #ff0000">Location</span>
            <span style="COLOR: #0000ff">="RadAjax.Net2.dll"</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">SafeControls</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">         &lt;</span>
            <span style="COLOR: #800000">SafeControl</span>
            <span style="COLOR: #ff0000">Namespace</span>
            <span style="COLOR: #0000ff">="Telerik.RadAjaxPanelDesign"</span>
            <span style="COLOR: #ff0000">TypeName</span>
            <span style="COLOR: #0000ff">="*"</span>
            <span style="COLOR: #ff0000">Safe</span>
            <span style="COLOR: #0000ff">="True"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <br />
            <span style="COLOR: #0000ff">         &lt;</span>
            <span style="COLOR: #800000">SafeControl</span>
            <span style="COLOR: #ff0000">Namespace</span>
            <span style="COLOR: #0000ff">="Telerik.WebControls"</span>
            <span style="COLOR: #ff0000">TypeName</span>
            <span style="COLOR: #0000ff">="*"</span>
            <span style="COLOR: #ff0000">Safe</span>
            <span style="COLOR: #0000ff">="True"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">SafeControls</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">ClassResources</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #008000">&lt;!--
Class Resources Go Here --&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">ClassResources</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">Assembly</span>
            <span style="COLOR: #0000ff">&gt;</span>
          </pre>
        </div>
        <p>
          <br />
          <br />
          <br />
          <strong>RadCalendar</strong>
        </p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">Assemblies</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">Assembly</span>
            <span style="COLOR: #ff0000">DeploymentTarget</span>
            <span style="COLOR: #0000ff">="GlobalAssemblyCache"</span>
            <span style="COLOR: #ff0000">Location</span>
            <span style="COLOR: #0000ff">="RadInput.Net2.dll"</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">SafeControls</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">SafeControl</span>
            <span style="COLOR: #ff0000">Namespace</span>
            <span style="COLOR: #0000ff">="Telerik.RadInputUtils"</span>
            <span style="COLOR: #ff0000">TypeName</span>
            <span style="COLOR: #0000ff">="*"</span>
            <span style="COLOR: #ff0000">Safe</span>
            <span style="COLOR: #0000ff">="True"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">SafeControl</span>
            <span style="COLOR: #ff0000">Namespace</span>
            <span style="COLOR: #0000ff">="Telerik.WebControls"</span>
            <span style="COLOR: #ff0000">TypeName</span>
            <span style="COLOR: #0000ff">="*"</span>
            <span style="COLOR: #ff0000">Safe</span>
            <span style="COLOR: #0000ff">="True"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">SafeControls</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">Assembly</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">Assembly</span>
            <span style="COLOR: #ff0000">DeploymentTarget</span>
            <span style="COLOR: #0000ff">="GlobalAssemblyCache"</span>
            <span style="COLOR: #ff0000">Location</span>
            <span style="COLOR: #0000ff">="RadCalendar.Net2.dll"</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">SafeControls</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">SafeControl</span>
            <span style="COLOR: #ff0000">Namespace</span>
            <span style="COLOR: #0000ff">="Telerik.RadCalendarUtils" </span>
            <span style="COLOR: #ff0000">TypeName</span>
            <span style="COLOR: #0000ff">="*"</span>
            <span style="COLOR: #ff0000">Safe</span>
            <span style="COLOR: #0000ff">="True"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">SafeControl</span>
            <span style="COLOR: #ff0000">Namespace</span>
            <span style="COLOR: #0000ff">="Telerik.WebControls"</span>
            <span style="COLOR: #ff0000">TypeName</span>
            <span style="COLOR: #0000ff">="*"</span>
            <span style="COLOR: #ff0000">Safe</span>
            <span style="COLOR: #0000ff">="True"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">SafeControls</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">ClassResources</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #008000">&lt;!--
Class Resources Go Here --&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">ClassResources</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">Assembly</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">Assemblies</span>
            <span style="COLOR: #0000ff">&gt;</span>
          </pre>
        </div>
        <p>
 
</p>
        <p>
To conserve space here, I've made an <a href="http://blog.richfinn.net/blog/downloads/TelerikWSPManifestEntries.xml">xml
file with all the manifest entries available for download</a>.
</p>
        <p>
          <strong>*.csproj file replacement<br /></strong>Make sure the path to your MakeCab.exe file is correct, but to create the
WSP on-build of the project, replace the following text in the csproj file
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">Import</span>
            <span style="COLOR: #ff0000">Project</span>
            <span style="COLOR: #0000ff">="$(MSBuildBinPath)\Microsoft.CSharp.targets"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #008000">&lt;!--
To modify your build process, add your task inside one of the targets below and uncomment
it. </span>
            <span style="COLOR: #008000"> Other similar extension points exist, see
Microsoft.Common.targets.</span>
            <span style="COLOR: #008000"> &lt;Target Name="BeforeBuild"&gt;</span>
            <span style="COLOR: #008000"> &lt;/Target&gt;</span>
            <span style="COLOR: #008000"> &lt;Target
Name="AfterBuild"&gt;</span>
            <span style="COLOR: #008000"> &lt;/Target&gt;</span>
            <span style="COLOR: #008000"> --&gt;</span>
          </pre>
        </div>
        <p>
          <br />
with
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">PropertyGroup</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">MakeCabPath</span>
            <span style="COLOR: #0000ff">&gt;</span>"C:\Windows\System32\makecab.exe"<span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">MakeCabPath</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">PropertyGroup</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">Target</span><span style="COLOR: #ff0000">Name</span><span style="COLOR: #0000ff">="Build"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">Exec</span><span style="COLOR: #ff0000">Command</span><span style="COLOR: #0000ff">="$(MakeCabPath)
/F TelerikSkins.ddf /D CabinetNameTemplate=$(MSBuildProjectName).wsp /D DiskDirectory1=wsp"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">Target</span><span style="COLOR: #0000ff">&gt;</span></pre>
        </div>
        <p>
 
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/downloads/TelerikWSPManifestEntries.xml">Download
all Telerik manifest entries</a>
        </p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=3b813e47-22c0-4923-ba4c-5a6561fe592a" />
      </body>
      <title>Manifest.xml Entries Needed for Deploying Telerik ASP.Net Controls into MOSS</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,3b813e47-22c0-4923-ba4c-5a6561fe592a.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/08/13/ManifestxmlEntriesNeededForDeployingTelerikASPNetControlsIntoMOSS.aspx</link>
      <pubDate>Mon, 13 Aug 2007 16:50:26 GMT</pubDate>
      <description>&lt;p&gt;
Recently, &lt;a href="http://www.andrewconnell.com/index.aspx"&gt;Andrew Connell&lt;/a&gt; published
a &lt;a href="http://www.telerik.com/products/sharepoint/integration-guide.aspx"&gt;white
paper on the Telerik site&lt;/a&gt; explaining &lt;a href="http://www.telerik.com/documents/MOSS_whitepaper.pdf"&gt;how
to create WSP files for the Telerik ASP.Net controls&lt;/a&gt;.&amp;nbsp; In the document, AC
used the RadMenu control&amp;nbsp;as his example, but I noticed that there was a couple
of entries in the SafeControls block of the manifest.xml file that were specific to
the RadMenu control.&amp;nbsp; This made wonder if there were other controls that needed
control-specific SafeControls entries, so I decided to take a look.
&lt;/p&gt;
&lt;p&gt;
Most of the controls have a couple of different namespaces referenced, and the RadCalendar
takes things a step further and references the RadInput control, which means that&amp;nbsp;the
RadInput.Net2.dll&amp;nbsp;assembly needs to be packaged with it.
&lt;/p&gt;
&lt;p&gt;
Andrew's document is awesome, but I wanted to post this as a supplement to answer
potential questions around the manifest.xml file if you want to deploy any of the
other RadControls into your MOSS farm.
&lt;/p&gt;
&lt;p&gt;
Assuming that you already have the Telerik Editor for MOSS, I'm ignoring the entries
needed for the RadSpell and the RadEditor controls, as they are shipped with it...
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;RadAjax&lt;/strong&gt;
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assembly&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;DeploymentTarget&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="GlobalAssemblyCache"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="RadAjax.Net2.dll"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControls&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControl&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Namespace&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Telerik.RadAjaxPanelDesign"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;TypeName&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="*"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Safe&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="True"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;br&gt;
&lt;span style="COLOR: #0000ff"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControl&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Namespace&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Telerik.WebControls"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;TypeName&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="*"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Safe&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="True"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControls&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;ClassResources&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!--
Class Resources Go Here --&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;ClassResources&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assembly&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;RadCalendar&lt;/strong&gt;
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assemblies&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assembly&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;DeploymentTarget&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="GlobalAssemblyCache"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="RadInput.Net2.dll"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControls&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControl&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Namespace&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Telerik.RadInputUtils"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;TypeName&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="*"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Safe&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="True"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControl&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Namespace&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Telerik.WebControls"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;TypeName&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="*"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Safe&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="True"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControls&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assembly&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assembly&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;DeploymentTarget&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="GlobalAssemblyCache"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="RadCalendar.Net2.dll"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControls&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControl&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Namespace&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Telerik.RadCalendarUtils" &lt;/span&gt;&lt;span style="COLOR: #ff0000"&gt;TypeName&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="*"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Safe&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="True"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControl&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Namespace&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Telerik.WebControls"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;TypeName&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="*"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Safe&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="True"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControls&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;ClassResources&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!--
Class Resources Go Here --&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;ClassResources&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assembly&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assemblies&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
To conserve space here, I've made an &lt;a href="http://blog.richfinn.net/blog/downloads/TelerikWSPManifestEntries.xml"&gt;xml
file with all the manifest entries available for download&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;*.csproj file replacement&lt;br&gt;
&lt;/strong&gt;Make sure the path to your MakeCab.exe file is correct, but to create the
WSP on-build of the project, replace the following text in the csproj file
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Import&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Project&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="$(MSBuildBinPath)\Microsoft.CSharp.targets"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!--
To modify your build process, add your task inside one of the targets below and uncomment
it. &lt;/span&gt; &lt;span style="COLOR: #008000"&gt; Other similar extension points exist, see
Microsoft.Common.targets.&lt;/span&gt; &lt;span style="COLOR: #008000"&gt; &amp;lt;Target Name="BeforeBuild"&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt; &amp;lt;/Target&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt; &amp;lt;Target
Name="AfterBuild"&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt; &amp;lt;/Target&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt; --&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;br&gt;
with
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;PropertyGroup&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;MakeCabPath&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;"C:\Windows\System32\makecab.exe"&lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;MakeCabPath&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;PropertyGroup&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Target&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Build"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Exec&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Command&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="$(MakeCabPath)
/F TelerikSkins.ddf /D CabinetNameTemplate=$(MSBuildProjectName).wsp /D DiskDirectory1=wsp"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Target&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/downloads/TelerikWSPManifestEntries.xml"&gt;Download
all Telerik manifest entries&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=3b813e47-22c0-4923-ba4c-5a6561fe592a" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,3b813e47-22c0-4923-ba4c-5a6561fe592a.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
      <category>WSP Development</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=8dc43f30-9c38-4b35-a7f5-9a94587c3799</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,8dc43f30-9c38-4b35-a7f5-9a94587c3799.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,8dc43f30-9c38-4b35-a7f5-9a94587c3799.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=8dc43f30-9c38-4b35-a7f5-9a94587c3799</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The documentation in the online help for the <a href="http://www.telerik.com/products/sharepoint/radeditor.aspx">Telerik
MOSS Editor</a> doesn't explain how to enable the spell checker, which you'll want
to do since the MOSS spell check will check the HTML embedded in the editor resulting
in unwanted results.
</p>
        <p>
There are two version of the spell checker, an inline AJAX version, and a dialog-box
based version.
</p>
        <p>
The AJAX version is inline with the text, and is similar to the feel of GMail's spell
checker.<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableSpellCheckintheFullFeaturedTelerik_9EA3/image.png" atomicselection="true"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="125" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableSpellCheckintheFullFeaturedTelerik_9EA3/image_thumb.png" width="240" border="0" /></a> 
</p>
        <p>
The dialog-box based spell checker is more like Word's.<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableSpellCheckintheFullFeaturedTelerik_9EA3/image_1.png" atomicselection="true"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="143" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableSpellCheckintheFullFeaturedTelerik_9EA3/image_thumb_1.png" width="240" border="0" /></a></p>
        <p>
To enable the Telerik editor's spell checker, enter one of the following lines
into the ToolsFile.xml file located at %PROGRAMFILES%\Microsoft Shared\web server
extensions\wpresources\RadEditorSharePoint\4.1.0.0__1f131a624888eeed\RadControls\Editor:
</p>
        <p>
&lt;tool name="SpellCheck"/&gt; for the dialog-box based spell checker<br />
&lt;tool name="AjaxSpellCheck"/&gt; for the Ajax spell checker
</p>
        <p>
This is the same as for the standard Telerik RadEditor for ASP.Net, whose documentation
can be found here: <a title="http://www.telerik.com/help/aspnet/editor/CustomizingRadSpell.html" href="http://www.telerik.com/help/aspnet/editor/CustomizingRadSpell.html">http://www.telerik.com/help/aspnet/editor/CustomizingRadSpell.html</a></p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=8dc43f30-9c38-4b35-a7f5-9a94587c3799" />
      </body>
      <title>Enable Spell Check in the Full Featured Telerik MOSS Editor</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,8dc43f30-9c38-4b35-a7f5-9a94587c3799.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/08/08/EnableSpellCheckInTheFullFeaturedTelerikMOSSEditor.aspx</link>
      <pubDate>Wed, 08 Aug 2007 17:16:52 GMT</pubDate>
      <description>&lt;p&gt;
The documentation in the online help for the &lt;a href="http://www.telerik.com/products/sharepoint/radeditor.aspx"&gt;Telerik
MOSS Editor&lt;/a&gt; doesn't explain how to enable the spell checker, which you'll want
to do since the MOSS spell check will check the HTML embedded in the editor resulting
in unwanted results.
&lt;/p&gt;
&lt;p&gt;
There are two version of the spell checker, an inline AJAX version, and a dialog-box
based version.
&lt;/p&gt;
&lt;p&gt;
The AJAX version is inline with the text, and is similar to the feel of GMail's spell
checker.&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableSpellCheckintheFullFeaturedTelerik_9EA3/image.png" atomicselection="true"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="125" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableSpellCheckintheFullFeaturedTelerik_9EA3/image_thumb.png" width="240" border="0"&gt;&lt;/a&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
The dialog-box based spell checker is more like Word's.&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableSpellCheckintheFullFeaturedTelerik_9EA3/image_1.png" atomicselection="true"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="143" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/EnableSpellCheckintheFullFeaturedTelerik_9EA3/image_thumb_1.png" width="240" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
To enable the Telerik editor's&amp;nbsp;spell checker, enter one of the following lines
into the ToolsFile.xml file located at %PROGRAMFILES%\Microsoft Shared\web server
extensions\wpresources\RadEditorSharePoint\4.1.0.0__1f131a624888eeed\RadControls\Editor:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;tool name="SpellCheck"/&amp;gt; for the dialog-box based spell checker&lt;br&gt;
&amp;lt;tool name="AjaxSpellCheck"/&amp;gt; for the Ajax spell checker
&lt;/p&gt;
&lt;p&gt;
This is the same as for the standard Telerik RadEditor for ASP.Net, whose documentation
can be found here: &lt;a title="http://www.telerik.com/help/aspnet/editor/CustomizingRadSpell.html" href="http://www.telerik.com/help/aspnet/editor/CustomizingRadSpell.html"&gt;http://www.telerik.com/help/aspnet/editor/CustomizingRadSpell.html&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=8dc43f30-9c38-4b35-a7f5-9a94587c3799" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,8dc43f30-9c38-4b35-a7f5-9a94587c3799.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=17486ae8-e7e7-4997-8c0b-1911d17d8d57</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,17486ae8-e7e7-4997-8c0b-1911d17d8d57.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,17486ae8-e7e7-4997-8c0b-1911d17d8d57.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=17486ae8-e7e7-4997-8c0b-1911d17d8d57</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
After working in my local development environment for a few days, I was ready to deploy
a Solution Package containing some publishing layout pages into our testing environment.<br /><br />
Once the solution deployment was complete, I tested one of the four page layouts by
creating a new publishing page.  Immediately, the page rendered with the error
'Only Content controls are allowed directly in a content page that contains Content
controls.'  
<br /><br />
I thought, weird, it works on my machine, so I went and checked out the Pages
list in the Web.  The page had been created correctly, and I could view the properties,
so what's the deal?
</p>
        <p>
Then I went to the Page Settings page via the URL, and changed the Page Layout
to one of the other three page layouts in my Solution Package - no luck.  Went
back and tried it with a third page layout, and to my surprise, it rendered without
any issues or errors.  The fourth one worked, too.  I actually saw this
as bad news since I couldn't blame the issue on anyone or anything but myself
- or so I thought.  Remember, it worked on my machine!
</p>
        <p>
I assumed the problem had to be something similar in the two page layouts, which were
only markup, so I slowly tried whittling away pieces of markup to hopefully
find the offending tag.  This was a brutally painful process because since
I wasn't receiving the error locally, I had to build the .wsp, move it to test, deploy
it, and run the page.  Each change and deployment took around 15-20 minutes -
ouch.
</p>
        <p>
After a few hours of trying this method with no luck, I wondered if the code was even
being updated in SharePoint since I was using both the -removesolution/-deploysolution
and the -upgradesolution methods.  The solution packages seemed to be getting
deployed successfully and my page layouts were showing code changes in the FEATURES
folder, so I went to the Master Page Gallery to see if the code was getting updated
in the server.
</p>
        <p>
Luckily, you can download copies of aspx pages from the Master Page Gallery just like
they were any other kind of document by clicking the drop down for the document and
choosing Send to &gt; Download a copy.<br /><br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/SharePointMasterPageGalleryErrorThisite_108C/image.png" atomicselection="true"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="135" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/SharePointMasterPageGalleryErrorThisite_108C/image_thumb.png" width="240" border="0" /></a></p>
        <p>
When I viewed the markup of the page, I noticed that the code hadn't changed since
the initial deployment! Normally, when you upgrade a solution, it does, so I was confused. 
As I looked through the source a little further, I noticed at the bottom a strange
snippet just after the closing tag for the last Content tag:
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <p>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">asp:Content</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">html</span>
              <span style="COLOR: #ff0000">xmlns:mso</span>
              <span style="COLOR: #0000ff">="urn:schemas-microsoft-com:office:office"</span>
              <br />
              <span style="COLOR: #ff0000">xmlns:msdt</span>
              <span style="COLOR: #0000ff">="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"</span>
              <span style="COLOR: #0000ff">&gt;&lt;</span>
              <span style="COLOR: #800000">head</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #008000">&lt;!--[if
gte mso 9]&gt;&lt;xml&gt;</span>
              <span style="COLOR: #008000">&lt;mso:CustomDocumentProperties&gt;</span>
              <span style="COLOR: #008000">&lt;mso:ContentType
msdt:dt="string"&gt;Page Layout&lt;/mso:ContentType&gt;</span>
              <span style="COLOR: #008000">&lt;mso:PublishingAssociatedContentType
msdt:dt="string"&gt;;#Custom Page Layout Content Type;</span>
              <span style="COLOR: #008000">#0x01010007FF3E057FA8AB4AA42FCB67B453FFC100E214EEE741181F4E9F7ACC43278EE81100</span>
              <span style="COLOR: #008000">2D7E961EBCD042C6A40B97F107579F70;#&lt;/mso:PublishingAssociatedContentType&gt;</span>
              <span style="COLOR: #008000">&lt;/mso:CustomDocumentProperties&gt;</span>
              <span style="COLOR: #008000">&lt;/xml&gt;&lt;![endif]--&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">title</span>
              <span style="COLOR: #0000ff">&gt;</span>PageLayoutTitle<span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">title</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">head</span><span style="COLOR: #0000ff">&gt;</span></p>
          </pre>
        </div>
        <p>
          <br />
Hey - those are the properties I set when I provision the files into the Master Page
Gallery on activation of the feature! Well, that explains the Content controls error,
but why is it in there? And, why isn't the code being updated on upgrade of the solution
package?<br /><br />
I thought that maybe I could just delete the two offending page layouts, upgrade the
solution package again, and the page layouts will be replaced.  I deleted the
page I created using the page layout, then went to delete them from the Master Page
Gallery.  Another error!  This time, it was the 'This item cannot be
deleted because it is still referenced by other pages' error.
</p>
        <p>
After searching around, I came across Katrien De Graeve's blog which explains a nice
hack for <a href="http://www.katriendg.com/aboutdotnet/2007_1_cannot_delete_page_layout.aspx">removing
pages from the Gallery when you see this error</a>.  Once the pages were gone,
I was able to re-upgrade the solution package, but I was still seeing the Content
controls error, and the properties were still being inserted into the page markup.
</p>
        <p>
Opening the page layout in SharePoint Designer proved to be some help.  I was
able to remove the properties from the bottom of the page, save it, and it rendered
without any errors.  That helped a little, but not if I have to do that every
time I deploy the code.
</p>
        <p>
I took the markup of one of the working page layouts in the solution package and replaced
the markup of the one of the broken page layouts.  It worked! I slowly started
piecing the page layout back together by pasting in little sections at a time until
I found the offending markup.  By the time all the markup was back in there,
I had seen no errors.
</p>
        <p>
So - this leads me to believe that there was something imbedded into the page that
I couldn't see which was causing the error.  Pasting the code in fixed whatever
it was.  I'm assuming that I could have easily just pasted all the markup into
Notepad, and then back into the Visual Studio editor, too, saving a ton of time. 
If you have any ideas on what it could have been, please let me know.
</p>
        <p>
Update (9/7/2007): Found that for some reason, one of the &lt;asp:Content&gt; controls
became lowercase somehow, as in &lt;asp:content&gt;.  As soon as the casing was
fixed, worked like a champ...
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=17486ae8-e7e7-4997-8c0b-1911d17d8d57" />
      </body>
      <title>Strange Resolution - Page Layout Error: 'Only Content controls are allowed directly in a content page that contains Content controls' along with Master Page Gallery Error: &amp;quot;This item cannot be deleted because it is still referenced by other pages.&amp;quot;</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,17486ae8-e7e7-4997-8c0b-1911d17d8d57.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/08/06/StrangeResolutionPageLayoutErrorOnlyContentControlsAreAllowedDirectlyInAContentPageThatContainsContentControlsAlongWithMasterPageGalleryErrorQuotThisItemCannotBeDeletedBecauseItIsStillReferencedByOtherPagesquot.aspx</link>
      <pubDate>Mon, 06 Aug 2007 14:43:14 GMT</pubDate>
      <description>&lt;p&gt;
After working in my local development environment for a few days, I was ready to deploy
a Solution Package containing some publishing layout pages into our testing environment.&lt;br&gt;
&lt;br&gt;
Once the solution deployment was complete, I tested one of the four page layouts by
creating a new publishing page.&amp;nbsp; Immediately, the page rendered with the error
'Only Content controls are allowed directly in a content page that contains Content
controls.'&amp;nbsp; 
&lt;br&gt;
&lt;br&gt;
I thought, weird, it works on my machine, so I went and checked&amp;nbsp;out the Pages
list in the Web.&amp;nbsp; The page had been created correctly, and I could view the properties,
so what's the deal?
&lt;/p&gt;
&lt;p&gt;
Then I&amp;nbsp;went to the Page Settings page via the URL, and changed the Page Layout
to one of the other three page layouts in my Solution Package - no luck.&amp;nbsp; Went
back and tried it with a third page layout, and to my surprise, it rendered without
any issues or errors.&amp;nbsp; The fourth one worked, too.&amp;nbsp; I actually saw this
as bad news since I couldn't blame the issue on anyone or anything&amp;nbsp;but myself
- or so I thought.&amp;nbsp; Remember, it worked on my machine!
&lt;/p&gt;
&lt;p&gt;
I assumed the problem had to be something similar in the two page layouts, which were
only markup, so I slowly tried whittling away pieces&amp;nbsp;of markup to&amp;nbsp;hopefully
find the&amp;nbsp;offending tag.&amp;nbsp; This was a brutally painful process because since
I wasn't receiving the error locally, I had to build the .wsp, move it to test, deploy
it, and run the page.&amp;nbsp; Each change and deployment took around 15-20 minutes -
ouch.
&lt;/p&gt;
&lt;p&gt;
After a few hours of trying this method with no luck, I wondered if the code was even
being updated in SharePoint since I was using both the -removesolution/-deploysolution
and the -upgradesolution methods.&amp;nbsp; The solution packages seemed to be getting
deployed successfully and my page layouts were showing code changes in the FEATURES
folder, so I went to the Master Page Gallery to see if the code was getting updated
in the server.
&lt;/p&gt;
&lt;p&gt;
Luckily, you can download copies of aspx pages from the Master Page Gallery just like
they were any other kind of document by clicking the drop down for the document and
choosing Send to &amp;gt; Download a copy.&lt;br&gt;
&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/SharePointMasterPageGalleryErrorThisite_108C/image.png" atomicselection="true"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=135 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/SharePointMasterPageGalleryErrorThisite_108C/image_thumb.png" width=240 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
When I viewed the markup of the page, I noticed that the code hadn't changed since
the initial deployment! Normally, when you upgrade a solution, it does, so I was confused.&amp;nbsp;
As&amp;nbsp;I looked through the source a little further, I noticed at the bottom a strange
snippet just after the closing tag for the last Content tag:
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;

&lt;p&gt;
&lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:Content&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;html&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;xmlns:mso&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="urn:schemas-microsoft-com:office:office"&lt;/span&gt; 
&lt;br&gt;
&lt;span style="COLOR: #ff0000"&gt;xmlns:msdt&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;head&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!--[if
gte mso 9]&amp;gt;&amp;lt;xml&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;mso:CustomDocumentProperties&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;mso:ContentType
msdt:dt="string"&amp;gt;Page Layout&amp;lt;/mso:ContentType&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;mso:PublishingAssociatedContentType
msdt:dt="string"&amp;gt;;#Custom Page Layout Content Type;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;#0x01010007FF3E057FA8AB4AA42FCB67B453FFC100E214EEE741181F4E9F7ACC43278EE81100&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;2D7E961EBCD042C6A40B97F107579F70;#&amp;lt;/mso:PublishingAssociatedContentType&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;/mso:CustomDocumentProperties&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;/xml&amp;gt;&amp;lt;![endif]--&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;title&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;PageLayoutTitle&lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;title&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;head&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;br&gt;
Hey - those are the properties I set when I provision the files into the Master Page
Gallery on activation of the feature! Well, that explains the Content controls error,
but why is it in there? And, why isn't the code being updated on upgrade of the solution
package?&lt;br&gt;
&lt;br&gt;
I thought that maybe I could just delete the two offending page layouts, upgrade the
solution package again, and the page layouts will be replaced.&amp;nbsp; I deleted the
page I created using the page layout, then went to delete them from the Master Page
Gallery.&amp;nbsp;&amp;nbsp;Another error!&amp;nbsp; This time, it was the 'This item cannot be
deleted because it is still referenced by other pages' error.
&lt;/p&gt;
&lt;p&gt;
After searching around, I came across Katrien De Graeve's blog which explains a nice
hack for &lt;a href="http://www.katriendg.com/aboutdotnet/2007_1_cannot_delete_page_layout.aspx"&gt;removing
pages from the Gallery when you see this error&lt;/a&gt;.&amp;nbsp; Once the pages were gone,
I was able to re-upgrade the solution package, but I was still seeing the Content
controls error, and the properties were still being inserted into the page markup.
&lt;/p&gt;
&lt;p&gt;
Opening the page layout in SharePoint Designer proved to be some help.&amp;nbsp; I was
able to remove the properties from the bottom of the page, save it, and it rendered
without any errors.&amp;nbsp; That helped a little, but not if I have to do that every
time I deploy the code.
&lt;/p&gt;
&lt;p&gt;
I took the markup of one of the working page layouts in the solution package and replaced
the markup of the one of the broken page layouts.&amp;nbsp; It worked! I slowly started
piecing the page layout back together by pasting in little sections at a time until
I found the offending markup.&amp;nbsp; By the time all the markup was back in there,
I had seen no errors.
&lt;/p&gt;
&lt;p&gt;
So - this leads me to believe that there was something imbedded into the page that
I couldn't see which was causing the error.&amp;nbsp; Pasting the code in fixed whatever
it was.&amp;nbsp; I'm assuming that I could have easily just pasted all the markup into
Notepad, and then back into the Visual Studio editor, too, saving a ton of time.&amp;nbsp;
If you have any ideas on what it could have been, please let me know.
&lt;/p&gt;
&lt;p&gt;
Update (9/7/2007): Found that for some reason, one of the &amp;lt;asp:Content&amp;gt; controls
became lowercase somehow, as in &amp;lt;asp:content&amp;gt;.&amp;nbsp; As soon as the casing was
fixed, worked like a champ...
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=17486ae8-e7e7-4997-8c0b-1911d17d8d57" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,17486ae8-e7e7-4997-8c0b-1911d17d8d57.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=5a9d4d12-dbcf-4873-995e-39701e1e6e59</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,5a9d4d12-dbcf-4873-995e-39701e1e6e59.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,5a9d4d12-dbcf-4873-995e-39701e1e6e59.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=5a9d4d12-dbcf-4873-995e-39701e1e6e59</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
My friend Mark is working on a MOSS project where all authenticated users have
access to the web application, but because they might not have browsed the site yet,
he wasn't able to get an SPUser object for them because they weren't yet in the content
database.
</p>
        <p>
I'm big fan of the Contact object in the Microsoft.Office.Workflow.Tasks.dll, so we
started down the path using this object, and figured out the code to make it happen:
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">Contact contact = Contact.FromName(<span style="COLOR: #006080">"domain\\name"</span>,
SPContext.Current.Web); <span style="COLOR: #0000ff">if</span> (contact.PrincipalID
&lt; 0) { SPContext.Current.Web.AllowUnsafeUpdates = <span style="COLOR: #0000ff">true</span>;
SPPrincipal p = contact.GetPrincipal(SPContext.Current.Web); } SPUser newUser = SPContext.Current.Web.SiteUsers[contact.LoginName];</pre>
        </div>
        <p>
 
</p>
        <p>
Here's how I know it works:<br />
Before this came up, I hadn't granted 'all authenticated users' access to my
dev site yet.  To test the code, I gave all authenticated users access as
readers to the root web of the site, added a new user to my domain, then ran
the code looking for the new user's user name.  
</p>
        <p>
You might run into security issues with this code in your running app because of SPContext,
but you can always <a href="http://msdn2.microsoft.com/en-us/library/Aa543467.aspx">elevate
privileges</a> if you need to.
</p>
        <p>
I found that the user is added to the 'People and Groups: All People' list. 
This should be interesting in large population situations.  If anybody has any
thoughts, please let me know...
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=5a9d4d12-dbcf-4873-995e-39701e1e6e59" />
      </body>
      <title>Get SPUser object for someone who's never browsed a site before</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,5a9d4d12-dbcf-4873-995e-39701e1e6e59.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/07/25/GetSPUserObjectForSomeoneWhosNeverBrowsedASiteBefore.aspx</link>
      <pubDate>Wed, 25 Jul 2007 16:24:56 GMT</pubDate>
      <description>&lt;p&gt;
My friend Mark is&amp;nbsp;working on a MOSS project where all authenticated users have
access to the web application, but because they might not have browsed the site yet,
he wasn't able to get an SPUser object for them because they weren't yet in the content
database.
&lt;/p&gt;
&lt;p&gt;
I'm big fan of the Contact object in the Microsoft.Office.Workflow.Tasks.dll, so we
started down the path using this object, and figured out the code to make it happen:
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;Contact contact = Contact.FromName(&lt;span style="COLOR: #006080"&gt;"domain\\name"&lt;/span&gt;,
SPContext.Current.Web); &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (contact.PrincipalID
&amp;lt; 0) { SPContext.Current.Web.AllowUnsafeUpdates = &lt;span style="COLOR: #0000ff"&gt;true&lt;/span&gt;;
SPPrincipal p = contact.GetPrincipal(SPContext.Current.Web); } SPUser newUser = SPContext.Current.Web.SiteUsers[contact.LoginName];&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Here's how I know it works:&lt;br&gt;
Before this came up, I hadn't granted&amp;nbsp;'all authenticated users' access to my
dev site yet.&amp;nbsp; To&amp;nbsp;test the code, I gave all authenticated users access as
readers to the&amp;nbsp;root web of the site, added a new user to my domain, then ran
the code looking for the new user's user name.&amp;nbsp;&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
You might run into security issues with this code in your running app because of SPContext,
but you can always &lt;a href="http://msdn2.microsoft.com/en-us/library/Aa543467.aspx"&gt;elevate
privileges&lt;/a&gt; if you need to.
&lt;/p&gt;
&lt;p&gt;
I found that the user is added to the 'People and Groups: All People' list.&amp;nbsp;
This should be interesting in large population situations.&amp;nbsp; If anybody has any
thoughts, please let me know...
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=5a9d4d12-dbcf-4873-995e-39701e1e6e59" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,5a9d4d12-dbcf-4873-995e-39701e1e6e59.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=0e3bc28f-dffb-4ef3-b767-0fd52d96b587</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,0e3bc28f-dffb-4ef3-b767-0fd52d96b587.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,0e3bc28f-dffb-4ef3-b767-0fd52d96b587.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=0e3bc28f-dffb-4ef3-b767-0fd52d96b587</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Most of the documentation I've seen out there around creating publishing items such
as master pages and page layouts has developers using SharePoint Designer to create
them.  This is ok, but it only gets you so far, and I see problems
with the approach when you require more robust development.  Also, when it came
to using SharePoint Designer, I always had the question - 'how do you develop
a master page or page layout locally in development, and deploy it to a completely
different farm?'
</p>
        <p>
As my past couple of posts might point to, I've been working a lot with WSS Solutions
lately, and I'm currently working with a client who's doing a migration from
MCMS 2002 to MOSS.  The solution is completely custom, and needs to be as
robust as possible.  Part of the project has been documenting the best
possible configuration for MOSS CMS development, so I figured what I've found
would be something good to share.
</p>
        <p>
Essentially, there's two features in the solution.  One feature for custom resource
files (RESX) and another feature for all the custom publishing items.  I'm
using the full <a href="http://www.telerik.com/products/sharepoint/radeditor.aspx" target="_blank">Telerik
Editor for MOSS</a> - which seems to have all the kinks worked out from the earlier
versions - along with some other <a href="http://www.telerik.com/products/aspnet/overview.aspx" target="_blank">Telerik
ASP.NET controls</a>.  I've heard that Andrew Connell is working with Telerik
on releasing a whitepaper at the end of this month that will provide the needed guidance
for leveraging best practices in implementing all of the Telerik ASP.NET components
into MOSS and WSS v3, and I'll most likely touch on it in the future, as well.
</p>
        <p>
I don't want to really cover the details of the MOSS resource feature in this post,
but Mikhail Dikov has a great one on creating <a href="http://www.mikhaildikov.com/2007/03/sharepoint-resources-types-use-and_2163.html" target="_blank">custom
resource files in MOSS</a>, so make sure to check it out.  I will, however, give
you what you need to get it up and running.
</p>
        <p>
So - let's start from scratch!  
</p>
        <p>
Create a new Class Library project in Visual Studio 2005:
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/Creatingasolutiontodeploycustompublishin_7E28/image_1.png" atomicselection="true">
            <img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="154" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/Creatingasolutiontodeploycustompublishin_7E28/image_thumb_1.png" width="240" border="0" />
          </a>
        </p>
        <p>
Once it's created, delete Class1.cs.
</p>
        <p>
Add a reference to Windows SharePoint Services, Microsoft Content Publishing and Management,
and System.Web.
</p>
        <p>
I really like to mirror the installation directory on the server, so I normally set
up a folder structure in my projects to match what the file structure on
the server looks like, along with the folders that correspond with the locations of
the files I'm going to add..
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/Creatingasolutiontodeploycustompublishin_7E28/image_4.png" atomicselection="true">
            <img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="240" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/Creatingasolutiontodeploycustompublishin_7E28/image_thumb_4.png" width="210" border="0" />
          </a>
        </p>
        <p>
The first thing I'm going to do is create the resource feature along with the needed feature
receivers to deploy the resource files to the App_GlobalResources directory of the
web application it's installed on.
</p>
        <p>
This is code I mainly obtained from Mikhail's post, but here's how you set up
the resource feature:
</p>
        <p>
If you set up the folder structure just like I did in the image above, create a class
in the 'Objects' directory called DeployCustomResourceJob.cs, with the following code:
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 1396px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 1373px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #0000ff">using</span> System; <span style="COLOR: #0000ff">using</span> System.Collections.Generic; <span style="COLOR: #0000ff">using</span> System.Text; <span style="COLOR: #0000ff">using</span> Microsoft.SharePoint.Administration; <span style="COLOR: #0000ff">using</span> Microsoft.SharePoint.Utilities; <span style="COLOR: #0000ff">using</span> System.Diagnostics; <span style="COLOR: #0000ff">using</span> System.IO; <span style="COLOR: #0000ff">namespace</span> MOSSFeatures.Objects
{ <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">class</span> DeployCustomResourcesJob
: SPJobDefinition { <span style="COLOR: #cc6633">#region</span> Fields [Persisted] <span style="COLOR: #0000ff">private</span><span style="COLOR: #0000ff">string</span> _SourcePath; <span style="COLOR: #0000ff">private</span><span style="COLOR: #0000ff">string</span> _SomethignElse; <span style="COLOR: #cc6633">#endregion</span><span style="COLOR: #cc6633">#region</span> Constructors <span style="COLOR: #0000ff">public</span> DeployCustomResourcesJob()
: <span style="COLOR: #0000ff">base</span>() { } <span style="COLOR: #0000ff">public</span> DeployCustomResourcesJob(<span style="COLOR: #0000ff">string</span> jobName,
SPWebApplication webApp, <span style="COLOR: #0000ff">string</span> featureName) : <span style="COLOR: #0000ff">base</span>(jobName,
webApp, <span style="COLOR: #0000ff">null</span>, SPJobLockType.Job) { <span style="COLOR: #008000">//get
the path to the feature directory</span><span style="COLOR: #0000ff">this</span>._SourcePath
= SPUtility.GetGenericSetupPath(<span style="COLOR: #006080">"Template"</span>); <span style="COLOR: #008000">//uncomment
the following line (commented to fix a bug in livewriter)</span><span style="COLOR: #008000">//
+ "\\FEATURES\\" + featureName;</span> } <span style="COLOR: #cc6633">#endregion</span><span style="COLOR: #cc6633">#region</span> Job
Handling <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">override</span><span style="COLOR: #0000ff">void</span> Execute(Guid
targetInstanceId) { <span style="COLOR: #0000ff">try</span> { <span style="COLOR: #008000">//get
the web application for the current job - I'm pretty sure this is the same as calling
'base.WebApplication'</span> SPWebApplication webApp = <span style="COLOR: #0000ff">this</span>.Parent <span style="COLOR: #0000ff">as</span> SPWebApplication; <span style="COLOR: #0000ff">foreach</span> (SPUrlZone
zone <span style="COLOR: #0000ff">in</span> webApp.IisSettings.Keys) { <span style="COLOR: #008000">//the
settings of the IIS application to update</span> SPIisSettings settings = webApp.IisSettings[zone]; <span style="COLOR: #008000">//determine
the destination path</span><span style="COLOR: #0000ff">string</span> destPath =
Path.Combine(settings.Path.ToString(), <span style="COLOR: #006080">"App_GlobalResources"</span>); <span style="COLOR: #008000">//get
the RESX files from the feature directory</span><span style="COLOR: #0000ff">string</span>[]
filePaths = Directory.GetFiles(<span style="COLOR: #0000ff">this</span>._SourcePath, <span style="COLOR: #006080">"*.resx"</span>); <span style="COLOR: #008000">//copy/overwrite
the RESX files into the App_GlobalResource directory</span><span style="COLOR: #0000ff">foreach</span> (<span style="COLOR: #0000ff">string</span> filePath <span style="COLOR: #0000ff">in</span> filePaths)
{ <span style="COLOR: #0000ff">string</span> fileName = Path.GetFileName(filePath);<span style="COLOR: #008000">//get
the filename of the file to copy</span> File.Copy(filePath, Path.Combine(destPath,
fileName), <span style="COLOR: #0000ff">true</span>);<span style="COLOR: #008000">//copy
it over the file in the Resource directory</span> } } } <span style="COLOR: #0000ff">catch</span> (Exception
ex) { Debug.WriteLine(<span style="COLOR: #006080">"Failed to copy global resource"</span>);
Debug.WriteLine(ex); <span style="COLOR: #0000ff">throw</span>; } } <span style="COLOR: #cc6633">#endregion</span> }
} </pre>
        </div>
        <p>
 
</p>
        <p>
Next - create a class in the 'FeatureReceivers' directory called CustomFeatureReceiver.cs. 
This is the feature receiver which will move the resource files once the
feature is activated.  Here's the code:
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 1256px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 1232px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <p>
              <span style="COLOR: #0000ff">using</span> System; <span style="COLOR: #0000ff">using</span> System.Collections.Generic; <span style="COLOR: #0000ff">using</span> System.Text; <span style="COLOR: #0000ff">using</span> Microsoft.SharePoint; <span style="COLOR: #0000ff">using</span> Microsoft.SharePoint.Administration; <span style="COLOR: #0000ff">using</span> MOSSFeatures.Objects; <span style="COLOR: #0000ff">namespace</span> MOSSFeatures.FeatureReceivers
{ <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">class</span> CustomResourceReceiver
: SPFeatureReceiver { <span style="COLOR: #cc6633">#region</span> Constants <span style="COLOR: #0000ff">const</span><span style="COLOR: #0000ff">string</span> JOB_TITLE
= <span style="COLOR: #006080">"Deploy Custom Resources"</span>; <span style="COLOR: #0000ff">const</span><span style="COLOR: #0000ff">string</span> JOB_NAME
= <span style="COLOR: #006080">"job-deploy-custom-resources"</span>; <span style="COLOR: #cc6633">#endregion</span><span style="COLOR: #cc6633">#region</span> Events <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">override</span><span style="COLOR: #0000ff">void</span> FeatureActivated(SPFeatureReceiverProperties
properties) { SPWeb web = properties.Feature.Parent <span style="COLOR: #0000ff">as</span> SPWeb; <span style="COLOR: #008000">//check
for an exisiting instance of the job - if we find it, delete it</span><span style="COLOR: #0000ff">foreach</span> (SPJobDefinition
job <span style="COLOR: #0000ff">in</span> web.Site.WebApplication.JobDefinitions)
{ <span style="COLOR: #0000ff">if</span> (job.Name == JOB_NAME &amp;&amp; job.WebApplication.Name
== web.Site.WebApplication.Name) { job.Delete(); <span style="COLOR: #0000ff">string</span> something
= <span style="COLOR: #006080">"nothing"</span>; } } <span style="COLOR: #008000">//create
a new deployment job</span> DeployCustomResourcesJob deployJob = <span style="COLOR: #0000ff">new</span> DeployCustomResourcesJob(JOB_NAME, 
<br />
               web.Site.WebApplication, 
<br />
               properties.Definition.DisplayName);
deployJob.Title = JOB_TITLE; deployJob.Schedule = <span style="COLOR: #0000ff">new</span> SPOneTimeSchedule(DateTime.Now);
deployJob.Update(); } <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">override</span><span style="COLOR: #0000ff">void</span> FeatureDeactivating(SPFeatureReceiverProperties
properties) { SPWeb web = properties.Feature.Parent <span style="COLOR: #0000ff">as</span> SPWeb; <span style="COLOR: #008000">//delete
the job, if there is one</span><span style="COLOR: #0000ff">foreach</span> (SPJobDefinition
job <span style="COLOR: #0000ff">in</span> web.Site.WebApplication.JobDefinitions)
{ <span style="COLOR: #0000ff">if</span> (job.Name == JOB_NAME &amp;&amp; job.WebApplication.Name
== 
<br />
                  web.Site.WebApplication.Name)
{ job.Delete(); } } <span style="COLOR: #008000">//we could delete the resource files
here if we want to</span> } <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">override</span><span style="COLOR: #0000ff">void</span> FeatureInstalled(SPFeatureReceiverProperties
properties) { <span style="COLOR: #008000">//throw new Exception("The method or operation
is not implemented.");</span> } <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">override</span><span style="COLOR: #0000ff">void</span> FeatureUninstalling(SPFeatureReceiverProperties
properties) { <span style="COLOR: #008000">//throw new Exception("The method or operation
is not implemented.");</span> } <span style="COLOR: #cc6633">#endregion</span> } } 
</p>
          </pre>
        </div>
        <p>
 
</p>
        <p>
Create two RESX files in the TEMPLATE\FEATURES\CustomResources project directory -
CustomResources.en-US.resx, and CustomResources.resx.  <a href="http://www.mikhaildikov.com/2007/03/sharepoint-resources-types-use-and_2163.html" target="_blank">According
to Mikhail</a>, one resource file is used during the provisioning process, and the
other is used at run-time, but the rule I use is that the entries in both
resource files should match.  These two files will contains contain the
resource strings used in the custom publishing feature, as well as anywhere else you
might need them.
</p>
        <p>
Create the Feature.xml file for the CustomResources feature.
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 247px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 224px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">Feature</span>
            <span style="COLOR: #ff0000">Title</span>
            <span style="COLOR: #0000ff">="CustomResourceFeature"</span>
            <span style="COLOR: #ff0000">Id</span>
            <span style="COLOR: #0000ff">="AC3CB30C-905F-433f-A635-DA13291BCC08"</span>
            <span style="COLOR: #ff0000">Description</span>
            <span style="COLOR: #0000ff">="Deploys
localization resources used for MOSSFeatures to the App_GlobalResources directory"</span>
            <span style="COLOR: #ff0000">Version</span>
            <span style="COLOR: #0000ff">="1.0.0.0"</span>
            <span style="COLOR: #ff0000">Scope</span>
            <span style="COLOR: #0000ff">="Site"</span>
            <span style="COLOR: #ff0000">xmlns</span>
            <span style="COLOR: #0000ff">="http://schemas.microsoft.com/sharepoint/"</span>
            <span style="COLOR: #ff0000">ReceiverAssembly</span>
            <span style="COLOR: #0000ff">="MOSSFeatures,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=ENTER_YOUR_PUBLIC_KEY_HERE"</span>
            <span style="COLOR: #ff0000">ReceiverClass</span>
            <span style="COLOR: #0000ff">="MOSSFeatures.FeatureReceivers.CustomResourceReceiver"</span>
            <span style="COLOR: #ff0000">AlwaysForceInstall</span>
            <span style="COLOR: #0000ff">="true"</span>
            <span style="COLOR: #ff0000">ActivateOnDefault</span>
            <span style="COLOR: #0000ff">="false"</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">ElementManifests</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">ElementFile</span>
            <span style="COLOR: #ff0000">Location</span>
            <span style="COLOR: #0000ff">="CustomResources.en-US.resx"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">ElementFile</span>
            <span style="COLOR: #ff0000">Location</span>
            <span style="COLOR: #0000ff">="CustomResources.resx"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">ElementManifests</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">Feature</span>
            <span style="COLOR: #0000ff">&gt;</span>
          </pre>
        </div>
        <p>
 
</p>
        <p>
There - that's all you need to implement custom resource files in MOSS.  Now
we need to create the WSS Solution file (WSP) to deploy them.
</p>
        <p>
At the root of the project, create a new file called CreateMOSSFeatures_WSP.ddf. 
This ddf file is used by makecab so it knows where to place files inside the cabinet
(WSP) file.
</p>
        <p>
Enter the following code in the ddf file
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 490px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 467px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <p>
.OPTION EXPLICIT ;generate errors .Set CabinetNameTemplate=MOSSFeatures.wsp .Set DiskDirectoryTemplate=CDROM
;All cabinets go into a single directory .Set CompressionType=MSZIP ;** All files
are compressed in cabinet files .Set UniqueFiles="ON" .Set Cabinet=on .Set DiskDirectory1=
;Here's the way it works... ;FileToCopyFromInProject NewFileInCABFile ;manifest file
manifest.xml manifest.xml ;assemblies bin\debug\MOSSFeatures.dll MOSSFeatures.dll
;features ;FeatureName\feature.xml FeatureName\feature.xml ;FeatureName\elements.xml
FeatureName\elements.xml ;CustomResources TEMPLATE\FEATURES\CustomResources\Feature.xml
CustomResources\Feature.xml TEMPLATE\FEATURES\CustomResources\CustomResources.en-US.resx
CustomResources\CustomResources.en-US.resx TEMPLATE\FEATURES\CustomResources\CustomResources.resx
CustomResources\CustomResources.resx
</p>
            <p>
TEMPLATE\FEATURES\CustomResources\CustomResources.en-US.resx RESOURCES\CustomResources.en-US.resx<br />
TEMPLATE\FEATURES\CustomResources\CustomResources.resx RESOURCES\CustomResources.resx
</p>
          </pre>
        </div>
        <p>
 
</p>
        <p>
Now, we need to create the manifest file for the WSS Solution.  The manifest
file will tell the solution receiver in the MOSS farm where to put the files
located inside the WSP cabinet once the solution is installed.  It
will also tell the receiver to place the assembly into the GAC, and deploy the code across
all servers in the farm.
</p>
        <p>
At the root of the project file, create a file named manifest.xml with the following
code:
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 439px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 416px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <p>
              <span style="COLOR: #0000ff">&lt;?</span>
              <span style="COLOR: #800000">xml</span>
              <span style="COLOR: #ff0000">version</span>
              <span style="COLOR: #0000ff">="1.0"</span>
              <span style="COLOR: #ff0000">encoding</span>
              <span style="COLOR: #0000ff">="utf-8"</span> ?<span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">Solution</span><span style="COLOR: #ff0000">SolutionId</span><span style="COLOR: #0000ff">="ENTER_SOLUTION_ID_GUID_HERE"</span><span style="COLOR: #ff0000">xmlns</span><span style="COLOR: #0000ff">="http://schemas.microsoft.com/sharepoint/"</span><span style="COLOR: #ff0000">ResetWebServer</span><span style="COLOR: #0000ff">="TRUE"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">Assemblies</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">Assembly</span><span style="COLOR: #ff0000">DeploymentTarget</span><span style="COLOR: #0000ff">="GlobalAssemblyCache"</span><span style="COLOR: #ff0000">Location</span><span style="COLOR: #0000ff">="MOSSFeatures.dll"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SafeControls</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SafeControl</span><span style="COLOR: #ff0000">Safe</span><span style="COLOR: #0000ff">="True"</span><span style="COLOR: #ff0000">Assembly</span><span style="COLOR: #0000ff">="MOSSFeatures,
Version=1.0.0.0, Culture=neutral, 
<br /></span><span style="COLOR: #0000ff">                     PublicKeyToken=ENTER_YOUR_PUBLIC_KEY_HERE"</span><br /><span style="COLOR: #ff0000">                     Namespace</span><span style="COLOR: #0000ff">="MOSSFeatures"</span><span style="COLOR: #ff0000">TypeName</span><span style="COLOR: #0000ff">="*"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">SafeControls</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">Assembly</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">Assemblies</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">Resources</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">Resource</span><span style="COLOR: #ff0000">Location</span><span style="COLOR: #0000ff">="CustomResources\CustomResources.en-US.resx"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">Resource</span><span style="COLOR: #ff0000">Location</span><span style="COLOR: #0000ff">="CustomResources\CustomResources.resx"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">Resources</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">FeatureManifests</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">FeatureManifest</span><span style="COLOR: #ff0000">Location</span><span style="COLOR: #0000ff">="CustomResources\Feature.xml"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">FeatureManifests</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">RootFiles</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">RootFile</span><span style="COLOR: #ff0000">Location</span><span style="COLOR: #0000ff">="Resources\CustomResources.en-US.resx"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">RootFile</span><span style="COLOR: #ff0000">Location</span><span style="COLOR: #0000ff">="Resources\CustomResources.resx"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">RootFiles</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">Solution</span><span style="COLOR: #0000ff">&gt;</span></p>
          </pre>
        </div>
        <p>
Now that we have the ddf and the manifest files created, we can set up a post-build
event in Visual Studio that will run makecab and create the WSP file for us. 
To add the post build event, right-click on the project in the Visual Studio Solution
Explorer and choose 'Properties'
</p>
        <p>
Enter the following lines in the Post-build event command line text box:
</p>
        <p>
cd $(ProjectDir)<br />
makecab /f CreateMOSSFeatures_WSP.ddf 
</p>
        <p>
        </p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/Creatingasolutiontodeploycustompublishin_7E28/image_5.png" atomicselection="true">
            <img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="105" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/Creatingasolutiontodeploycustompublishin_7E28/image_thumb_5.png" width="240" border="0" />
          </a>
        </p>
        <p>
We also need to make sure that we <a href="http://msdn2.microsoft.com/en-us/library/xc31ft41.aspx" target="_blank">sign
the assembly</a>, so when the solution is deployed, it can be added to the GAC.
</p>
        <p>
For ease in deployment, as I stated in a previous post, it's a good idea to create
some command files to handle the solution deployment, update, and removal.  Now's
a good time to add the directory which contains stsadm to the Path Windows System
Variable if you haven't done it already, and doing so will allow you to
run stsadm from any directory.  To set this up, right-click on My Computer, and
choose Properties.  On the Advanced tab, click the Environment Variables button,
and append ';C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN'
to the end of the Path variable.
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/Creatingasolutiontodeploycustompublishin_7E28/image_7.png" atomicselection="true">
            <img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="240" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/Creatingasolutiontodeploycustompublishin_7E28/image_thumb_7.png" width="216" border="0" />
          </a>
        </p>
        <p>
Now, you can create the cmd files and refer to stsadm inside them.  There's three
files: Deploy.cmd, Update.cmd, and Remove.cmd, rather than explain what's going on
in theme in exhausting detail, here's the code:
</p>
        <p>
Deploy.cmd
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 759px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 736px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">@ECHO OFF

SET SITE_URL="http://mossdevelopment.richfinn.net"
SET SOLUTION_NAME=MOSSFeatures.wsp

REM ----- Deactivate the feature(s) -----
stsadm -o deactivatefeature -name CustomResources -url %SITE_URL% -force

REM ----- Remove the features and solution -----
stsadm -o retractsolution -name %SOLUTION_NAME% -immediate -url %SITE_URL%


ECHO .
ECHO .
ECHO -------------------------------------------------------------------------------------------
ECHO Verify that the correct solutions have been completly retracted and then press ENTER
ECHO -------------------------------------------------------------------------------------------
ECHO .

pause

ECHO ON

REM ----- Delete the solution -----
stsadm -o deletesolution -name %SOLUTION_NAME%

REM ----- Add and depoly the solution -----
stsadm -o addsolution -filename %SOLUTION_NAME%
stsadm -o deploysolution -n %SOLUTION_NAME% -immediate -allowgacdeployment -allowCasPolicies -url %SITE_URL%


ECHO OFF
ECHO .
ECHO .
ECHO -------------------------------------------------------------------------------------------
ECHO Solution deployment complete, press ENTER to activate features, if any
ECHO -------------------------------------------------------------------------------------------

pause

ECHO ON
REM ----- Active features -----
stsadm -o activatefeature -name CustomResources -url %SITE_URL% -force

REM ----- Remove the following comment if features are present
REM pause</pre>
        </div>
        <p>
 
</p>
        <p>
Update.cmd
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 551px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 528px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">cls
ECHO OFF

SET SITE_URL="http://mossdevelopment.richfinn.net"
SET SOLUTION_NAME=MOSSFeatures.wsp

REM ECHO .
REM ECHO .
REM ECHO -------------------------------------------------------------------------------------------
REM ECHO Verify that the correct solutions have been completly retracted and then press ENTER
REM ECHO -------------------------------------------------------------------------------------------
REM ECHO .

pause

ECHO ON

stsadm -o upgradesolution -name %SOLUTION_NAME% -filename %SOLUTION_NAME% -immediate -allowgacdeployment

ECHO OFF
ECHO .
ECHO .
ECHO -------------------------------------------------------------------------------------------
ECHO Solution deployment complete, press ENTER to activate features, if any
ECHO -------------------------------------------------------------------------------------------

pause

ECHO ON
REM ----- Active features -----
stsadm -o activatefeature -name CustomResources -url %SITE_URL% -force

pause</pre>
        </div>
        <p>
 
</p>
        <p>
Remove.cmd
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 407px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 384px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">ECHO OFF

SET SITE_URL="http://mossdevelopment.richfinn.net"
SET SOLUTION_NAME=MOSSFeatures.wsp

REM ----------- Remove the features ------------------
stsadm -o deactivatefeature -name CustomResources -url %SITE_URL% -force


REM -----------  Retract the solution ----------------
stsadm -o retractsolution -name %SOLUTION_NAME% -immediate -url %SITE_URL%

pause


REM ----------- Execute Time Jobs --------------------

REM stsadm execadmsvcjobs

REM ----------- Delete the solution -----------------

stsadm -o deletesolution -name %SOLUTION_NAME%

pause</pre>
        </div>
        <p>
          <br />
          <em>
            <font color="#ff0000">
              <strong>*** IMPORTANT ***</strong>
            </font>
          </em>
        </p>
        <p>
Finally, here's a tricky part.  You need to manually add your assembly to
the &lt;assemblies&gt; block of each web.config file in your farm, or the code will
bomb.  Should track in the schema like this:
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 167px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 144px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">configuration</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">system.web</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">compilation</span>
            <span style="COLOR: #ff0000">batch</span>
            <span style="COLOR: #0000ff">="false"</span>
            <span style="COLOR: #ff0000">debug</span>
            <span style="COLOR: #0000ff">="false"</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">assemblies</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">add</span>
            <span style="COLOR: #ff0000">assembly</span>
            <span style="COLOR: #0000ff">="MOSSFeatures,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=YOUR_PUBLIC_KEY"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">assemblies</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">compilation</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">system.web</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">configuration</span>
            <span style="COLOR: #0000ff">&gt;</span>
          </pre>
        </div>
        <p>
 
</p>
        <p>
OK! Now that the resources are out there, we can create the custom publishing feature
using the resources just like you see in the out-of-box publishing layouts feature
that came with MOSS.  Creating this feature is kind of a long process, but it
really explains solution development in MOSS being that it has so many different components. 
I feel that if you can get this, you can really do anything in the platform.
</p>
        <p>
When it comes to web content publishing, there's three primary things needed, a content
type, a master page, and a page layout.  The content type defines the different
columns - or in MCMS lingo 'content placeholders' - and custom meta-data which will
be used in the page layouts (content templates) you'll have in your publishing site. 
The master page is the frame of the page - usually the top and left sides of
the page - and is the container for the page layouts.  Finally, the page layouts
contains the physical content placeholders where the content editors enter their text,
images, links, etc...
</p>
        <p>
Just like with page layout development in SharePoint Designer, the first thing we
need is the content type.  Content types are defined by columns, so we set the
columns up first in a file at the root FEATURES\CustomPublishingLayouts called CustomPublishingColumns.xml. 
I want to keep this example simple and clean, so I'm only going to create a single
column for content.  Here's the code:<br /></p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 119px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 96px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <p>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">Elements</span>
              <span style="COLOR: #ff0000">xmlns</span>
              <span style="COLOR: #0000ff">="http://schemas.microsoft.com/sharepoint/"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">Field</span>
              <span style="COLOR: #ff0000">ID</span>
              <span style="COLOR: #0000ff">="ENTER_CUSTOM_GUID_HERE"</span>
              <span style="COLOR: #ff0000">Name</span>
              <span style="COLOR: #0000ff">="content"</span>
              <br />
              <span style="COLOR: #ff0000">         Group</span>
              <span style="COLOR: #0000ff">="$Resources:CustomResources,ColumnGroup_CustomPublishingColumns_Title;"</span>
              <br />
              <span style="COLOR: #ff0000">DisplayName</span>
              <span style="COLOR: #0000ff">="$Resources:CustomResources,column_content_displayname;"</span>
              <span style="COLOR: #ff0000">Type</span>
              <span style="COLOR: #0000ff">="HTML"</span>
              <br />
              <span style="COLOR: #ff0000">         Required</span>
              <span style="COLOR: #0000ff">="FALSE"</span>
              <span style="COLOR: #ff0000">Sealed</span>
              <span style="COLOR: #0000ff">="TRUE"</span>
              <span style="COLOR: #ff0000">RichText</span>
              <span style="COLOR: #0000ff">="TRUE"</span>
              <span style="COLOR: #ff0000">RichTextMode</span>
              <span style="COLOR: #0000ff">="FullHtml"</span>
              <span style="COLOR: #0000ff">&gt;&lt;/</span>
              <span style="COLOR: #800000">Field</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">Elements</span>
              <span style="COLOR: #0000ff">&gt;</span>
            </p>
          </pre>
        </div>
        <p>
You can see how I'm referencing the entries in the custom resource files created previously.
(The entries are already in the resource files in the downloadable code)
</p>
        <p>
Now that we've got the content placeholder column created, we can create the content
type.  In the same directory as CustomPublishingColumns.xml, create another xml
file called CustomPublishingContentType.xml with the following code:
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 231px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 160px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <p>
              <span style="COLOR: #008000">&lt;!-- _lcid="1033" _version="12.0.4518" _dal="1" --&gt;</span>
              <span style="COLOR: #008000">&lt;!--
_LocalBinding --&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">Elements</span>
              <span style="COLOR: #ff0000">xmlns</span>
              <span style="COLOR: #0000ff">="http://schemas.microsoft.com/sharepoint/"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">ContentType</span>
              <span style="COLOR: #ff0000">ID</span>
              <span style="COLOR: #0000ff">="0x01010007FF3E057FA8AB4AA42FCB67B453FFC100E214EEE741181F4E9F7ACC43278EE811002D7E961EBCD042C6A40B97F107579F70"</span>
              <br />
              <span style="COLOR: #ff0000">         Group</span>
              <span style="COLOR: #0000ff">="$Resources:cmscore,group_pagelayoutcontenttypes;"</span>
              <br />
              <span style="COLOR: #ff0000">         Name</span>
              <span style="COLOR: #0000ff">="$Resources:CustomResources,ContentTypes_CustomPublishingContentType_Title;"</span>
              <br />
              <span style="COLOR: #ff0000">         Description</span>
              <span style="COLOR: #0000ff">="$Resources:CustomResources,ContentTypes_CustomPublishingContentType_Description;"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">FieldRefs</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">FieldRef</span>
              <span style="COLOR: #ff0000">ID</span>
              <span style="COLOR: #0000ff">="ENTER_SAME_GUID_AS_COLUMN"</span>
              <span style="COLOR: #ff0000">Name</span>
              <span style="COLOR: #0000ff">="$Resources:CustomResources,column_content_displayname;"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">FieldRefs</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">DocumentTemplate</span>
              <span style="COLOR: #ff0000">TargetName</span>
              <span style="COLOR: #0000ff">="/_layouts/CreatePage.aspx"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">ContentType</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">Elements</span>
              <span style="COLOR: #0000ff">&gt;</span>
            </p>
          </pre>
        </div>
        <p>
You can see the custom content type ID here.  Chris O'Brian has a nice post on <a href="http://sharepointnutsandbolts.blogspot.com/2007/04/deploying-content-types-as-feature.html" target="_blank">deploying
content types as features</a> along with how to create a custom content type ID. 
Long story short, a custom content type id is created by taking the content type id
of the content type you're inheriting from, adding two zeros, and then adding a new
guid with no dashes or brackets.
</p>
        <p>
 
</p>
        <p>
Now, we need to create the master page.  Heather Solomon has a great <a href="http://www.heathersolomon.com/blog/archive/2007/01/26/6153.aspx" target="_blank">blank
master page</a> which I like using as a starting place for my master page development. 
Make sure you download it, or you can just get it from the solution I've uploaded
(link's at the bottom of this post)
</p>
        <p>
Add two new folders to the CustomPublishingLayouts feature - MasterPages, and PageLayouts.
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/Creatingasolutiontodeploycustompublishin_7E28/image_8.png" atomicselection="true">
            <img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="110" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/Creatingasolutiontodeploycustompublishin_7E28/image_thumb_8.png" width="234" border="0" />
          </a>
        </p>
        <p>
In the MasterPages directory, create two files named blank.master, and blank.master.cs. 
Yes, that's right, code behind for the master page - something you don't get in Designer. 
One thing you'll notice is that you don't get the greatest visual studio support for
the files, so they appear side-by-side rahter than in the nice hierarchy you
see in a custom asp.net web application project.  
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/Creatingasolutiontodeploycustompublishin_7E28/image_9.png" atomicselection="true">
            <img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="48" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/Creatingasolutiontodeploycustompublishin_7E28/image_thumb_9.png" width="159" border="0" />
          </a>
        </p>
        <p>
Another thing - make sure you don't use the CodeBehind attribute in the page directive
of the ASPX page.  Note sure why, but it doesn't compile if it's there. 
Just use the Inherits attribute and you'll be fine... 
</p>
        <p>
blank.master (from <a href="http://www.heathersolomon.com/blog/archive/2007/01/26/6153.aspx" target="_blank">Heather
Solomon</a>)
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 6656px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 6617px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <p>
              <span style="BACKGROUND-COLOR: #ffff00">&lt;%@Master language="C#" AutoEventWireup="true"
Inherits="MOSSFeatures.MasterPages.blank"%&gt;</span>
              <span style="COLOR: #0000ff">&lt;!</span>
              <span style="COLOR: #800000">DOCTYPE</span>
              <span style="COLOR: #ff0000">html</span>
              <span style="COLOR: #ff0000">PUBLIC</span>
              <span style="COLOR: #0000ff">"-//W3C//DTD
HTML 4.01 Transitional//EN"</span>
              <span style="COLOR: #0000ff">"http://www.w3.org/TR/html4/loose.dtd"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="BACKGROUND-COLOR: #ffff00">&lt;%@
Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint,
Version=12.0.0.0, </span>
            </p>
            <p>
              <span style="BACKGROUND-COLOR: #ffff00">Culture=neutral, PublicKeyToken=71e9bce111e9429c"
%&gt;</span>
            </p>
            <p>
              <span style="BACKGROUND-COLOR: #ffff00">&lt;%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities"
Assembly="Microsoft.SharePoint, Version=12.0.0.0, </span>
            </p>
            <p>
              <span style="BACKGROUND-COLOR: #ffff00">Culture=neutral, PublicKeyToken=71e9bce111e9429c"
%&gt;</span>
            </p>
            <p>
              <span style="BACKGROUND-COLOR: #ffff00">&lt;%@ Import Namespace="Microsoft.SharePoint"
%&gt;</span>
              <span style="BACKGROUND-COLOR: #ffff00">&lt;%@ Import Namespace="Microsoft.SharePoint.ApplicationPages"
%&gt;</span>
              <span style="BACKGROUND-COLOR: #ffff00">&lt;%@ Register Tagprefix="WebPartPages"
Namespace="Microsoft.SharePoint.WebPartPages" 
<br />
Assembly="Microsoft.SharePoint, Version=12.0.0.0, </span>
            </p>
            <p>
              <span style="BACKGROUND-COLOR: #ffff00">Culture=neutral, PublicKeyToken=71e9bce111e9429c"
%&gt;</span>
              <span style="BACKGROUND-COLOR: #ffff00">&lt;%@ Register TagPrefix="wssuc"
TagName="Welcome" src="~/_controltemplates/Welcome.ascx" 
<br />
%&gt;</span>
              <span style="BACKGROUND-COLOR: #ffff00">&lt;%@ Register TagPrefix="wssuc"
TagName="DesignModeConsole" src="~/_controltemplates/DesignModeConsole.ascx" 
<br /><br />
%&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">HTML</span>
              <span style="COLOR: #ff0000">id</span>
              <span style="COLOR: #0000ff">="HTML1"</span>
              <span style="COLOR: #ff0000">dir</span>
              <span style="COLOR: #0000ff">="&lt;%$Resources:wss,multipages_direction_dir_value%&gt;"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <br />
              <span style="COLOR: #ff0000">   xmlns:o</span>
              <span style="COLOR: #0000ff">="urn:schemas-microsoft-com:office:office"</span>
            </p>
            <p>
              <span style="COLOR: #ff0000">__expr-val-dir</span>
              <span style="COLOR: #0000ff">="ltr"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">HEAD</span>
              <span style="COLOR: #ff0000">id</span>
              <span style="COLOR: #0000ff">="HEAD1"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">META</span>
              <span style="COLOR: #ff0000">Name</span>
              <span style="COLOR: #0000ff">="GENERATOR"</span>
              <span style="COLOR: #ff0000">Content</span>
              <span style="COLOR: #0000ff">="Microsoft
SharePoint"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">META</span>
              <span style="COLOR: #ff0000">Name</span>
              <span style="COLOR: #0000ff">="progid"</span>
              <span style="COLOR: #ff0000">Content</span>
              <span style="COLOR: #0000ff">="SharePoint.WebPartPage.Document"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">META</span>
              <span style="COLOR: #ff0000">HTTP-EQUIV</span>
              <span style="COLOR: #0000ff">="Content-Type"</span>
              <span style="COLOR: #ff0000">CONTENT</span>
              <span style="COLOR: #0000ff">="text/html;
charset=utf-8"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">META</span>
              <span style="COLOR: #ff0000">HTTP-EQUIV</span>
              <span style="COLOR: #0000ff">="Expires"</span>
              <span style="COLOR: #ff0000">content</span>
              <span style="COLOR: #0000ff">="0"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">SharePoint:RobotsMetaTag</span>
              <span style="COLOR: #ff0000">ID</span>
              <span style="COLOR: #0000ff">="RobotsMetaTag1"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">Title</span>
              <span style="COLOR: #ff0000">ID</span>=<span style="COLOR: #ff0000">onetidTitle</span><span style="COLOR: #0000ff">&gt;&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span>=<span style="COLOR: #ff0000">PlaceHolderPageTitle</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;&lt;/</span><span style="COLOR: #800000">Title</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SharePoint:Theme</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="Theme1"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SharePoint:ScriptLink</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="ScriptLink1"</span><span style="COLOR: #ff0000">language</span><span style="COLOR: #0000ff">="javascript"</span><span style="COLOR: #ff0000">name</span><span style="COLOR: #0000ff">="core.js"</span><span style="COLOR: #ff0000">Defer</span><span style="COLOR: #0000ff">="true"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SharePoint:CustomJSUrl</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="CustomJSUrl1"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SharePoint:SoapDiscoveryLink</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="SoapDiscoveryLink1"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SharePoint:CssLink</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="CssLink1"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">style</span><span style="COLOR: #ff0000">type</span><span style="COLOR: #0000ff">="text/css"</span><span style="COLOR: #0000ff">&gt;</span> /****
Overriding styles for branding ~ located in the CSSSTyleLibrary ****/ @import url(/CSSStyleLibrary/name.css); <span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">style</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderAdditionalPageHead"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SharePoint:DelegateControl</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="DelegateControl1"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">ControlId</span><span style="COLOR: #0000ff">="AdditionalPageHead"</span><span style="COLOR: #ff0000">AllowMultipleControls</span><span style="COLOR: #0000ff">="true"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">HEAD</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">BODY</span><span style="COLOR: #ff0000">scroll</span><span style="COLOR: #0000ff">="yes"</span><span style="COLOR: #ff0000">onload</span><span style="COLOR: #0000ff">="javascript:if
(typeof(_spBodyOnLoadWrapper) != 'undefined') _spBodyOnLoadWrapper();"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">form</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="Form1"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">onsubmit</span><span style="COLOR: #0000ff">="return
_spFormOnSubmitWrapper();"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">WebPartPages:SPWebPartManager</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="m"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="Server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #008000">&lt;!---
--- --- Top Toolbar --- --- ---&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderGlobalNavigation"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">span</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="TurnOnAccessibility"</span><span style="COLOR: #ff0000">style</span><span style="COLOR: #0000ff">="display:none"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">a</span><span style="COLOR: #ff0000">href</span><span style="COLOR: #0000ff">="#"</span><span style="COLOR: #ff0000">class</span><span style="COLOR: #0000ff">="ms-skip"</span><span style="COLOR: #ff0000">onclick</span><span style="COLOR: #0000ff">="SetIsAccessibilityFeatureEnabled(true);UpdateAccessibilityUI();return
false;"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SharePoint:EncodedLiteral</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="EncodedLiteral1"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">text</span><span style="COLOR: #0000ff">="&lt;%$Resources:wss,master_turnonaccessibility%&gt;"</span></p>
            <p>
              <span style="COLOR: #ff0000">EncodeMethod</span>
              <span style="COLOR: #0000ff">="HtmlEncode"</span>
              <span style="COLOR: #0000ff">/&gt;&lt;/</span>
              <span style="COLOR: #800000">a</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">span</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">A</span>
              <span style="COLOR: #ff0000">id</span>
              <span style="COLOR: #0000ff">="A1"</span>
              <span style="COLOR: #ff0000">href</span>
              <span style="COLOR: #0000ff">="javascript:;"</span>
              <span style="COLOR: #ff0000">onclick</span>
              <span style="COLOR: #0000ff">="javascript:this.href='#mainContent';"</span>
              <span style="COLOR: #ff0000">class</span>
              <span style="COLOR: #0000ff">="ms-skip"</span>
            </p>
            <p>
              <span style="COLOR: #ff0000">AccessKey</span>
              <span style="COLOR: #0000ff">="&lt;%$Resources:wss,maincontent_accesskey%&gt;"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">SharePoint:EncodedLiteral</span>
              <span style="COLOR: #ff0000">ID</span>
              <span style="COLOR: #0000ff">="EncodedLiteral2"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #ff0000">text</span>
              <span style="COLOR: #0000ff">="&lt;%$Resources:wss,mainContentLink%&gt;"</span>
              <br />
              <span style="COLOR: #ff0000">      EncodeMethod</span>
              <span style="COLOR: #0000ff">="HtmlEncode"</span>
              <span style="COLOR: #0000ff">/&gt;&lt;/</span>
              <span style="COLOR: #800000">A</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">span</span>
              <span style="COLOR: #ff0000">id</span>
              <span style="COLOR: #0000ff">="TurnOffAccessibility"</span>
              <span style="COLOR: #ff0000">style</span>
              <span style="COLOR: #0000ff">="display:none"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">a</span>
              <span style="COLOR: #ff0000">href</span>
              <span style="COLOR: #0000ff">="#"</span>
              <span style="COLOR: #ff0000">class</span>
              <span style="COLOR: #0000ff">="ms-acclink"</span>
              <span style="COLOR: #ff0000">onclick</span>
              <span style="COLOR: #0000ff">="SetIsAccessibilityFeatureEnabled(false);UpdateAccessibilityUI();return
false;"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">SharePoint:EncodedLiteral</span>
              <span style="COLOR: #ff0000">ID</span>
              <span style="COLOR: #0000ff">="EncodedLiteral3"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #ff0000">text</span>
              <span style="COLOR: #0000ff">="&lt;%$Resources:wss,master_turnoffaccessibility%&gt;"</span>
            </p>
            <p>
              <span style="COLOR: #ff0000">EncodeMethod</span>
              <span style="COLOR: #0000ff">="HtmlEncode"</span>
              <span style="COLOR: #0000ff">/&gt;&lt;/</span>
              <span style="COLOR: #800000">a</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">span</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #008000">&lt;!--
Global Breadcrumb --&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">asp:ContentPlaceHolder</span>
              <span style="COLOR: #ff0000">id</span>
              <span style="COLOR: #0000ff">="PlaceHolderGlobalNavigationSiteMap"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">asp:SiteMapPath</span>
              <span style="COLOR: #ff0000">SiteMapProvider</span>
              <span style="COLOR: #0000ff">="SPSiteMapProvider"</span>
              <span style="COLOR: #ff0000">id</span>
              <span style="COLOR: #0000ff">="GlobalNavigationSiteMap"</span>
            </p>
            <p>
              <span style="COLOR: #ff0000">RenderCurrentNodeAsLink</span>
              <span style="COLOR: #0000ff">="true"</span>
              <span style="COLOR: #ff0000">SkipLinkText</span>
              <span style="COLOR: #0000ff">=""</span>
              <span style="COLOR: #ff0000">NodeStyle-CssClass</span>
              <span style="COLOR: #0000ff">="ms-sitemapdirectional"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">asp:ContentPlaceHolder</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #008000">&lt;!--
Variations, Welcome Menu, My Site, My Links, Help --&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">SharePoint:DelegateControl</span>
              <span style="COLOR: #ff0000">ID</span>
              <span style="COLOR: #0000ff">="DelegateControl2"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #ff0000">ControlId</span>
              <span style="COLOR: #0000ff">="GlobalSiteLink0"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">wssuc:Welcome</span>
              <span style="COLOR: #ff0000">id</span>
              <span style="COLOR: #0000ff">="IdWelcome"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #ff0000">EnableViewState</span>
              <span style="COLOR: #0000ff">="false"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">wssuc:Welcome</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">SharePoint:DelegateControl</span>
              <span style="COLOR: #ff0000">ID</span>
              <span style="COLOR: #0000ff">="DelegateControl3"</span>
              <span style="COLOR: #ff0000">ControlId</span>
              <span style="COLOR: #0000ff">="GlobalSiteLink1"</span>
              <span style="COLOR: #ff0000">Scope</span>
              <span style="COLOR: #0000ff">="Farm"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">SharePoint:DelegateControl</span>
              <span style="COLOR: #ff0000">ID</span>
              <span style="COLOR: #0000ff">="DelegateControl4"</span>
              <span style="COLOR: #ff0000">ControlId</span>
              <span style="COLOR: #0000ff">="GlobalSiteLink2"</span>
              <span style="COLOR: #ff0000">Scope</span>
              <span style="COLOR: #0000ff">="Farm"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">a</span>
              <span style="COLOR: #ff0000">href</span>
              <span style="COLOR: #0000ff">="javascript:TopHelpButtonClick('NavBarHelpHome')"</span>
              <span style="COLOR: #ff0000">AccessKey</span>
              <span style="COLOR: #0000ff">="&lt;%$Resources:wss,multipages_helplink_accesskey%&gt;"</span>
            </p>
            <p>
              <span style="COLOR: #ff0000">id</span>
              <span style="COLOR: #0000ff">="TopHelpLink"</span>
              <span style="COLOR: #ff0000">title</span>
              <span style="COLOR: #0000ff">="&lt;%$Resources:wss,multipages_helplinkalt_text%&gt;"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #0000ff">&gt;</span>
            </p>
            <p>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">img</span>
              <span style="COLOR: #ff0000">id</span>
              <span style="COLOR: #0000ff">="Img1"</span>
              <span style="COLOR: #ff0000">align</span>
              <span style="COLOR: #0000ff">='absmiddle'</span>
              <span style="COLOR: #ff0000">border</span>=<span style="COLOR: #ff0000">0</span><span style="COLOR: #ff0000">src</span><span style="COLOR: #0000ff">="/_layouts/images/helpicon.gif"</span><span style="COLOR: #ff0000">alt</span><span style="COLOR: #0000ff">="&lt;%$Resources:wss,multipages_helplinkalt_text%&gt;"</span><br /><span style="COLOR: #ff0000">   runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">a</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #008000">&lt;!---
--- --- End of Top Toolbar --- --- ---&gt;</span><span style="COLOR: #008000">&lt;!---
--- --- Site Header --- --- ---&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SharePoint:SiteLogoImage</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="onetidHeadbnnr0"</span><span style="COLOR: #ff0000">LogoImageUrl</span><span style="COLOR: #0000ff">="/_layouts/images/titlegraphic.gif"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderSiteName"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SharePoint:SPLinkButton</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">NavigateUrl</span><span style="COLOR: #0000ff">="~site/"</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="onetidProjectPropertyTitle"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SharePoint:ProjectProperty</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="ProjectProperty1"</span><span style="COLOR: #ff0000">Property</span><span style="COLOR: #0000ff">="Title"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">SharePoint:SPLinkButton</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #008000">&lt;!---
--- --- End of Site Header --- --- ---&gt;</span><span style="COLOR: #008000">&lt;!---
--- --- Search --- --- ---&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderSearchArea"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SharePoint:DelegateControl</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="DelegateControl5"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">ControlId</span><span style="COLOR: #0000ff">="SmallSearchInputBox"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #008000">&lt;!---
--- --- End of Search --- --- ---&gt;</span><span style="COLOR: #008000">&lt;!---
--- --- Horizontal Top Navigation Bar --- --- ---&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderTopNavBar"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderHorizontalNav"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SharePoint:AspMenu</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="TopNavigationMenu"</span><span style="COLOR: #ff0000">Runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">DataSourceID</span><span style="COLOR: #0000ff">="topSiteMap"</span><span style="COLOR: #ff0000">EnableViewState</span><span style="COLOR: #0000ff">="false"</span><span style="COLOR: #ff0000">AccessKey</span><span style="COLOR: #0000ff">="&lt;%$Resources:wss,navigation_accesskey%&gt;"</span><span style="COLOR: #ff0000">Orientation</span><span style="COLOR: #0000ff">="Horizontal"</span><span style="COLOR: #ff0000">StaticDisplayLevels</span><span style="COLOR: #0000ff">="2"</span><span style="COLOR: #ff0000">MaximumDynamicDisplayLevels</span><span style="COLOR: #0000ff">="1"</span><span style="COLOR: #ff0000">DynamicHorizontalOffset</span><span style="COLOR: #0000ff">="0"</span><span style="COLOR: #ff0000">StaticPopoutImageUrl</span><span style="COLOR: #0000ff">="/_layouts/images/menudark.gif"</span><span style="COLOR: #ff0000">StaticPopoutImageTextFormatString</span><span style="COLOR: #0000ff">=""</span><span style="COLOR: #ff0000">DynamicHoverStyle-BackColor</span><span style="COLOR: #0000ff">="#CBE3F0"</span><span style="COLOR: #ff0000">SkipLinkText</span><span style="COLOR: #0000ff">=""</span><span style="COLOR: #ff0000">StaticSubMenuIndent</span><span style="COLOR: #0000ff">="0"</span><span style="COLOR: #ff0000">CssClass</span><span style="COLOR: #0000ff">="ms-topNavContainer"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">StaticMenuStyle</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">StaticMenuItemStyle</span><span style="COLOR: #ff0000">CssClass</span><span style="COLOR: #0000ff">="ms-topnav"</span><span style="COLOR: #ff0000">ItemSpacing</span><span style="COLOR: #0000ff">="0px"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">StaticSelectedStyle</span><span style="COLOR: #ff0000">CssClass</span><span style="COLOR: #0000ff">="ms-topnavselected"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">StaticHoverStyle</span><span style="COLOR: #ff0000">CssClass</span><span style="COLOR: #0000ff">="ms-topNavHover"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">DynamicMenuStyle</span><span style="COLOR: #ff0000">BackColor</span><span style="COLOR: #0000ff">="#F2F3F4"</span><span style="COLOR: #ff0000">BorderColor</span><span style="COLOR: #0000ff">="#A7B4CE"</span><span style="COLOR: #ff0000">BorderWidth</span><span style="COLOR: #0000ff">="1px"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">DynamicMenuItemStyle</span><span style="COLOR: #ff0000">CssClass</span><span style="COLOR: #0000ff">="ms-topNavFlyOuts"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">DynamicHoverStyle</span><span style="COLOR: #ff0000">CssClass</span><span style="COLOR: #0000ff">="ms-topNavFlyOutsHover"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">DynamicSelectedStyle</span><span style="COLOR: #ff0000">CssClass</span><span style="COLOR: #0000ff">="ms-topNavFlyOutsSelected"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">SharePoint:AspMenu</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SharePoint:DelegateControl</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="DelegateControl6"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">ControlId</span><span style="COLOR: #0000ff">="TopNavigationDataSource"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">Template_Controls</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:SiteMapDataSource</span><span style="COLOR: #ff0000">ShowStartingNode</span><span style="COLOR: #0000ff">="False"</span><span style="COLOR: #ff0000">SiteMapProvider</span><span style="COLOR: #0000ff">="SPNavigationProvider"</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="topSiteMap"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">StartingNodeUrl</span><span style="COLOR: #0000ff">="sid:1002"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">Template_Controls</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">SharePoint:DelegateControl</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #008000">&lt;!--
Site Actions Menu --&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SharePoint:SiteActions</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">AccessKey</span><span style="COLOR: #0000ff">="&lt;%$Resources:wss,tb_SiteActions_AK%&gt;"</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="SiteActionsMenuMain"</span><span style="COLOR: #ff0000">PrefixHtml</span><span style="COLOR: #0000ff">="&amp;lt;div&amp;gt;&amp;lt;div&amp;gt;"</span><span style="COLOR: #ff0000">SuffixHtml</span><span style="COLOR: #0000ff">="&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;"</span><span style="COLOR: #ff0000">MenuNotVisibleHtml</span><span style="COLOR: #0000ff">="&amp;amp;nbsp;"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">CustomTemplate</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SharePoint:FeatureMenuTemplate</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="FeatureMenuTemplate1"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">FeatureScope</span><span style="COLOR: #0000ff">="Site"</span><span style="COLOR: #ff0000">Location</span><span style="COLOR: #0000ff">="Microsoft.SharePoint.StandardMenu"</span><span style="COLOR: #ff0000">GroupId</span><span style="COLOR: #0000ff">="SiteActions"</span><span style="COLOR: #ff0000">UseShortId</span><span style="COLOR: #0000ff">="true"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SharePoint:MenuItemTemplate</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="MenuItem_Create"</span><span style="COLOR: #ff0000">Text</span><span style="COLOR: #0000ff">="&lt;%$Resources:wss,viewlsts_pagetitle_create%&gt;"</span><span style="COLOR: #ff0000">Description</span><span style="COLOR: #0000ff">="&lt;%$Resources:wss,siteactions_createdescription%&gt;"</span><span style="COLOR: #ff0000">ImageUrl</span><span style="COLOR: #0000ff">="/_layouts/images/Actionscreate.gif"</span><span style="COLOR: #ff0000">MenuGroupId</span><span style="COLOR: #0000ff">="100"</span><span style="COLOR: #ff0000">Sequence</span><span style="COLOR: #0000ff">="100"</span><span style="COLOR: #ff0000">UseShortId</span><span style="COLOR: #0000ff">="true"</span><span style="COLOR: #ff0000">ClientOnClickNavigateUrl</span><span style="COLOR: #0000ff">="~site/_layouts/create.aspx"</span><span style="COLOR: #ff0000">PermissionsString</span><span style="COLOR: #0000ff">="ManageLists,
ManageSubwebs"</span><span style="COLOR: #ff0000">PermissionMode</span><span style="COLOR: #0000ff">="Any"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SharePoint:MenuItemTemplate</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="MenuItem_EditPage"</span><span style="COLOR: #ff0000">Text</span><span style="COLOR: #0000ff">="&lt;%$Resources:wss,siteactions_editpage%&gt;"</span><span style="COLOR: #ff0000">Description</span><span style="COLOR: #0000ff">="&lt;%$Resources:wss,siteactions_editpagedescription%&gt;"</span><span style="COLOR: #ff0000">ImageUrl</span><span style="COLOR: #0000ff">="/_layouts/images/ActionsEditPage.gif"</span><span style="COLOR: #ff0000">MenuGroupId</span><span style="COLOR: #0000ff">="100"</span><span style="COLOR: #ff0000">Sequence</span><span style="COLOR: #0000ff">="200"</span><span style="COLOR: #ff0000">ClientOnClickNavigateUrl</span><span style="COLOR: #0000ff">="javascript:MSOLayout_ChangeLayoutMode(false);"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SharePoint:MenuItemTemplate</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="MenuItem_Settings"</span><span style="COLOR: #ff0000">Text</span><span style="COLOR: #0000ff">="&lt;%$Resources:wss,settings_pagetitle%&gt;"</span><span style="COLOR: #ff0000">Description</span><span style="COLOR: #0000ff">="&lt;%$Resources:wss,siteactions_sitesettingsdescription%&gt;"</span><span style="COLOR: #ff0000">ImageUrl</span><span style="COLOR: #0000ff">="/_layouts/images/ActionsSettings.gif"</span><span style="COLOR: #ff0000">MenuGroupId</span><span style="COLOR: #0000ff">="100"</span><span style="COLOR: #ff0000">Sequence</span><span style="COLOR: #0000ff">="300"</span><span style="COLOR: #ff0000">UseShortId</span><span style="COLOR: #0000ff">="true"</span><span style="COLOR: #ff0000">ClientOnClickNavigateUrl</span><span style="COLOR: #0000ff">="~site/_layouts/settings.aspx"</span><span style="COLOR: #ff0000">PermissionsString</span><span style="COLOR: #0000ff">="EnumeratePermissions,ManageWeb,ManageSubwebs,<br />
               AddAndCustomizePages,ApplyThemeAndBorder,ManageAlerts,ManageLists,ViewUsageData"</span><span style="COLOR: #ff0000">PermissionMode</span><span style="COLOR: #0000ff">="Any"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">SharePoint:FeatureMenuTemplate</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">CustomTemplate</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">SharePoint:SiteActions</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #008000">&lt;!---
--- --- End of Horizontal Top Navigation Bar --- --- ---&gt;</span><span style="COLOR: #008000">&lt;!---
--- --- Edit Consoles --- --- ---&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="WSSDesignConsole"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">wssuc:DesignModeConsole</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="IdDesignModeConsole"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="SPNavigation"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SharePoint:DelegateControl</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="DelegateControl7"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">ControlId</span><span style="COLOR: #0000ff">="PublishingConsole"</span><span style="COLOR: #ff0000">PrefixHtml</span><span style="COLOR: #0000ff">="&amp;lt;tr&amp;gt;&amp;lt;td
colspan=&amp;quot;4&amp;quot; id=&amp;quot;mpdmconsole&amp;quot; class=&amp;quot;ms-consolemptablerow&amp;quot;&amp;gt;"</span><span style="COLOR: #ff0000">SuffixHtml</span><span style="COLOR: #0000ff">="&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">SharePoint:DelegateControl</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #008000">&lt;!---
--- --- End of Edit Consoles --- --- ---&gt;</span><span style="COLOR: #008000">&lt;!---
--- --- Page Header --- --- ---&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderPageImage"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderTitleLeftBorder"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #008000">&lt;!---
Breadcrumb ---&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderTitleBreadcrumb"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:SiteMapPath</span><span style="COLOR: #ff0000">SiteMapProvider</span><span style="COLOR: #0000ff">="SPContentMapProvider"</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="ContentMap"</span><span style="COLOR: #ff0000">SkipLinkText</span><span style="COLOR: #0000ff">=""</span></p>
            <p>
              <span style="COLOR: #ff0000">NodeStyle-CssClass</span>
              <span style="COLOR: #0000ff">="ms-sitemapdirectional"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #ff0000">&amp;nbsp;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">asp:ContentPlaceHolder</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #008000">&lt;!---
Page Title - leave wrapped in table cell in order to show on sub pages and hide on
home page --&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">table</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">tr</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">td</span>
              <span style="COLOR: #ff0000">height</span>=<span style="COLOR: #ff0000">100</span>% <span style="COLOR: #ff0000">valign</span>=<span style="COLOR: #ff0000">top</span><span style="COLOR: #ff0000">ID</span>=<span style="COLOR: #ff0000">onetidPageTitle</span><span style="COLOR: #ff0000">class</span><span style="COLOR: #0000ff">="ms-pagetitle"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">h2</span><span style="COLOR: #ff0000">class</span><span style="COLOR: #0000ff">="ms-pagetitle"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderPageTitleInTitleArea"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">h2</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">td</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">tr</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">table</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #008000">&lt;!--
Mini Console - supplementary buttons for Site Map --&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderMiniConsole"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderTitleRightMargin"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderTitleAreaSeparator"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #008000">&lt;!---
--- --- End of Page Header --- --- ---&gt;</span><span style="COLOR: #008000">&lt;!---
--- --- Left Navigation Bar --- --- ---&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderLeftNavBarDataSource"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #008000">&lt;!--
Calendar --&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderCalendarNavigator"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderLeftNavBarTop"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #008000">&lt;!--
Quick Launch --&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderLeftNavBar"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #008000">&lt;!--
View All Site Content --&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">label</span><span style="COLOR: #ff0000">class</span><span style="COLOR: #0000ff">="ms-hidden"</span><span style="COLOR: #0000ff">&gt;&lt;</span><span style="COLOR: #800000">SharePoint:EncodedLiteral</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="EncodedLiteral4"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span></p>
            <p>
              <span style="COLOR: #ff0000">text</span>
              <span style="COLOR: #0000ff">="&lt;%$Resources:wss,quiklnch_pagetitle%&gt;"</span>
              <span style="COLOR: #ff0000">EncodeMethod</span>
              <span style="COLOR: #0000ff">="HtmlEncode"</span>
              <span style="COLOR: #0000ff">/&gt;&lt;/</span>
              <span style="COLOR: #800000">label</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">Sharepoint:SPSecurityTrimmedControl</span>
              <span style="COLOR: #ff0000">ID</span>
              <span style="COLOR: #0000ff">="SPSecurityTrimmedControl1"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #ff0000">PermissionsString</span>
              <span style="COLOR: #0000ff">="ViewFormPages"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">SharePoint:SPLinkButton</span>
              <span style="COLOR: #ff0000">id</span>
              <span style="COLOR: #0000ff">="idNavLinkViewAll"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #ff0000">NavigateUrl</span>
              <span style="COLOR: #0000ff">="~site/_layouts/viewlsts.aspx"</span>
            </p>
            <p>
              <span style="COLOR: #ff0000">Text</span>
              <span style="COLOR: #0000ff">="&lt;%$Resources:wss,quiklnch_allcontent%&gt;"</span>
              <span style="COLOR: #ff0000">AccessKey</span>
              <span style="COLOR: #0000ff">="&lt;%$Resources:wss,quiklnch_allcontent_AK%&gt;"</span>
              <span style="COLOR: #0000ff">/&gt;&lt;/</span>
              <span style="COLOR: #800000">div</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">SharePoint:SPSecurityTrimmedControl</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #008000">&lt;!--
Quick Launch Items --&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">Sharepoint:SPNavigationManager</span>
              <span style="COLOR: #ff0000">id</span>
              <span style="COLOR: #0000ff">="QuickLaunchNavigationManager"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #ff0000">QuickLaunchControlId</span>
              <span style="COLOR: #0000ff">="QuickLaunchMenu"</span>
              <span style="COLOR: #ff0000">ContainedControl</span>
              <span style="COLOR: #0000ff">="QuickLaunch"</span>
              <span style="COLOR: #ff0000">EnableViewState</span>
              <span style="COLOR: #0000ff">="false"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">SharePoint:DelegateControl</span>
              <span style="COLOR: #ff0000">ID</span>
              <span style="COLOR: #0000ff">="DelegateControl8"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #ff0000">ControlId</span>
              <span style="COLOR: #0000ff">="QuickLaunchDataSource"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">Template_Controls</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">asp:SiteMapDataSource</span>
              <span style="COLOR: #ff0000">SiteMapProvider</span>
              <span style="COLOR: #0000ff">="SPNavigationProvider"</span>
              <span style="COLOR: #ff0000">ShowStartingNode</span>
              <span style="COLOR: #0000ff">="False"</span>
              <span style="COLOR: #ff0000">id</span>
              <span style="COLOR: #0000ff">="QuickLaunchSiteMap"</span>
              <span style="COLOR: #ff0000">StartingNodeUrl</span>
              <span style="COLOR: #0000ff">="sid:1025"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">Template_Controls</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">SharePoint:DelegateControl</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">SharePoint:AspMenu</span>
              <span style="COLOR: #ff0000">id</span>
              <span style="COLOR: #0000ff">="QuickLaunchMenu"</span>
              <span style="COLOR: #ff0000">DataSourceId</span>
              <span style="COLOR: #0000ff">="QuickLaunchSiteMap"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #ff0000">Orientation</span>
              <span style="COLOR: #0000ff">="Vertical"</span>
              <span style="COLOR: #ff0000">StaticDisplayLevels</span>
              <span style="COLOR: #0000ff">="2"</span>
              <span style="COLOR: #ff0000">ItemWrap</span>
              <span style="COLOR: #0000ff">="true"</span>
              <span style="COLOR: #ff0000">MaximumDynamicDisplayLevels</span>
              <span style="COLOR: #0000ff">="0"</span>
              <span style="COLOR: #ff0000">StaticSubMenuIndent</span>
              <span style="COLOR: #0000ff">="0"</span>
              <span style="COLOR: #ff0000">SkipLinkText</span>
              <span style="COLOR: #0000ff">=""</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">LevelMenuItemStyles</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">asp:MenuItemStyle</span>
              <span style="COLOR: #ff0000">CssClass</span>
              <span style="COLOR: #0000ff">="ms-navheader"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">asp:MenuItemStyle</span>
              <span style="COLOR: #ff0000">CssClass</span>
              <span style="COLOR: #0000ff">="ms-navitem"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">LevelMenuItemStyles</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">LevelSubMenuStyles</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">asp:SubMenuStyle</span>
              <span style="COLOR: #ff0000">CssClass</span>
              <span style="COLOR: #0000ff">="ms-navSubMenu1"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">asp:SubMenuStyle</span>
              <span style="COLOR: #ff0000">CssClass</span>
              <span style="COLOR: #0000ff">="ms-navSubMenu2"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">LevelSubMenuStyles</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">LevelSelectedStyles</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">asp:MenuItemStyle</span>
              <span style="COLOR: #ff0000">CssClass</span>
              <span style="COLOR: #0000ff">="ms-selectednavheader"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">asp:MenuItemStyle</span>
              <span style="COLOR: #ff0000">CssClass</span>
              <span style="COLOR: #0000ff">="ms-selectednav"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">LevelSelectedStyles</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">SharePoint:AspMenu</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">Sharepoint:SPNavigationManager</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #008000">&lt;!---
Tree View ---&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">Sharepoint:SPNavigationManager</span>
              <span style="COLOR: #ff0000">id</span>
              <span style="COLOR: #0000ff">="TreeViewNavigationManager"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #ff0000">ContainedControl</span>
              <span style="COLOR: #0000ff">="TreeView"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">SharePoint:SPLinkButton</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #ff0000">NavigateUrl</span>
              <span style="COLOR: #0000ff">="~site/_layouts/viewlsts.aspx"</span>
              <span style="COLOR: #ff0000">id</span>
              <span style="COLOR: #0000ff">="idNavLinkSiteHierarchy"</span>
            </p>
            <p>
              <span style="COLOR: #ff0000">Text</span>
              <span style="COLOR: #0000ff">="&lt;%$Resources:wss,treeview_header%&gt;"</span>
              <span style="COLOR: #ff0000">AccessKey</span>
              <span style="COLOR: #0000ff">="&lt;%$Resources:wss,quiklnch_allcontent_AK%&gt;"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">SharePoint:SPHierarchyDataSourceControl</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #ff0000">id</span>
              <span style="COLOR: #0000ff">="TreeViewDataSource"</span>
              <span style="COLOR: #ff0000">RootContextObject</span>
              <span style="COLOR: #0000ff">="Web"</span>
              <span style="COLOR: #ff0000">IncludeDiscussionFolders</span>
              <span style="COLOR: #0000ff">="true"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">SharePoint:SPRememberScroll</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #ff0000">id</span>
              <span style="COLOR: #0000ff">="TreeViewRememberScroll" 
<br /></span>
              <span style="COLOR: #ff0000">         onscroll</span>
              <span style="COLOR: #0000ff">="javascript:_spRecordScrollPositions(this);"</span>
              <span style="COLOR: #ff0000">Style</span>
              <span style="COLOR: #0000ff">="overflow:
auto;height: 400px;width: 150px; "</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">Sharepoint:SPTreeView</span>
              <span style="COLOR: #ff0000">id</span>
              <span style="COLOR: #0000ff">="WebTreeView"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #ff0000">ShowLines</span>
              <span style="COLOR: #0000ff">="false"</span>
              <span style="COLOR: #ff0000">DataSourceId</span>
              <span style="COLOR: #0000ff">="TreeViewDataSource"</span>
              <span style="COLOR: #ff0000">ExpandDepth</span>
              <span style="COLOR: #0000ff">="0"</span>
              <span style="COLOR: #ff0000">SelectedNodeStyle-CssClass</span>
              <span style="COLOR: #0000ff">="ms-tvselected"</span>
              <span style="COLOR: #ff0000">NodeStyle-CssClass</span>
              <span style="COLOR: #0000ff">="ms-navitem"</span>
              <span style="COLOR: #ff0000">NodeStyle-HorizontalPadding</span>
              <span style="COLOR: #0000ff">="2"</span>
              <span style="COLOR: #ff0000">SkipLinkText</span>
              <span style="COLOR: #0000ff">=""</span>
              <span style="COLOR: #ff0000">NodeIndent</span>
              <span style="COLOR: #0000ff">="12"</span>
              <span style="COLOR: #ff0000">ExpandImageUrl</span>
              <span style="COLOR: #0000ff">="/_layouts/images/tvplus.gif"</span>
              <span style="COLOR: #ff0000">CollapseImageUrl</span>
              <span style="COLOR: #0000ff">="/_layouts/images/tvminus.gif"</span>
              <span style="COLOR: #ff0000">NoExpandImageUrl</span>
              <span style="COLOR: #0000ff">="/_layouts/images/tvblank.gif"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">Sharepoint:SPTreeView</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">Sharepoint:SPRememberScroll</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">Sharepoint:SPNavigationManager</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #008000">&lt;!--
Recycle Bin --&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">SharePoint:SPLinkButton</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #ff0000">NavigateUrl</span>
              <span style="COLOR: #0000ff">="~site/_layouts/recyclebin.aspx"</span>
            </p>
            <p>
              <span style="COLOR: #ff0000">id</span>
              <span style="COLOR: #0000ff">="idNavLinkRecycleBin"</span>
              <span style="COLOR: #ff0000">ImageUrl</span>
              <span style="COLOR: #0000ff">="/_layouts/images/recycbin.gif"</span>
            </p>
            <p>
              <span style="COLOR: #ff0000">Text</span>
              <span style="COLOR: #0000ff">="&lt;%$Resources:wss,StsDefault_RecycleBin%&gt;"</span>
              <span style="COLOR: #ff0000">PermissionsString</span>
              <span style="COLOR: #0000ff">="DeleteListItems"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">asp:ContentPlaceHolder</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #008000">&lt;!---
--- --- End of Left Navigation Bar --- --- ---&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">asp:ContentPlaceHolder</span>
              <span style="COLOR: #ff0000">id</span>
              <span style="COLOR: #0000ff">="PlaceHolderLeftActions"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">asp:ContentPlaceHolder</span>
              <span style="COLOR: #ff0000">id</span>
              <span style="COLOR: #0000ff">="PlaceHolderNavSpacer"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #0000ff">&gt;&lt;</span>
              <span style="COLOR: #800000">IMG</span>
              <span style="COLOR: #ff0000">SRC</span>
              <span style="COLOR: #0000ff">="/_layouts/images/blank.gif"</span>
            </p>
            <p>
              <span style="COLOR: #ff0000">width</span>=<span style="COLOR: #ff0000">138</span><span style="COLOR: #ff0000">height</span>=<span style="COLOR: #ff0000">1</span><span style="COLOR: #ff0000">alt</span><span style="COLOR: #0000ff">=""</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">asp:ContentPlaceholder</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderLeftNavBarBorder"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderBodyLeftBorder"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #008000">&lt;!---
--- --- Page Content --- --- ---&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">PlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="MSO_ContentDiv"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">table</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="MSO_ContentTable"</span><span style="COLOR: #ff0000">width</span>=<span style="COLOR: #ff0000">100</span>% <span style="COLOR: #ff0000">height</span><span style="COLOR: #0000ff">="100%"</span><span style="COLOR: #ff0000">border</span><span style="COLOR: #0000ff">="0"</span><span style="COLOR: #ff0000">cellspacing</span><span style="COLOR: #0000ff">="0"</span><span style="COLOR: #ff0000">cellpadding</span><span style="COLOR: #0000ff">="0"</span><br /><span style="COLOR: #ff0000">      class</span><span style="COLOR: #0000ff">="ms-propertysheet"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">tr</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">td</span><span style="COLOR: #ff0000">class</span><span style="COLOR: #0000ff">='ms-bodyareaframe'</span><span style="COLOR: #ff0000">valign</span><span style="COLOR: #0000ff">="top"</span><span style="COLOR: #ff0000">height</span><span style="COLOR: #0000ff">="100%"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">A</span><span style="COLOR: #ff0000">name</span><span style="COLOR: #0000ff">="mainContent"</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">A</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderPageDescription"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderMain"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">td</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">tr</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">table</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">PlaceHolder</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #008000">&lt;!---
--- --- End of Page Content --- --- ---&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderBodyRightMargin"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderFormDigest"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SharePoint:FormDigest</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="FormDigest1"</span><span style="COLOR: #ff0000">runat</span>=<span style="COLOR: #ff0000">server</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">input</span><span style="COLOR: #ff0000">type</span><span style="COLOR: #0000ff">="text"</span><span style="COLOR: #ff0000">name</span><span style="COLOR: #0000ff">="__spDummyText1"</span><span style="COLOR: #ff0000">style</span><span style="COLOR: #0000ff">="display:none;"</span><span style="COLOR: #ff0000">size</span>=<span style="COLOR: #ff0000">1</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">input</span><span style="COLOR: #ff0000">type</span><span style="COLOR: #0000ff">="text"</span><span style="COLOR: #ff0000">name</span><span style="COLOR: #0000ff">="__spDummyText2"</span><span style="COLOR: #ff0000">style</span><span style="COLOR: #0000ff">="display:none;"</span><span style="COLOR: #ff0000">size</span>=<span style="COLOR: #ff0000">1</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">form</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderUtilityContent"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderBodyAreaClass"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:ContentPlaceHolder</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PlaceHolderTitleAreaClass"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #008000">&lt;!---
--- --- Hidden Placeholders --- --- ---&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:Panel</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="Panel1"</span><span style="COLOR: #ff0000">visible</span><span style="COLOR: #0000ff">="false"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #008000">&lt;!--
Place unused Content Placeholders here --&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">asp:Panel</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #008000">&lt;!---
--- --- End of Hidden Placeholders --- --- ---&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">BODY</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">HTML</span><span style="COLOR: #0000ff">&gt;</span></p>
          </pre>
        </div>
        <p>
blank.master.cs
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 359px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 336px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #0000ff">using</span> System; <span style="COLOR: #0000ff">using</span> System.Data; <span style="COLOR: #0000ff">using</span> System.Configuration; <span style="COLOR: #0000ff">using</span> System.Collections; <span style="COLOR: #0000ff">using</span> System.Web; <span style="COLOR: #0000ff">using</span> System.Web.Security; <span style="COLOR: #0000ff">using</span> System.Web.UI; <span style="COLOR: #0000ff">using</span> System.Web.UI.WebControls; <span style="COLOR: #0000ff">using</span> System.Web.UI.WebControls.WebParts; <span style="COLOR: #0000ff">using</span> System.Web.UI.HtmlControls; <span style="COLOR: #0000ff">namespace</span> MOSSFeatures.MasterPages
{ <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">class</span> blank
: System.Web.UI.MasterPage { <span style="COLOR: #0000ff">protected</span><span style="COLOR: #0000ff">void</span> Page_Load(<span style="COLOR: #0000ff">object</span> sender,
EventArgs e) { } } }</pre>
        </div>
        <p>
 
</p>
        <p>
Now for the Page Layout, create two files in PageLayouts named customPageLayout.aspx
and customPageLayout.aspx.cs
</p>
        <p>
customPageLayout.aspx
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 508px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 485px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <p>
              <span style="BACKGROUND-COLOR: #ffff00">&lt;%@ Page Language="C#" Inherits="MOSSFeatures.PageLayouts.customPageLayout"
meta:progid="SharePoint.WebPartPage.Document" %&gt;</span>
              <span style="BACKGROUND-COLOR: #ffff00">&lt;%@
Register Tagprefix="SharePointWebControls" Namespace="Microsoft.SharePoint.WebControls"
Assembly="Microsoft.SharePoint, 
<br />
Version=12.0.0.0, </span>
            </p>
            <p>
              <span style="BACKGROUND-COLOR: #ffff00">Culture=neutral, PublicKeyToken=71e9bce111e9429c"
%&gt;</span>
            </p>
            <p>
              <span style="BACKGROUND-COLOR: #ffff00">&lt;%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages"
Assembly="Microsoft.SharePoint, 
<br />
Version=12.0.0.0, </span>
            </p>
            <p>
              <span style="BACKGROUND-COLOR: #ffff00">Culture=neutral, PublicKeyToken=71e9bce111e9429c"
%&gt;</span>
            </p>
            <p>
              <span style="BACKGROUND-COLOR: #ffff00">&lt;%@ Register Tagprefix="PublishingWebControls"
Namespace="Microsoft.SharePoint.Publishing.WebControls" 
<br />
Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, </span>
            </p>
            <p>
              <span style="BACKGROUND-COLOR: #ffff00">Culture=neutral, PublicKeyToken=71e9bce111e9429c"
%&gt;</span>
            </p>
            <p>
              <span style="BACKGROUND-COLOR: #ffff00">&lt;%@ Register Tagprefix="PublishingNavigation"
Namespace="Microsoft.SharePoint.Publishing.Navigation" 
<br />
Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, </span>
            </p>
            <p>
              <span style="BACKGROUND-COLOR: #ffff00">C</span>
              <span style="BACKGROUND-COLOR: #ffff00">ulture=neutral,
PublicKeyToken=71e9bce111e9429c" %&gt;</span>
              <span style="BACKGROUND-COLOR: #ffff00">&lt;%@
Register TagPrefix="radE" Namespace="Telerik.SharePoint.FieldEditor" 
<br />
Assembly="RadEditorSharePoint,Version=4.1.0.0,Culture=neutral,PublicKeyToken=1f131a624888eeed"%&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">asp:Content</span>
              <span style="COLOR: #ff0000">ContentPlaceholderID</span>
              <span style="COLOR: #0000ff">="PlaceHolderPageTitle"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">SharePointWebControls:FieldValue</span>
              <span style="COLOR: #ff0000">id</span>
              <span style="COLOR: #0000ff">="PageTitle"</span>
              <span style="COLOR: #ff0000">FieldName</span>
              <span style="COLOR: #0000ff">="Title"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">asp:Content</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">asp:Content</span>
              <span style="COLOR: #ff0000">ContentPlaceholderID</span>
              <span style="COLOR: #0000ff">="PlaceHolderMain"</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">br</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">radE:RadHtmlField</span>
              <span style="COLOR: #ff0000">runat</span>
              <span style="COLOR: #0000ff">="server"</span>
              <span style="COLOR: #ff0000">id</span>
              <span style="COLOR: #0000ff">="content"</span>
              <span style="COLOR: #ff0000">FieldName</span>
              <span style="COLOR: #0000ff">="content"</span>
              <span style="COLOR: #0000ff">&gt;&lt;/</span>
              <span style="COLOR: #800000">radE:RadHtmlField</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">asp:Content</span>
              <span style="COLOR: #0000ff">&gt;</span>
            </p>
          </pre>
        </div>
        <p>
If you're not using the Telerik editor, you can use the out-of-box rich-text editor,
but the Telerik editor is free - use it!  I'm also assuming you've got it installed
with this solution...
</p>
        <p>
customPageLayout.aspx.cs
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 279px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 256px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #0000ff">using</span> System; <span style="COLOR: #0000ff">using</span> System.Collections.Generic; <span style="COLOR: #0000ff">using</span> System.Text; <span style="COLOR: #0000ff">using</span> Microsoft.SharePoint.Publishing; <span style="COLOR: #0000ff">using</span> System.Web.UI.WebControls; <span style="COLOR: #0000ff">namespace</span> MOSSFeatures.PageLayouts
{ <span style="COLOR: #0000ff">public</span><span style="COLOR: #0000ff">class</span> customPageLayout
: PublishingLayoutPage { <span style="COLOR: #0000ff">protected</span><span style="COLOR: #0000ff">void</span> Page_Load(<span style="COLOR: #0000ff">object</span> sender,
EventArgs e) { } } }</pre>
        </div>
        <p>
Now that we've got the master page and page layout, we need to provision it to the
master page gallery on the server when the feature is activated.  This is accomplished
by using a <a href="http://msdn2.microsoft.com/en-us/library/ms453137.aspx" target="_blank">provisioning
module</a>.
</p>
        <p>
In the same directory as the content type and column definition files, create another
xml file named ProvisionedFiles.xml
</p>
        <p>
ProvisionedFiles.xml
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 435px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 412px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <p>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">Elements</span>
              <span style="COLOR: #ff0000">xmlns</span>
              <span style="COLOR: #0000ff">="http://schemas.microsoft.com/sharepoint/"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">Module</span>
              <span style="COLOR: #ff0000">Name</span>
              <span style="COLOR: #0000ff">="CustomPageLayouts"</span>
              <span style="COLOR: #ff0000">RootWebOnly</span>
              <span style="COLOR: #0000ff">="TRUE"</span>
              <span style="COLOR: #ff0000">Path</span>
              <span style="COLOR: #0000ff">="PageLayouts"</span>
              <span style="COLOR: #ff0000">Url</span>
              <span style="COLOR: #0000ff">="_catalogs/masterpage"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">File</span>
              <span style="COLOR: #ff0000">Url</span>
              <span style="COLOR: #0000ff">="customPageLayout.aspx"</span>
              <span style="COLOR: #ff0000">Type</span>
              <span style="COLOR: #0000ff">="GhostableInLibrary"</span>
              <span style="COLOR: #ff0000">IgnoreIfAlreadyExists</span>
              <span style="COLOR: #0000ff">="false"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">Property</span>
              <span style="COLOR: #ff0000">Name</span>
              <span style="COLOR: #0000ff">="Title"</span>
              <span style="COLOR: #ff0000">Value</span>
              <span style="COLOR: #0000ff">="$Resources:CustomResources,PageLayouts_handbookHome_Title;"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">Property</span>
              <span style="COLOR: #ff0000">Name</span>
              <span style="COLOR: #0000ff">="ContentType"</span>
              <span style="COLOR: #ff0000">Value</span>
              <span style="COLOR: #0000ff">="$Resources:cmscore,contenttype_pagelayout_name;"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">Property</span>
              <span style="COLOR: #ff0000">Name</span>
              <span style="COLOR: #0000ff">="PublishingAssociatedContentType"</span>
            </p>
            <p>
              <span style="COLOR: #ff0000">Value</span>
              <span style="COLOR: #0000ff">=";#$Resources:CustomResources,ContentTypes_CustomPublishingContentType_Title;;</span>
            </p>
            <p>
              <span style="COLOR: #0000ff">#0x01010007FF3E057FA8AB4AA42FCB67B453FFC100E214EEE741181F4E9F7ACC43278EE811002D7E961EBCD042C6A40B97F107579F70;#"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">File</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">Module</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">Module</span>
              <span style="COLOR: #ff0000">Name</span>
              <span style="COLOR: #0000ff">="CustomMasterPages"</span>
              <span style="COLOR: #ff0000">Url</span>
              <span style="COLOR: #0000ff">="_catalogs/masterpage"</span>
              <span style="COLOR: #ff0000">Path</span>
              <span style="COLOR: #0000ff">="MasterPages"</span>
              <span style="COLOR: #ff0000">RootWebOnly</span>
              <span style="COLOR: #0000ff">="TRUE"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">File</span>
              <span style="COLOR: #ff0000">Url</span>
              <span style="COLOR: #0000ff">="blank.master"</span>
              <span style="COLOR: #ff0000">Type</span>
              <span style="COLOR: #0000ff">="GhostableInLibrary"</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">Property</span>
              <span style="COLOR: #ff0000">Name</span>
              <span style="COLOR: #0000ff">="ContentType"</span>
              <span style="COLOR: #ff0000">Value</span>
              <span style="COLOR: #0000ff">="$Resources:cmscore,contenttype_masterpage_name;"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">Property</span>
              <span style="COLOR: #ff0000">Name</span>
              <span style="COLOR: #0000ff">="PublishingPreviewImage"</span>
            </p>
            <p>
              <span style="COLOR: #ff0000">Value</span>
              <span style="COLOR: #0000ff">="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview
Images/BlueBand.png, </span>
            </p>
            <p>
              <span style="COLOR: #0000ff">~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview
Images/BlueBand.png"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">Property</span>
              <span style="COLOR: #ff0000">Name</span>
              <span style="COLOR: #0000ff">="MasterPageDescription"</span>
              <span style="COLOR: #ff0000">Value</span>
              <span style="COLOR: #0000ff">="a
blank master page used for testing purposes"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">File</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">Module</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">Elements</span>
              <span style="COLOR: #0000ff">&gt;</span>
            </p>
          </pre>
        </div>
        <p>
So - that's it for the basic elements needed for the custom publishing items. 
Now we just need the Feature.xml file for the publishing items.  Create it in
the root of the feature next to the content type and column definition files.
</p>
        <p>
Feature.xml
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 167px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 144px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">Feature</span>
            <span style="COLOR: #ff0000">xmlns</span>
            <span style="COLOR: #0000ff">="http://schemas.microsoft.com/sharepoint/"</span>
            <span style="COLOR: #ff0000">Title</span>
            <span style="COLOR: #0000ff">="Custom
Publishing Feature"</span>
            <span style="COLOR: #ff0000">Scope</span>
            <span style="COLOR: #0000ff">="Site"</span>
            <span style="COLOR: #ff0000">Id</span>
            <span style="COLOR: #0000ff">="ENTER_NEW_GUID"</span>
            <span style="COLOR: #ff0000">AlwaysForceInstall</span>
            <span style="COLOR: #0000ff">="true"</span>
            <span style="COLOR: #ff0000">ActivateOnDefault</span>
            <span style="COLOR: #0000ff">="false"</span>
            <span style="COLOR: #ff0000">Version</span>
            <span style="COLOR: #0000ff">="1.0.0.0"</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">ElementManifests</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">ElementManifest</span>
            <span style="COLOR: #ff0000">Location</span>
            <span style="COLOR: #0000ff">="CustomPublishingColumns.xml"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">ElementManifest</span>
            <span style="COLOR: #ff0000">Location</span>
            <span style="COLOR: #0000ff">="CustomPublishingContentType.xml"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">ElementManifest</span>
            <span style="COLOR: #ff0000">Location</span>
            <span style="COLOR: #0000ff">="ProvisionedFiles.xml"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">ElementManifests</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">Feature</span>
            <span style="COLOR: #0000ff">&gt;</span>
          </pre>
        </div>
        <p>
 
</p>
        <p>
Now, we need to update the ddf, manifest, and Deploy/Update/Remove cmd files for the
solution deployment
</p>
        <p>
The ddf file should now look like this:
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 692px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 669px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">.OPTION EXPLICIT ;generate errors
.Set CabinetNameTemplate=MOSSFeatures.wsp
.Set DiskDirectoryTemplate=CDROM ;All cabinets go into a single directory
.Set CompressionType=MSZIP ;** All files are compressed in cabinet files
.Set UniqueFiles="ON"
.Set Cabinet=on
.Set DiskDirectory1=

;Here's the way it works...
;FileToCopyFromInProject NewFileInCABFile

;manifest file
manifest.xml manifest.xml

;assemblies
bin\debug\MOSSFeatures.dll MOSSFeatures.dll


;features
;FeatureName\feature.xml FeatureName\feature.xml
;FeatureName\elements.xml FeatureName\elements.xml

;CustomResources
TEMPLATE\FEATURES\CustomResources\Feature.xml CustomResources\Feature.xml
TEMPLATE\FEATURES\CustomResources\CustomResources.en-US.resx CustomResources\CustomResources.en-US.resx
TEMPLATE\FEATURES\CustomResources\CustomResources.resx CustomResources\CustomResources.resx
TEMPLATE\FEATURES\CustomResources\CustomResources.en-US.resx RESOURCES\CustomResources.en-US.resx
TEMPLATE\FEATURES\CustomResources\CustomResources.resx RESOURCES\CustomResources.resx

;CustomPublishingLayouts
TEMPLATE\FEATURES\CustomPublishingLayouts\Feature.xml CustomPublishingLayouts\Feature.xml
TEMPLATE\FEATURES\CustomPublishingLayouts\ProvisionedFiles.xml CustomPublishingLayouts\ProvisionedFiles.xml
TEMPLATE\FEATURES\CustomPublishingLayouts\CustomPublishingColumns.xml CustomPublishingLayouts\CustomPublishingColumns.xml
TEMPLATE\FEATURES\CustomPublishingLayouts\CustomPublishingContentType.xml CustomPublishingLayouts\CustomPublishingContentType.xml

;Publishing Layouts Page Layouts
TEMPLATE\FEATURES\CustomPublishingLayouts\PageLayouts\customPageLayout.aspx 
<br />
   FEATURES\CustomPublishingLayouts\PageLayouts\customPageLayout.aspx
;Publishing Layouts Master Pages TEMPLATE\FEATURES\CustomPublishingLayouts\MasterPages\blank.master
FEATURES\CustomPublishingLayouts\MasterPages\blank.master </pre>
        </div>
        <p>
Here's the updated manifest.xml file:
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 615px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 592px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <p>
              <span style="COLOR: #0000ff">&lt;?</span>
              <span style="COLOR: #800000">xml</span>
              <span style="COLOR: #ff0000">version</span>
              <span style="COLOR: #0000ff">="1.0"</span>
              <span style="COLOR: #ff0000">encoding</span>
              <span style="COLOR: #0000ff">="utf-8"</span> ?<span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">Solution</span><span style="COLOR: #ff0000">SolutionId</span><span style="COLOR: #0000ff">="ENTER_SOLUTION_ID_GUID_HERE"</span><span style="COLOR: #ff0000">xmlns</span><span style="COLOR: #0000ff">="http://schemas.microsoft.com/sharepoint/"</span><span style="COLOR: #ff0000">ResetWebServer</span><span style="COLOR: #0000ff">="TRUE"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">Assemblies</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">Assembly</span><span style="COLOR: #ff0000">DeploymentTarget</span><span style="COLOR: #0000ff">="GlobalAssemblyCache"</span><span style="COLOR: #ff0000">Location</span><span style="COLOR: #0000ff">="MOSSFeatures.dll"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SafeControls</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">SafeControl</span><span style="COLOR: #ff0000">Safe</span><span style="COLOR: #0000ff">="True"</span><span style="COLOR: #ff0000">Assembly</span><span style="COLOR: #0000ff">="MOSSFeatures,
Version=1.0.0.0, Culture=neutral, </span></p>
            <p>
              <span style="COLOR: #0000ff">PublicKeyToken=ENTER_YOUR_PUBLIC_KEY_HERE"</span>
              <span style="COLOR: #ff0000">Namespace</span>
              <span style="COLOR: #0000ff">="MOSSFeatures"</span>
              <span style="COLOR: #ff0000">TypeName</span>
              <span style="COLOR: #0000ff">="*"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">SafeControls</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">Assembly</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">Assemblies</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">Resources</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">Resource</span>
              <span style="COLOR: #ff0000">Location</span>
              <span style="COLOR: #0000ff">="CustomResources\CustomResources.en-US.resx"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">Resource</span>
              <span style="COLOR: #ff0000">Location</span>
              <span style="COLOR: #0000ff">="CustomResources\CustomResources.resx"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">Resources</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">FeatureManifests</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">FeatureManifest</span>
              <span style="COLOR: #ff0000">Location</span>
              <span style="COLOR: #0000ff">="CustomResources\Feature.xml"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">FeatureManifest</span>
              <span style="COLOR: #ff0000">Location</span>
              <span style="COLOR: #0000ff">="CustomPublishingLayouts\Feature.xml"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">FeatureManifests</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">TemplateFiles</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #008000">&lt;!--
Page Layouts--&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">TemplateFile</span>
              <span style="COLOR: #ff0000">Location</span>
              <span style="COLOR: #0000ff">="FEATURES\CustomPublishingLayouts\PageLayouts\customPageLayout.aspx"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #008000">&lt;!--
Master Pages --&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">TemplateFile</span>
              <span style="COLOR: #ff0000">Location</span>
              <span style="COLOR: #0000ff">="FEATURES\CustomPublishingLayouts\MasterPages\blank.master"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">TemplateFiles</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">RootFiles</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">RootFile</span>
              <span style="COLOR: #ff0000">Location</span>
              <span style="COLOR: #0000ff">="Resources\CustomResources.en-US.resx"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;</span>
              <span style="COLOR: #800000">RootFile</span>
              <span style="COLOR: #ff0000">Location</span>
              <span style="COLOR: #0000ff">="Resources\CustomResources.resx"</span>
              <span style="COLOR: #0000ff">/&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">RootFiles</span>
              <span style="COLOR: #0000ff">&gt;</span>
              <span style="COLOR: #0000ff">&lt;/</span>
              <span style="COLOR: #800000">Solution</span>
              <span style="COLOR: #0000ff">&gt;</span>
            </p>
          </pre>
        </div>
        <p>
 
</p>
        <p>
Deploy.cmd
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 791px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 768px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">@ECHO OFF

SET SITE_URL="http://mossdevelopment.richfinn.net"
SET SOLUTION_NAME=MOSSFeatures.wsp

REM ----- Deactivate the feature(s) -----
stsadm -o deactivatefeature -name CustomResources -url %SITE_URL% -force
stsadm -o deactivatefeature -name CustomPublishingLayouts -url %SITE_URL% -force

REM ----- Remove the features and solution -----
stsadm -o retractsolution -name %SOLUTION_NAME% -immediate -url %SITE_URL%


ECHO .
ECHO .
ECHO -------------------------------------------------------------------------------------------
ECHO Verify that the correct solutions have been completly retracted and then press ENTER
ECHO -------------------------------------------------------------------------------------------
ECHO .

pause

ECHO ON

REM ----- Delete the solution -----
stsadm -o deletesolution -name %SOLUTION_NAME%

REM ----- Add and depoly the solution -----
stsadm -o addsolution -filename %SOLUTION_NAME%
stsadm -o deploysolution -n %SOLUTION_NAME% -immediate -allowgacdeployment -allowCasPolicies -url %SITE_URL%


ECHO OFF
ECHO .
ECHO .
ECHO -------------------------------------------------------------------------------------------
ECHO Solution deployment complete, press ENTER to activate features, if any
ECHO -------------------------------------------------------------------------------------------

pause

ECHO ON
REM ----- Active features -----
stsadm -o activatefeature -name CustomResources -url %SITE_URL% -force
stsadm -o activatefeature -name CustomPublishingLayouts -url %SITE_URL% -force

REM ----- Remove the following comment if features are present
REM pause</pre>
        </div>
        <p>
 
</p>
        <p>
Update.cmd
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 567px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 544px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">cls
ECHO OFF

SET SITE_URL="http://mossdevelopment.richfinn.net"
SET SOLUTION_NAME=MOSSFeatures.wsp

REM ECHO .
REM ECHO .
REM ECHO -------------------------------------------------------------------------------------------
REM ECHO Verify that the correct solutions have been completly retracted and then press ENTER
REM ECHO -------------------------------------------------------------------------------------------
REM ECHO .

pause

ECHO ON

stsadm -o upgradesolution -name %SOLUTION_NAME% -filename %SOLUTION_NAME% -immediate -allowgacdeployment

ECHO OFF
ECHO .
ECHO .
ECHO -------------------------------------------------------------------------------------------
ECHO Solution deployment complete, press ENTER to activate features, if any
ECHO -------------------------------------------------------------------------------------------

pause

ECHO ON
REM ----- Active features -----
stsadm -o activatefeature -name CustomResources -url %SITE_URL% -force
stsadm -o activatefeature -name CustomPublishingLayouts -url %SITE_URL% -force

pause</pre>
        </div>
        <p>
 
</p>
        <p>
Remove.cmd
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 423px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 400px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">ECHO OFF

SET SITE_URL="http://mossdevelopment.richfinn.net"
SET SOLUTION_NAME=MOSSFeatures.wsp

REM ----------- Remove the features ------------------
stsadm -o deactivatefeature -name CustomResources -url %SITE_URL% -force
stsadm -o deactivatefeature -name CustomPublishingLayouts -url %SITE_URL% -force


REM -----------  Retract the solution ----------------
stsadm -o retractsolution -name %SOLUTION_NAME% -immediate -url %SITE_URL%

pause


REM ----------- Execute Time Jobs --------------------

REM stsadm execadmsvcjobs

REM ----------- Delete the solution -----------------

stsadm -o deletesolution -name %SOLUTION_NAME%

pause</pre>
        </div>
        <p>
 
</p>
        <p>
Now, deploying the solution will provision the new master page, page layout, and content
type.  Pages can now be created using the new layouts, as well.  When you
need to update the page layouts, just run the Update.cmd file, and the solution will
be updated with the changes.
</p>
        <p>
This was a fairly basic solution for deploying custom publishing items, but you can
see how powerful and extensible it is, and leveraging resource files is pretty cool,
too.  Next I hope to show how you can create a custom site definition to provision
sites using the custom page layouts rather than the out of box page layout.
</p>
        <p>
Here's the source project for this solution: <a href="http://blog.richfinn.net/blog/downloads/MOSSFeatures_CustomPublishingFeature.zip" target="_blank">MOSSFeatures_CustomPublishingFeature.zip</a></p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=0e3bc28f-dffb-4ef3-b767-0fd52d96b587" />
      </body>
      <title>Creating a WSS Solution to deploy custom publishing items</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,0e3bc28f-dffb-4ef3-b767-0fd52d96b587.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/07/23/CreatingAWSSSolutionToDeployCustomPublishingItems.aspx</link>
      <pubDate>Mon, 23 Jul 2007 22:05:37 GMT</pubDate>
      <description>&lt;p&gt;
Most of the documentation I've seen out there around creating publishing items such
as master pages and page layouts has developers using SharePoint Designer to create
them.&amp;nbsp; This is ok, but it only&amp;nbsp;gets you so far, and&amp;nbsp;I see problems
with the approach when you require more robust development.&amp;nbsp; Also, when it came
to using SharePoint Designer, I always&amp;nbsp;had the question - 'how do you develop
a master page or page layout locally in development, and deploy it to a completely
different farm?'
&lt;/p&gt;
&lt;p&gt;
As my past couple of posts might point to, I've been working a lot with&amp;nbsp;WSS Solutions
lately, and I'm currently working with a&amp;nbsp;client who's doing a migration from
MCMS 2002&amp;nbsp;to MOSS.&amp;nbsp; The solution is completely custom, and needs to be as
robust as possible.&amp;nbsp; Part of the project has been&amp;nbsp;documenting the&amp;nbsp;best
possible&amp;nbsp;configuration for MOSS CMS development, so I figured what I've found
would be something good to share.
&lt;/p&gt;
&lt;p&gt;
Essentially, there's two features in the solution.&amp;nbsp; One feature for custom resource
files (RESX) and another&amp;nbsp;feature for all the custom publishing items.&amp;nbsp; I'm
using the full &lt;a href="http://www.telerik.com/products/sharepoint/radeditor.aspx" target=_blank&gt;Telerik
Editor for MOSS&lt;/a&gt;&amp;nbsp;- which seems to have all the kinks worked out from the earlier
versions - along with some other &lt;a href="http://www.telerik.com/products/aspnet/overview.aspx" target=_blank&gt;Telerik
ASP.NET controls&lt;/a&gt;.&amp;nbsp; I've heard that Andrew Connell is working with Telerik
on releasing a whitepaper at the end of this month that will provide the needed guidance
for leveraging best practices in implementing all of the Telerik ASP.NET components
into MOSS and WSS v3, and I'll most likely touch on it in the future, as well.
&lt;/p&gt;
&lt;p&gt;
I don't want to really cover the details of the MOSS resource feature in this post,
but Mikhail Dikov has a great one on creating &lt;a href="http://www.mikhaildikov.com/2007/03/sharepoint-resources-types-use-and_2163.html" target=_blank&gt;custom
resource files in MOSS&lt;/a&gt;, so make sure to check it out.&amp;nbsp; I will, however, give
you what you need to get it up and running.
&lt;/p&gt;
&lt;p&gt;
So - let's start from scratch!&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
Create a new Class Library project in Visual Studio 2005:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/Creatingasolutiontodeploycustompublishin_7E28/image_1.png" atomicselection="true"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=154 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/Creatingasolutiontodeploycustompublishin_7E28/image_thumb_1.png" width=240 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Once it's created, delete Class1.cs.
&lt;/p&gt;
&lt;p&gt;
Add a reference to Windows SharePoint Services, Microsoft Content Publishing and Management,
and System.Web.
&lt;/p&gt;
&lt;p&gt;
I really like to mirror the installation directory on the server, so I normally set
up a folder structure in&amp;nbsp;my projects to match&amp;nbsp;what the file structure on
the server looks like, along with the folders that correspond with the locations of
the files I'm going to add..
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/Creatingasolutiontodeploycustompublishin_7E28/image_4.png" atomicselection="true"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=240 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/Creatingasolutiontodeploycustompublishin_7E28/image_thumb_4.png" width=210 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
The first thing I'm going to do is create the resource feature along with the needed&amp;nbsp;feature
receivers to deploy the resource files to the App_GlobalResources directory of the
web application it's installed on.
&lt;/p&gt;
&lt;p&gt;
This is code I mainly obtained&amp;nbsp;from Mikhail's post, but here's how you set up
the resource feature:
&lt;/p&gt;
&lt;p&gt;
If you set up the folder structure just like I did in the image above, create a class
in the 'Objects' directory called DeployCustomResourceJob.cs, with the following code:
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 1396px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 1373px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Collections.Generic; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Text; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; Microsoft.SharePoint.Administration; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; Microsoft.SharePoint.Utilities; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Diagnostics; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.IO; &lt;span style="COLOR: #0000ff"&gt;namespace&lt;/span&gt; MOSSFeatures.Objects
{ &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;class&lt;/span&gt; DeployCustomResourcesJob
: SPJobDefinition { &lt;span style="COLOR: #cc6633"&gt;#region&lt;/span&gt; Fields [Persisted] &lt;span style="COLOR: #0000ff"&gt;private&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; _SourcePath; &lt;span style="COLOR: #0000ff"&gt;private&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; _SomethignElse; &lt;span style="COLOR: #cc6633"&gt;#endregion&lt;/span&gt; &lt;span style="COLOR: #cc6633"&gt;#region&lt;/span&gt; Constructors &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; DeployCustomResourcesJob()
: &lt;span style="COLOR: #0000ff"&gt;base&lt;/span&gt;() { } &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; DeployCustomResourcesJob(&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; jobName,
SPWebApplication webApp, &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; featureName) : &lt;span style="COLOR: #0000ff"&gt;base&lt;/span&gt;(jobName,
webApp, &lt;span style="COLOR: #0000ff"&gt;null&lt;/span&gt;, SPJobLockType.Job) { &lt;span style="COLOR: #008000"&gt;//get
the path to the feature directory&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;._SourcePath
= SPUtility.GetGenericSetupPath(&lt;span style="COLOR: #006080"&gt;"Template"&lt;/span&gt;); &lt;span style="COLOR: #008000"&gt;//uncomment
the following line (commented to fix a bug in livewriter)&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;//
+ "\\FEATURES\\" + featureName;&lt;/span&gt; } &lt;span style="COLOR: #cc6633"&gt;#endregion&lt;/span&gt; &lt;span style="COLOR: #cc6633"&gt;#region&lt;/span&gt; Job
Handling &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; Execute(Guid
targetInstanceId) { &lt;span style="COLOR: #0000ff"&gt;try&lt;/span&gt; { &lt;span style="COLOR: #008000"&gt;//get
the web application for the current job - I'm pretty sure this is the same as calling
'base.WebApplication'&lt;/span&gt; SPWebApplication webApp = &lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;.Parent &lt;span style="COLOR: #0000ff"&gt;as&lt;/span&gt; SPWebApplication; &lt;span style="COLOR: #0000ff"&gt;foreach&lt;/span&gt; (SPUrlZone
zone &lt;span style="COLOR: #0000ff"&gt;in&lt;/span&gt; webApp.IisSettings.Keys) { &lt;span style="COLOR: #008000"&gt;//the
settings of the IIS application to update&lt;/span&gt; SPIisSettings settings = webApp.IisSettings[zone]; &lt;span style="COLOR: #008000"&gt;//determine
the destination path&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; destPath =
Path.Combine(settings.Path.ToString(), &lt;span style="COLOR: #006080"&gt;"App_GlobalResources"&lt;/span&gt;); &lt;span style="COLOR: #008000"&gt;//get
the RESX files from the feature directory&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;[]
filePaths = Directory.GetFiles(&lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;._SourcePath, &lt;span style="COLOR: #006080"&gt;"*.resx"&lt;/span&gt;); &lt;span style="COLOR: #008000"&gt;//copy/overwrite
the RESX files into the App_GlobalResource directory&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;foreach&lt;/span&gt; (&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; filePath &lt;span style="COLOR: #0000ff"&gt;in&lt;/span&gt; filePaths)
{ &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; fileName = Path.GetFileName(filePath);&lt;span style="COLOR: #008000"&gt;//get
the filename of the file to copy&lt;/span&gt; File.Copy(filePath, Path.Combine(destPath,
fileName), &lt;span style="COLOR: #0000ff"&gt;true&lt;/span&gt;);&lt;span style="COLOR: #008000"&gt;//copy
it over the file in the Resource directory&lt;/span&gt; } } } &lt;span style="COLOR: #0000ff"&gt;catch&lt;/span&gt; (Exception
ex) { Debug.WriteLine(&lt;span style="COLOR: #006080"&gt;"Failed to copy global resource"&lt;/span&gt;);
Debug.WriteLine(ex); &lt;span style="COLOR: #0000ff"&gt;throw&lt;/span&gt;; } } &lt;span style="COLOR: #cc6633"&gt;#endregion&lt;/span&gt; }
} &lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Next - create a class in the 'FeatureReceivers' directory called CustomFeatureReceiver.cs.&amp;nbsp;
This is the&amp;nbsp;feature receiver&amp;nbsp;which will move the resource files once the
feature is activated.&amp;nbsp; Here's the code:
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 1256px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 1232px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;
&lt;p&gt;
&lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Collections.Generic; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Text; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; Microsoft.SharePoint; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; Microsoft.SharePoint.Administration; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; MOSSFeatures.Objects; &lt;span style="COLOR: #0000ff"&gt;namespace&lt;/span&gt; MOSSFeatures.FeatureReceivers
{ &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;class&lt;/span&gt; CustomResourceReceiver
: SPFeatureReceiver { &lt;span style="COLOR: #cc6633"&gt;#region&lt;/span&gt; Constants &lt;span style="COLOR: #0000ff"&gt;const&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; JOB_TITLE
= &lt;span style="COLOR: #006080"&gt;"Deploy Custom Resources"&lt;/span&gt;; &lt;span style="COLOR: #0000ff"&gt;const&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; JOB_NAME
= &lt;span style="COLOR: #006080"&gt;"job-deploy-custom-resources"&lt;/span&gt;; &lt;span style="COLOR: #cc6633"&gt;#endregion&lt;/span&gt; &lt;span style="COLOR: #cc6633"&gt;#region&lt;/span&gt; Events &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; FeatureActivated(SPFeatureReceiverProperties
properties) { SPWeb web = properties.Feature.Parent &lt;span style="COLOR: #0000ff"&gt;as&lt;/span&gt; SPWeb; &lt;span style="COLOR: #008000"&gt;//check
for an exisiting instance of the job - if we find it, delete it&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;foreach&lt;/span&gt; (SPJobDefinition
job &lt;span style="COLOR: #0000ff"&gt;in&lt;/span&gt; web.Site.WebApplication.JobDefinitions)
{ &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (job.Name == JOB_NAME &amp;amp;&amp;amp; job.WebApplication.Name
== web.Site.WebApplication.Name) { job.Delete(); &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; something
= &lt;span style="COLOR: #006080"&gt;"nothing"&lt;/span&gt;; } } &lt;span style="COLOR: #008000"&gt;//create
a new deployment job&lt;/span&gt; DeployCustomResourcesJob deployJob = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; DeployCustomResourcesJob(JOB_NAME, 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;web.Site.WebApplication, 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;properties.Definition.DisplayName);
deployJob.Title = JOB_TITLE; deployJob.Schedule = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; SPOneTimeSchedule(DateTime.Now);
deployJob.Update(); } &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; FeatureDeactivating(SPFeatureReceiverProperties
properties) { SPWeb web = properties.Feature.Parent &lt;span style="COLOR: #0000ff"&gt;as&lt;/span&gt; SPWeb; &lt;span style="COLOR: #008000"&gt;//delete
the job, if there is one&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;foreach&lt;/span&gt; (SPJobDefinition
job &lt;span style="COLOR: #0000ff"&gt;in&lt;/span&gt; web.Site.WebApplication.JobDefinitions)
{ &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (job.Name == JOB_NAME &amp;amp;&amp;amp; job.WebApplication.Name
== 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;web.Site.WebApplication.Name)
{ job.Delete(); } } &lt;span style="COLOR: #008000"&gt;//we could delete the resource files
here if we want to&lt;/span&gt; } &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; FeatureInstalled(SPFeatureReceiverProperties
properties) { &lt;span style="COLOR: #008000"&gt;//throw new Exception("The method or operation
is not implemented.");&lt;/span&gt; } &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; FeatureUninstalling(SPFeatureReceiverProperties
properties) { &lt;span style="COLOR: #008000"&gt;//throw new Exception("The method or operation
is not implemented.");&lt;/span&gt; } &lt;span style="COLOR: #cc6633"&gt;#endregion&lt;/span&gt; } } 
&lt;/p&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Create two RESX files in the TEMPLATE\FEATURES\CustomResources project directory -
CustomResources.en-US.resx, and CustomResources.resx.&amp;nbsp; &lt;a href="http://www.mikhaildikov.com/2007/03/sharepoint-resources-types-use-and_2163.html" target=_blank&gt;According
to Mikhail&lt;/a&gt;, one resource file is used during the provisioning process, and the
other is used at run-time,&amp;nbsp;but the rule I use is&amp;nbsp;that the entries in both
resource files should match.&amp;nbsp; These two files&amp;nbsp;will contains contain the
resource strings used in the custom publishing feature, as well as anywhere else you
might need them.
&lt;/p&gt;
&lt;p&gt;
Create the Feature.xml file&amp;nbsp;for the CustomResources feature.
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 247px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 224px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Feature&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Title&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="CustomResourceFeature"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="AC3CB30C-905F-433f-A635-DA13291BCC08"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Description&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Deploys
localization resources used for MOSSFeatures to the App_GlobalResources directory"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Version&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="1.0.0.0"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Scope&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Site"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="http://schemas.microsoft.com/sharepoint/"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ReceiverAssembly&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="MOSSFeatures,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=ENTER_YOUR_PUBLIC_KEY_HERE"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ReceiverClass&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="MOSSFeatures.FeatureReceivers.CustomResourceReceiver"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;AlwaysForceInstall&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="true"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ActivateOnDefault&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="false"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;ElementManifests&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;ElementFile&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="CustomResources.en-US.resx"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;ElementFile&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="CustomResources.resx"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;ElementManifests&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Feature&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
There - that's all you need to implement custom resource files in MOSS.&amp;nbsp; Now
we need to create the WSS Solution file (WSP) to deploy them.
&lt;/p&gt;
&lt;p&gt;
At the root of the project, create a new file called CreateMOSSFeatures_WSP.ddf.&amp;nbsp;
This ddf file is used by makecab so it knows where to place files inside the cabinet
(WSP) file.
&lt;/p&gt;
&lt;p&gt;
Enter the following code in the ddf file
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 490px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 467px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;
&lt;p&gt;
.OPTION EXPLICIT ;generate errors .Set CabinetNameTemplate=MOSSFeatures.wsp .Set DiskDirectoryTemplate=CDROM
;All cabinets go into a single directory .Set CompressionType=MSZIP ;** All files
are compressed in cabinet files .Set UniqueFiles="ON" .Set Cabinet=on .Set DiskDirectory1=
;Here's the way it works... ;FileToCopyFromInProject NewFileInCABFile ;manifest file
manifest.xml manifest.xml ;assemblies bin\debug\MOSSFeatures.dll MOSSFeatures.dll
;features ;FeatureName\feature.xml FeatureName\feature.xml ;FeatureName\elements.xml
FeatureName\elements.xml ;CustomResources TEMPLATE\FEATURES\CustomResources\Feature.xml
CustomResources\Feature.xml TEMPLATE\FEATURES\CustomResources\CustomResources.en-US.resx
CustomResources\CustomResources.en-US.resx TEMPLATE\FEATURES\CustomResources\CustomResources.resx
CustomResources\CustomResources.resx
&lt;/p&gt;
&lt;p&gt;
TEMPLATE\FEATURES\CustomResources\CustomResources.en-US.resx RESOURCES\CustomResources.en-US.resx&lt;br&gt;
TEMPLATE\FEATURES\CustomResources\CustomResources.resx RESOURCES\CustomResources.resx
&lt;/p&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Now, we need to create the manifest file for the WSS Solution.&amp;nbsp; The manifest
file will&amp;nbsp;tell the solution receiver&amp;nbsp;in the MOSS farm where to put the files
located&amp;nbsp;inside the WSP cabinet once the solution is installed.&amp;nbsp;&amp;nbsp;It
will also tell the receiver to place the assembly into the GAC, and deploy the code&amp;nbsp;across
all servers in the farm.
&lt;/p&gt;
&lt;p&gt;
At the root of the project file, create a file named manifest.xml with the following
code:
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 439px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 416px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;
&lt;p&gt;
&lt;span style="COLOR: #0000ff"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;xml&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;version&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="1.0"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;encoding&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="utf-8"&lt;/span&gt; ?&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Solution&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;SolutionId&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ENTER_SOLUTION_ID_GUID_HERE"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="http://schemas.microsoft.com/sharepoint/"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ResetWebServer&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="TRUE"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assemblies&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assembly&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;DeploymentTarget&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="GlobalAssemblyCache"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="MOSSFeatures.dll"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControls&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControl&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Safe&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="True"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Assembly&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="MOSSFeatures,
Version=1.0.0.0, Culture=neutral, 
&lt;br&gt;
&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PublicKeyToken=ENTER_YOUR_PUBLIC_KEY_HERE"&lt;/span&gt; 
&lt;br&gt;
&lt;span style="COLOR: #ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Namespace&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="MOSSFeatures"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;TypeName&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="*"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControls&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assembly&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assemblies&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Resources&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Resource&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="CustomResources\CustomResources.en-US.resx"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Resource&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="CustomResources\CustomResources.resx"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Resources&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;FeatureManifests&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;FeatureManifest&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="CustomResources\Feature.xml"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;FeatureManifests&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;RootFiles&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;RootFile&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Resources\CustomResources.en-US.resx"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;RootFile&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Resources\CustomResources.resx"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;RootFiles&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Solution&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
Now that we have the ddf and the manifest files created, we can set up a post-build
event in Visual Studio that will run makecab and create the WSP file for us.&amp;nbsp;
To add the post build event, right-click on the project in the Visual Studio Solution
Explorer and choose 'Properties'
&lt;/p&gt;
&lt;p&gt;
Enter the following lines in the Post-build event command line text box:
&lt;/p&gt;
&lt;p&gt;
cd $(ProjectDir)&lt;br&gt;
makecab /f CreateMOSSFeatures_WSP.ddf 
&lt;p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/Creatingasolutiontodeploycustompublishin_7E28/image_5.png" atomicselection="true"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=105 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/Creatingasolutiontodeploycustompublishin_7E28/image_thumb_5.png" width=240 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
We also need to make sure that we &lt;a href="http://msdn2.microsoft.com/en-us/library/xc31ft41.aspx" target=_blank&gt;sign
the assembly&lt;/a&gt;, so when the solution is deployed, it can be added to the GAC.
&lt;/p&gt;
&lt;p&gt;
For ease in deployment, as I stated in a previous post, it's a good idea to create
some command files to handle the solution deployment, update, and removal.&amp;nbsp; Now's
a good time to add the directory which contains stsadm to the&amp;nbsp;Path Windows System
Variable&amp;nbsp;if you haven't done it already, and&amp;nbsp;doing so will allow you to
run stsadm from any directory.&amp;nbsp; To set this up, right-click on My Computer, and
choose Properties.&amp;nbsp; On the Advanced tab, click the Environment Variables button,
and&amp;nbsp;append ';C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN'
to the end of the Path variable.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/Creatingasolutiontodeploycustompublishin_7E28/image_7.png" atomicselection="true"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=240 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/Creatingasolutiontodeploycustompublishin_7E28/image_thumb_7.png" width=216 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Now, you can create the cmd files and refer to stsadm inside them.&amp;nbsp; There's three
files: Deploy.cmd, Update.cmd, and Remove.cmd, rather than explain what's going on
in theme in exhausting detail, here's the code:
&lt;/p&gt;
&lt;p&gt;
Deploy.cmd
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 759px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 736px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;@ECHO OFF

SET SITE_URL="http://mossdevelopment.richfinn.net"
SET SOLUTION_NAME=MOSSFeatures.wsp

REM ----- Deactivate the feature(s) -----
stsadm -o deactivatefeature -name CustomResources -url %SITE_URL% -force

REM ----- Remove the features and solution -----
stsadm -o retractsolution -name %SOLUTION_NAME% -immediate -url %SITE_URL%


ECHO .
ECHO .
ECHO -------------------------------------------------------------------------------------------
ECHO Verify that the correct solutions have been completly retracted and then press ENTER
ECHO -------------------------------------------------------------------------------------------
ECHO .

pause

ECHO ON

REM ----- Delete the solution -----
stsadm -o deletesolution -name %SOLUTION_NAME%

REM ----- Add and depoly the solution -----
stsadm -o addsolution -filename %SOLUTION_NAME%
stsadm -o deploysolution -n %SOLUTION_NAME% -immediate -allowgacdeployment -allowCasPolicies -url %SITE_URL%


ECHO OFF
ECHO .
ECHO .
ECHO -------------------------------------------------------------------------------------------
ECHO Solution deployment complete, press ENTER to activate features, if any
ECHO -------------------------------------------------------------------------------------------

pause

ECHO ON
REM ----- Active features -----
stsadm -o activatefeature -name CustomResources -url %SITE_URL% -force

REM ----- Remove the following comment if features are present
REM pause&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Update.cmd
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 551px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 528px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;cls
ECHO OFF

SET SITE_URL="http://mossdevelopment.richfinn.net"
SET SOLUTION_NAME=MOSSFeatures.wsp

REM ECHO .
REM ECHO .
REM ECHO -------------------------------------------------------------------------------------------
REM ECHO Verify that the correct solutions have been completly retracted and then press ENTER
REM ECHO -------------------------------------------------------------------------------------------
REM ECHO .

pause

ECHO ON

stsadm -o upgradesolution -name %SOLUTION_NAME% -filename %SOLUTION_NAME% -immediate -allowgacdeployment

ECHO OFF
ECHO .
ECHO .
ECHO -------------------------------------------------------------------------------------------
ECHO Solution deployment complete, press ENTER to activate features, if any
ECHO -------------------------------------------------------------------------------------------

pause

ECHO ON
REM ----- Active features -----
stsadm -o activatefeature -name CustomResources -url %SITE_URL% -force

pause&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Remove.cmd
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 407px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 384px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;ECHO OFF

SET SITE_URL="http://mossdevelopment.richfinn.net"
SET SOLUTION_NAME=MOSSFeatures.wsp

REM ----------- Remove the features ------------------
stsadm -o deactivatefeature -name CustomResources -url %SITE_URL% -force


REM -----------  Retract the solution ----------------
stsadm -o retractsolution -name %SOLUTION_NAME% -immediate -url %SITE_URL%

pause


REM ----------- Execute Time Jobs --------------------

REM stsadm execadmsvcjobs

REM ----------- Delete the solution -----------------

stsadm -o deletesolution -name %SOLUTION_NAME%

pause&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;br&gt;
&lt;em&gt;&lt;font color=#ff0000&gt;&lt;strong&gt;*** IMPORTANT ***&lt;/strong&gt;&lt;/font&gt;&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
Finally, here's a tricky part.&amp;nbsp; You need to&amp;nbsp;manually add your assembly to
the &amp;lt;assemblies&amp;gt; block of each web.config file in your farm, or the code will
bomb.&amp;nbsp; Should track in the schema like this:
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 167px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 144px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;configuration&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;system.web&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;compilation&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;batch&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="false"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;debug&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="false"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;assemblies&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;add&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;assembly&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="MOSSFeatures,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=YOUR_PUBLIC_KEY"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;assemblies&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;compilation&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;system.web&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;configuration&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
OK! Now that the resources are out there, we can create the custom publishing feature
using the resources just like you see in the out-of-box publishing layouts feature
that came with MOSS.&amp;nbsp; Creating this feature is kind of a long process, but it
really explains solution development in MOSS being that it has so many different components.&amp;nbsp;
I feel that if you can get this, you can really do anything in the platform.
&lt;/p&gt;
&lt;p&gt;
When it comes to web content publishing, there's three primary things needed, a content
type, a master page, and a page layout.&amp;nbsp; The content type defines the different
columns - or in MCMS lingo 'content placeholders' - and custom meta-data which will
be used in the page layouts (content templates) you'll have in your publishing site.&amp;nbsp;
The master page is the&amp;nbsp;frame of the page - usually the top and left sides of
the page - and is the container for the page layouts.&amp;nbsp; Finally, the page layouts
contains the physical content placeholders where the content editors enter their text,
images, links, etc...
&lt;/p&gt;
&lt;p&gt;
Just like with page layout development in SharePoint Designer, the first thing we
need is the content type.&amp;nbsp; Content types are defined by columns, so we set the
columns up first in a file at the root FEATURES\CustomPublishingLayouts called CustomPublishingColumns.xml.&amp;nbsp;
I want to keep this example simple and clean, so I'm only going to create a single
column for content.&amp;nbsp; Here's the code:&lt;br&gt;
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 119px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 96px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;
&lt;p&gt;
&lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Elements&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="http://schemas.microsoft.com/sharepoint/"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Field&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ENTER_CUSTOM_GUID_HERE"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="content"&lt;/span&gt; 
&lt;br&gt;
&lt;span style="COLOR: #ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Group&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="$Resources:CustomResources,ColumnGroup_CustomPublishingColumns_Title;"&lt;/span&gt; 
&lt;br&gt;
&lt;span style="COLOR: #ff0000"&gt;DisplayName&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="$Resources:CustomResources,column_content_displayname;"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Type&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="HTML"&lt;/span&gt; 
&lt;br&gt;
&lt;span style="COLOR: #ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Required&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="FALSE"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Sealed&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="TRUE"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;RichText&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="TRUE"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;RichTextMode&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="FullHtml"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Field&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Elements&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
You can see how I'm referencing the entries in the custom resource files created previously.
(The entries are already in the resource files in the downloadable code)
&lt;/p&gt;
&lt;p&gt;
Now that we've got the content placeholder column created, we can create the content
type.&amp;nbsp; In the same directory as CustomPublishingColumns.xml, create another xml
file called CustomPublishingContentType.xml with the following code:
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 231px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 160px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;
&lt;p&gt;
&lt;span style="COLOR: #008000"&gt;&amp;lt;!-- _lcid="1033" _version="12.0.4518" _dal="1" --&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!--
_LocalBinding --&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Elements&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="http://schemas.microsoft.com/sharepoint/"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;ContentType&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="0x01010007FF3E057FA8AB4AA42FCB67B453FFC100E214EEE741181F4E9F7ACC43278EE811002D7E961EBCD042C6A40B97F107579F70"&lt;/span&gt; 
&lt;br&gt;
&lt;span style="COLOR: #ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Group&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="$Resources:cmscore,group_pagelayoutcontenttypes;"&lt;/span&gt; 
&lt;br&gt;
&lt;span style="COLOR: #ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="$Resources:CustomResources,ContentTypes_CustomPublishingContentType_Title;"&lt;/span&gt; 
&lt;br&gt;
&lt;span style="COLOR: #ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Description&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="$Resources:CustomResources,ContentTypes_CustomPublishingContentType_Description;"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;FieldRefs&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;FieldRef&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ENTER_SAME_GUID_AS_COLUMN"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="$Resources:CustomResources,column_content_displayname;"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;FieldRefs&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;DocumentTemplate&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;TargetName&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="/_layouts/CreatePage.aspx"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;ContentType&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Elements&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
You can see the custom content type ID here.&amp;nbsp; Chris O'Brian has a nice post on &lt;a href="http://sharepointnutsandbolts.blogspot.com/2007/04/deploying-content-types-as-feature.html" target=_blank&gt;deploying
content types as features&lt;/a&gt; along with how to create a custom content type ID.&amp;nbsp;
Long story short, a custom content type id is created by taking the content type id
of the content type you're inheriting from, adding two zeros, and then adding a new
guid with no dashes or brackets.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Now, we need to create the master page.&amp;nbsp; Heather Solomon has a great &lt;a href="http://www.heathersolomon.com/blog/archive/2007/01/26/6153.aspx" target=_blank&gt;blank
master page&lt;/a&gt; which I like using as a starting place for my master page development.&amp;nbsp;
Make sure you download it, or you can just get it from the solution I've uploaded
(link's at the bottom of this post)
&lt;/p&gt;
&lt;p&gt;
Add two new folders to the CustomPublishingLayouts feature - MasterPages, and PageLayouts.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/Creatingasolutiontodeploycustompublishin_7E28/image_8.png" atomicselection="true"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=110 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/Creatingasolutiontodeploycustompublishin_7E28/image_thumb_8.png" width=234 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
In the MasterPages directory, create&amp;nbsp;two files named blank.master, and blank.master.cs.&amp;nbsp;
Yes, that's right, code behind for the master page - something you don't get in Designer.&amp;nbsp;
One thing you'll notice is that you don't get the greatest visual studio support for
the files, so they appear side-by-side rahter than in&amp;nbsp;the nice hierarchy you
see in a custom asp.net web application project.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/Creatingasolutiontodeploycustompublishin_7E28/image_9.png" atomicselection="true"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=48 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/Creatingasolutiontodeploycustompublishin_7E28/image_thumb_9.png" width=159 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Another thing - make sure you don't use the CodeBehind attribute in the page directive
of the ASPX page.&amp;nbsp; Note sure why, but it doesn't compile if it's there.&amp;nbsp;
Just use the Inherits attribute and you'll be fine...&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
blank.master (from &lt;a href="http://www.heathersolomon.com/blog/archive/2007/01/26/6153.aspx" target=_blank&gt;Heather
Solomon&lt;/a&gt;)
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 6656px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 6617px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;
&lt;p&gt;
&lt;span style="BACKGROUND-COLOR: #ffff00"&gt;&amp;lt;%@Master language="C#" AutoEventWireup="true"
Inherits="MOSSFeatures.MasterPages.blank"%&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;DOCTYPE&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;html&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;PUBLIC&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;"-//W3C//DTD
HTML 4.01 Transitional//EN"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;"http://www.w3.org/TR/html4/loose.dtd"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: #ffff00"&gt;&amp;lt;%@
Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint,
Version=12.0.0.0, &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="BACKGROUND-COLOR: #ffff00"&gt;Culture=neutral, PublicKeyToken=71e9bce111e9429c"
%&amp;gt;&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="BACKGROUND-COLOR: #ffff00"&gt;&amp;lt;%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities"
Assembly="Microsoft.SharePoint, Version=12.0.0.0, &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="BACKGROUND-COLOR: #ffff00"&gt;Culture=neutral, PublicKeyToken=71e9bce111e9429c"
%&amp;gt;&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="BACKGROUND-COLOR: #ffff00"&gt;&amp;lt;%@ Import Namespace="Microsoft.SharePoint"
%&amp;gt;&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: #ffff00"&gt;&amp;lt;%@ Import Namespace="Microsoft.SharePoint.ApplicationPages"
%&amp;gt;&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: #ffff00"&gt;&amp;lt;%@ Register Tagprefix="WebPartPages"
Namespace="Microsoft.SharePoint.WebPartPages" 
&lt;br&gt;
Assembly="Microsoft.SharePoint, Version=12.0.0.0, &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="BACKGROUND-COLOR: #ffff00"&gt;Culture=neutral, PublicKeyToken=71e9bce111e9429c"
%&amp;gt;&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: #ffff00"&gt;&amp;lt;%@ Register TagPrefix="wssuc"
TagName="Welcome" src="~/_controltemplates/Welcome.ascx" 
&lt;br&gt;
%&amp;gt;&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: #ffff00"&gt;&amp;lt;%@ Register TagPrefix="wssuc"
TagName="DesignModeConsole" src="~/_controltemplates/DesignModeConsole.ascx" 
&lt;br&gt;
&lt;br&gt;
%&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;HTML&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="HTML1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;dir&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;lt;%$Resources:wss,multipages_direction_dir_value%&amp;gt;"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; 
&lt;br&gt;
&lt;span style="COLOR: #ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;xmlns:o&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="urn:schemas-microsoft-com:office:office"&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: #ff0000"&gt;__expr-val-dir&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ltr"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;HEAD&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="HEAD1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;META&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="GENERATOR"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Content&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Microsoft
SharePoint"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;META&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="progid"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Content&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="SharePoint.WebPartPage.Document"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;META&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;HTTP-EQUIV&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Content-Type"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;CONTENT&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="text/html;
charset=utf-8"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;META&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;HTTP-EQUIV&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Expires"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;content&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="0"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:RobotsMetaTag&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="RobotsMetaTag1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Title&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;=&lt;span style="COLOR: #ff0000"&gt;onetidTitle&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;=&lt;span style="COLOR: #ff0000"&gt;PlaceHolderPageTitle&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Title&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:Theme&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Theme1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:ScriptLink&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ScriptLink1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;language&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="javascript"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="core.js"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Defer&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="true"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:CustomJSUrl&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="CustomJSUrl1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:SoapDiscoveryLink&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="SoapDiscoveryLink1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:CssLink&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="CssLink1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;style&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;type&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="text/css"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; /****
Overriding styles for branding ~ located in the CSSSTyleLibrary ****/ @import url(/CSSStyleLibrary/name.css); &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;style&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderAdditionalPageHead"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:DelegateControl&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="DelegateControl1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ControlId&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="AdditionalPageHead"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;AllowMultipleControls&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="true"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;HEAD&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;BODY&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;scroll&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="yes"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;onload&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="javascript:if
(typeof(_spBodyOnLoadWrapper) != 'undefined') _spBodyOnLoadWrapper();"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;form&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Form1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;onsubmit&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="return
_spFormOnSubmitWrapper();"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;WebPartPages:SPWebPartManager&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="m"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!---
--- --- Top Toolbar --- --- ---&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderGlobalNavigation"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;span&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="TurnOnAccessibility"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;style&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="display:none"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;a&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;href&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="#"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;class&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ms-skip"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;onclick&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="SetIsAccessibilityFeatureEnabled(true);UpdateAccessibilityUI();return
false;"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:EncodedLiteral&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="EncodedLiteral1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;text&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;lt;%$Resources:wss,master_turnonaccessibility%&amp;gt;"&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: #ff0000"&gt;EncodeMethod&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="HtmlEncode"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;a&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;span&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;A&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="A1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;href&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="javascript:;"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;onclick&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="javascript:this.href='#mainContent';"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;class&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ms-skip"&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: #ff0000"&gt;AccessKey&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;lt;%$Resources:wss,maincontent_accesskey%&amp;gt;"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:EncodedLiteral&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="EncodedLiteral2"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;text&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;lt;%$Resources:wss,mainContentLink%&amp;gt;"&lt;/span&gt; 
&lt;br&gt;
&lt;span style="COLOR: #ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EncodeMethod&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="HtmlEncode"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;A&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;span&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="TurnOffAccessibility"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;style&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="display:none"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;a&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;href&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="#"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;class&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ms-acclink"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;onclick&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="SetIsAccessibilityFeatureEnabled(false);UpdateAccessibilityUI();return
false;"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:EncodedLiteral&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="EncodedLiteral3"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;text&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;lt;%$Resources:wss,master_turnoffaccessibility%&amp;gt;"&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: #ff0000"&gt;EncodeMethod&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="HtmlEncode"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;a&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;span&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!--
Global Breadcrumb --&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderGlobalNavigationSiteMap"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:SiteMapPath&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;SiteMapProvider&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="SPSiteMapProvider"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="GlobalNavigationSiteMap"&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: #ff0000"&gt;RenderCurrentNodeAsLink&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="true"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;SkipLinkText&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;=""&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;NodeStyle-CssClass&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ms-sitemapdirectional"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!--
Variations, Welcome Menu, My Site, My Links, Help --&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:DelegateControl&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="DelegateControl2"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ControlId&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="GlobalSiteLink0"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;wssuc:Welcome&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="IdWelcome"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;EnableViewState&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="false"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;wssuc:Welcome&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:DelegateControl&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="DelegateControl3"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ControlId&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="GlobalSiteLink1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Scope&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Farm"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:DelegateControl&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="DelegateControl4"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ControlId&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="GlobalSiteLink2"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Scope&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Farm"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;a&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;href&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="javascript:TopHelpButtonClick('NavBarHelpHome')"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;AccessKey&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;lt;%$Resources:wss,multipages_helplink_accesskey%&amp;gt;"&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="TopHelpLink"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;title&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;lt;%$Resources:wss,multipages_helplinkalt_text%&amp;gt;"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;img&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Img1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;align&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;='absmiddle'&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;border&lt;/span&gt;=&lt;span style="COLOR: #ff0000"&gt;0&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;src&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="/_layouts/images/helpicon.gif"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;alt&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;lt;%$Resources:wss,multipages_helplinkalt_text%&amp;gt;"&lt;/span&gt; 
&lt;br&gt;
&lt;span style="COLOR: #ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;a&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!---
--- --- End of Top Toolbar --- --- ---&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!---
--- --- Site Header --- --- ---&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:SiteLogoImage&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="onetidHeadbnnr0"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;LogoImageUrl&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="/_layouts/images/titlegraphic.gif"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderSiteName"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:SPLinkButton&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;NavigateUrl&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="~site/"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="onetidProjectPropertyTitle"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:ProjectProperty&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ProjectProperty1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Property&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Title"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:SPLinkButton&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!---
--- --- End of Site Header --- --- ---&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!---
--- --- Search --- --- ---&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderSearchArea"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:DelegateControl&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="DelegateControl5"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ControlId&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="SmallSearchInputBox"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!---
--- --- End of Search --- --- ---&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!---
--- --- Horizontal Top Navigation Bar --- --- ---&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderTopNavBar"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderHorizontalNav"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:AspMenu&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="TopNavigationMenu"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;DataSourceID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="topSiteMap"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;EnableViewState&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="false"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;AccessKey&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;lt;%$Resources:wss,navigation_accesskey%&amp;gt;"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Orientation&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Horizontal"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;StaticDisplayLevels&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="2"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;MaximumDynamicDisplayLevels&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;DynamicHorizontalOffset&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="0"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;StaticPopoutImageUrl&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="/_layouts/images/menudark.gif"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;StaticPopoutImageTextFormatString&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;=""&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;DynamicHoverStyle-BackColor&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="#CBE3F0"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;SkipLinkText&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;=""&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;StaticSubMenuIndent&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="0"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;CssClass&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ms-topNavContainer"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;StaticMenuStyle&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;StaticMenuItemStyle&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;CssClass&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ms-topnav"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ItemSpacing&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="0px"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;StaticSelectedStyle&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;CssClass&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ms-topnavselected"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;StaticHoverStyle&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;CssClass&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ms-topNavHover"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;DynamicMenuStyle&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;BackColor&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="#F2F3F4"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;BorderColor&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="#A7B4CE"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;BorderWidth&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="1px"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;DynamicMenuItemStyle&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;CssClass&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ms-topNavFlyOuts"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;DynamicHoverStyle&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;CssClass&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ms-topNavFlyOutsHover"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;DynamicSelectedStyle&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;CssClass&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ms-topNavFlyOutsSelected"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:AspMenu&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:DelegateControl&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="DelegateControl6"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ControlId&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="TopNavigationDataSource"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Template_Controls&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:SiteMapDataSource&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ShowStartingNode&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="False"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;SiteMapProvider&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="SPNavigationProvider"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="topSiteMap"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;StartingNodeUrl&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="sid:1002"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Template_Controls&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:DelegateControl&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!--
Site Actions Menu --&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:SiteActions&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;AccessKey&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;lt;%$Resources:wss,tb_SiteActions_AK%&amp;gt;"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="SiteActionsMenuMain"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;PrefixHtml&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;amp;lt;div&amp;amp;gt;&amp;amp;lt;div&amp;amp;gt;"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;SuffixHtml&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;amp;lt;/div&amp;amp;gt;&amp;amp;lt;/div&amp;amp;gt;"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;MenuNotVisibleHtml&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;amp;amp;nbsp;"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;CustomTemplate&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:FeatureMenuTemplate&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="FeatureMenuTemplate1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;FeatureScope&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Site"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Microsoft.SharePoint.StandardMenu"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;GroupId&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="SiteActions"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;UseShortId&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="true"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:MenuItemTemplate&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="MenuItem_Create"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;lt;%$Resources:wss,viewlsts_pagetitle_create%&amp;gt;"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Description&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;lt;%$Resources:wss,siteactions_createdescription%&amp;gt;"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ImageUrl&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="/_layouts/images/Actionscreate.gif"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;MenuGroupId&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="100"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Sequence&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="100"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;UseShortId&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="true"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ClientOnClickNavigateUrl&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="~site/_layouts/create.aspx"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;PermissionsString&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ManageLists,
ManageSubwebs"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;PermissionMode&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Any"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:MenuItemTemplate&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="MenuItem_EditPage"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;lt;%$Resources:wss,siteactions_editpage%&amp;gt;"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Description&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;lt;%$Resources:wss,siteactions_editpagedescription%&amp;gt;"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ImageUrl&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="/_layouts/images/ActionsEditPage.gif"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;MenuGroupId&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="100"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Sequence&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="200"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ClientOnClickNavigateUrl&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="javascript:MSOLayout_ChangeLayoutMode(false);"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:MenuItemTemplate&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="MenuItem_Settings"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;lt;%$Resources:wss,settings_pagetitle%&amp;gt;"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Description&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;lt;%$Resources:wss,siteactions_sitesettingsdescription%&amp;gt;"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ImageUrl&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="/_layouts/images/ActionsSettings.gif"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;MenuGroupId&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="100"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Sequence&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="300"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;UseShortId&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="true"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ClientOnClickNavigateUrl&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="~site/_layouts/settings.aspx"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;PermissionsString&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="EnumeratePermissions,ManageWeb,ManageSubwebs,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAndCustomizePages,ApplyThemeAndBorder,ManageAlerts,ManageLists,ViewUsageData"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;PermissionMode&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Any"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:FeatureMenuTemplate&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;CustomTemplate&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:SiteActions&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!---
--- --- End of Horizontal Top Navigation Bar --- --- ---&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!---
--- --- Edit Consoles --- --- ---&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="WSSDesignConsole"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;wssuc:DesignModeConsole&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="IdDesignModeConsole"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="SPNavigation"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:DelegateControl&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="DelegateControl7"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ControlId&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PublishingConsole"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;PrefixHtml&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;amp;lt;tr&amp;amp;gt;&amp;amp;lt;td
colspan=&amp;amp;quot;4&amp;amp;quot; id=&amp;amp;quot;mpdmconsole&amp;amp;quot; class=&amp;amp;quot;ms-consolemptablerow&amp;amp;quot;&amp;amp;gt;"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;SuffixHtml&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;amp;lt;/td&amp;amp;gt;&amp;amp;lt;/tr&amp;amp;gt;"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:DelegateControl&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!---
--- --- End of Edit Consoles --- --- ---&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!---
--- --- Page Header --- --- ---&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderPageImage"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderTitleLeftBorder"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!---
Breadcrumb ---&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderTitleBreadcrumb"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:SiteMapPath&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;SiteMapProvider&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="SPContentMapProvider"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ContentMap"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;SkipLinkText&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;=""&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: #ff0000"&gt;NodeStyle-CssClass&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ms-sitemapdirectional"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;&amp;amp;nbsp;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!---
Page Title - leave wrapped in table cell in order to show on sub pages and hide on
home page --&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;table&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;tr&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;td&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;height&lt;/span&gt;=&lt;span style="COLOR: #ff0000"&gt;100&lt;/span&gt;% &lt;span style="COLOR: #ff0000"&gt;valign&lt;/span&gt;=&lt;span style="COLOR: #ff0000"&gt;top&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;=&lt;span style="COLOR: #ff0000"&gt;onetidPageTitle&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;class&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ms-pagetitle"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;h2&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;class&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ms-pagetitle"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderPageTitleInTitleArea"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;h2&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;td&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;tr&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;table&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!--
Mini Console - supplementary buttons for Site Map --&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderMiniConsole"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderTitleRightMargin"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderTitleAreaSeparator"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!---
--- --- End of Page Header --- --- ---&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!---
--- --- Left Navigation Bar --- --- ---&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderLeftNavBarDataSource"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!--
Calendar --&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderCalendarNavigator"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderLeftNavBarTop"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!--
Quick Launch --&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderLeftNavBar"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!--
View All Site Content --&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;label&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;class&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ms-hidden"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:EncodedLiteral&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="EncodedLiteral4"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: #ff0000"&gt;text&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;lt;%$Resources:wss,quiklnch_pagetitle%&amp;gt;"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;EncodeMethod&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="HtmlEncode"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;label&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Sharepoint:SPSecurityTrimmedControl&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="SPSecurityTrimmedControl1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;PermissionsString&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ViewFormPages"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:SPLinkButton&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="idNavLinkViewAll"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;NavigateUrl&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="~site/_layouts/viewlsts.aspx"&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;lt;%$Resources:wss,quiklnch_allcontent%&amp;gt;"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;AccessKey&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;lt;%$Resources:wss,quiklnch_allcontent_AK%&amp;gt;"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;div&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:SPSecurityTrimmedControl&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!--
Quick Launch Items --&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Sharepoint:SPNavigationManager&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="QuickLaunchNavigationManager"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;QuickLaunchControlId&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="QuickLaunchMenu"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ContainedControl&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="QuickLaunch"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;EnableViewState&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="false"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:DelegateControl&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="DelegateControl8"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ControlId&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="QuickLaunchDataSource"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Template_Controls&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:SiteMapDataSource&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;SiteMapProvider&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="SPNavigationProvider"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ShowStartingNode&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="False"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="QuickLaunchSiteMap"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;StartingNodeUrl&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="sid:1025"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Template_Controls&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:DelegateControl&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:AspMenu&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="QuickLaunchMenu"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;DataSourceId&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="QuickLaunchSiteMap"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Orientation&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Vertical"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;StaticDisplayLevels&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="2"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ItemWrap&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="true"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;MaximumDynamicDisplayLevels&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="0"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;StaticSubMenuIndent&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="0"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;SkipLinkText&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;=""&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;LevelMenuItemStyles&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:MenuItemStyle&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;CssClass&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ms-navheader"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:MenuItemStyle&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;CssClass&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ms-navitem"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;LevelMenuItemStyles&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;LevelSubMenuStyles&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:SubMenuStyle&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;CssClass&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ms-navSubMenu1"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:SubMenuStyle&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;CssClass&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ms-navSubMenu2"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;LevelSubMenuStyles&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;LevelSelectedStyles&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:MenuItemStyle&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;CssClass&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ms-selectednavheader"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:MenuItemStyle&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;CssClass&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ms-selectednav"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;LevelSelectedStyles&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:AspMenu&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Sharepoint:SPNavigationManager&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!---
Tree View ---&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Sharepoint:SPNavigationManager&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="TreeViewNavigationManager"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ContainedControl&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="TreeView"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:SPLinkButton&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;NavigateUrl&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="~site/_layouts/viewlsts.aspx"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="idNavLinkSiteHierarchy"&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;lt;%$Resources:wss,treeview_header%&amp;gt;"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;AccessKey&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;lt;%$Resources:wss,quiklnch_allcontent_AK%&amp;gt;"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:SPHierarchyDataSourceControl&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="TreeViewDataSource"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;RootContextObject&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Web"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;IncludeDiscussionFolders&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="true"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:SPRememberScroll&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="TreeViewRememberScroll" 
&lt;br&gt;
&lt;/span&gt;&lt;span style="COLOR: #ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;onscroll&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="javascript:_spRecordScrollPositions(this);"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Style&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="overflow:
auto;height: 400px;width: 150px; "&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Sharepoint:SPTreeView&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="WebTreeView"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ShowLines&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="false"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;DataSourceId&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="TreeViewDataSource"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ExpandDepth&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="0"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;SelectedNodeStyle-CssClass&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ms-tvselected"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;NodeStyle-CssClass&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ms-navitem"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;NodeStyle-HorizontalPadding&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="2"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;SkipLinkText&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;=""&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;NodeIndent&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="12"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ExpandImageUrl&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="/_layouts/images/tvplus.gif"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;CollapseImageUrl&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="/_layouts/images/tvminus.gif"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;NoExpandImageUrl&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="/_layouts/images/tvblank.gif"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Sharepoint:SPTreeView&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Sharepoint:SPRememberScroll&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Sharepoint:SPNavigationManager&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!--
Recycle Bin --&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:SPLinkButton&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;NavigateUrl&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="~site/_layouts/recyclebin.aspx"&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="idNavLinkRecycleBin"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ImageUrl&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="/_layouts/images/recycbin.gif"&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;lt;%$Resources:wss,StsDefault_RecycleBin%&amp;gt;"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;PermissionsString&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="DeleteListItems"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!---
--- --- End of Left Navigation Bar --- --- ---&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderLeftActions"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderNavSpacer"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;IMG&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;SRC&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="/_layouts/images/blank.gif"&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: #ff0000"&gt;width&lt;/span&gt;=&lt;span style="COLOR: #ff0000"&gt;138&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;height&lt;/span&gt;=&lt;span style="COLOR: #ff0000"&gt;1&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;alt&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;=""&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceholder&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderLeftNavBarBorder"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderBodyLeftBorder"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!---
--- --- Page Content --- --- ---&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;PlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="MSO_ContentDiv"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;table&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="MSO_ContentTable"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;width&lt;/span&gt;=&lt;span style="COLOR: #ff0000"&gt;100&lt;/span&gt;% &lt;span style="COLOR: #ff0000"&gt;height&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="100%"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;border&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="0"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;cellspacing&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="0"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;cellpadding&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="0"&lt;/span&gt; 
&lt;br&gt;
&lt;span style="COLOR: #ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;class&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ms-propertysheet"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;tr&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;td&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;class&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;='ms-bodyareaframe'&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;valign&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="top"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;height&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="100%"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;A&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="mainContent"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;A&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderPageDescription"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderMain"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;td&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;tr&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;table&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;PlaceHolder&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!---
--- --- End of Page Content --- --- ---&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderBodyRightMargin"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderFormDigest"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePoint:FormDigest&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="FormDigest1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;=&lt;span style="COLOR: #ff0000"&gt;server&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;input&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;type&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="text"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="__spDummyText1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;style&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="display:none;"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;size&lt;/span&gt;=&lt;span style="COLOR: #ff0000"&gt;1&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;input&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;type&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="text"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="__spDummyText2"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;style&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="display:none;"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;size&lt;/span&gt;=&lt;span style="COLOR: #ff0000"&gt;1&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;form&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderUtilityContent"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderBodyAreaClass"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderTitleAreaClass"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!---
--- --- Hidden Placeholders --- --- ---&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:Panel&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Panel1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;visible&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="false"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!--
Place unused Content Placeholders here --&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:Panel&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!---
--- --- End of Hidden Placeholders --- --- ---&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;BODY&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;HTML&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
blank.master.cs
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 359px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 336px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Data; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Configuration; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Collections; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Web; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Web.Security; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Web.UI; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Web.UI.WebControls; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Web.UI.WebControls.WebParts; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Web.UI.HtmlControls; &lt;span style="COLOR: #0000ff"&gt;namespace&lt;/span&gt; MOSSFeatures.MasterPages
{ &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;class&lt;/span&gt; blank
: System.Web.UI.MasterPage { &lt;span style="COLOR: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; Page_Load(&lt;span style="COLOR: #0000ff"&gt;object&lt;/span&gt; sender,
EventArgs e) { } } }&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Now for the Page Layout, create&amp;nbsp;two files in PageLayouts named customPageLayout.aspx
and customPageLayout.aspx.cs
&lt;/p&gt;
&lt;p&gt;
customPageLayout.aspx
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 508px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 485px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;
&lt;p&gt;
&lt;span style="BACKGROUND-COLOR: #ffff00"&gt;&amp;lt;%@ Page Language="C#" Inherits="MOSSFeatures.PageLayouts.customPageLayout"
meta:progid="SharePoint.WebPartPage.Document" %&amp;gt;&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: #ffff00"&gt;&amp;lt;%@
Register Tagprefix="SharePointWebControls" Namespace="Microsoft.SharePoint.WebControls"
Assembly="Microsoft.SharePoint, 
&lt;br&gt;
Version=12.0.0.0, &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="BACKGROUND-COLOR: #ffff00"&gt;Culture=neutral, PublicKeyToken=71e9bce111e9429c"
%&amp;gt;&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="BACKGROUND-COLOR: #ffff00"&gt;&amp;lt;%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages"
Assembly="Microsoft.SharePoint, 
&lt;br&gt;
Version=12.0.0.0, &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="BACKGROUND-COLOR: #ffff00"&gt;Culture=neutral, PublicKeyToken=71e9bce111e9429c"
%&amp;gt;&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="BACKGROUND-COLOR: #ffff00"&gt;&amp;lt;%@ Register Tagprefix="PublishingWebControls"
Namespace="Microsoft.SharePoint.Publishing.WebControls" 
&lt;br&gt;
Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="BACKGROUND-COLOR: #ffff00"&gt;Culture=neutral, PublicKeyToken=71e9bce111e9429c"
%&amp;gt;&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="BACKGROUND-COLOR: #ffff00"&gt;&amp;lt;%@ Register Tagprefix="PublishingNavigation"
Namespace="Microsoft.SharePoint.Publishing.Navigation" 
&lt;br&gt;
Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="BACKGROUND-COLOR: #ffff00"&gt;C&lt;/span&gt;&lt;span style="BACKGROUND-COLOR: #ffff00"&gt;ulture=neutral,
PublicKeyToken=71e9bce111e9429c" %&amp;gt;&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: #ffff00"&gt;&amp;lt;%@
Register TagPrefix="radE" Namespace="Telerik.SharePoint.FieldEditor" 
&lt;br&gt;
Assembly="RadEditorSharePoint,Version=4.1.0.0,Culture=neutral,PublicKeyToken=1f131a624888eeed"%&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:Content&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ContentPlaceholderID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderPageTitle"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SharePointWebControls:FieldValue&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PageTitle"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;FieldName&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Title"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:Content&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:Content&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ContentPlaceholderID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PlaceHolderMain"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;br&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;radE:RadHtmlField&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="content"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;FieldName&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="content"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;radE:RadHtmlField&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:Content&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
If you're not using the Telerik editor, you can use the out-of-box rich-text editor,
but the Telerik editor is free - use it!&amp;nbsp; I'm also assuming you've got it installed
with this solution...
&lt;/p&gt;
&lt;p&gt;
customPageLayout.aspx.cs
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 279px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 256px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Collections.Generic; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Text; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; Microsoft.SharePoint.Publishing; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Web.UI.WebControls; &lt;span style="COLOR: #0000ff"&gt;namespace&lt;/span&gt; MOSSFeatures.PageLayouts
{ &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;class&lt;/span&gt; customPageLayout
: PublishingLayoutPage { &lt;span style="COLOR: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; Page_Load(&lt;span style="COLOR: #0000ff"&gt;object&lt;/span&gt; sender,
EventArgs e) { } } }&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
Now that we've got the master page and page layout, we need to provision it to the
master page gallery on the server when the feature is activated.&amp;nbsp; This is accomplished
by using a &lt;a href="http://msdn2.microsoft.com/en-us/library/ms453137.aspx" target=_blank&gt;provisioning
module&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
In the same directory as the content type and column definition files, create another
xml file named ProvisionedFiles.xml
&lt;/p&gt;
&lt;p&gt;
ProvisionedFiles.xml
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 435px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 412px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;
&lt;p&gt;
&lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Elements&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="http://schemas.microsoft.com/sharepoint/"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Module&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="CustomPageLayouts"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;RootWebOnly&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="TRUE"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Path&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PageLayouts"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Url&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="_catalogs/masterpage"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;File&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Url&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="customPageLayout.aspx"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Type&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="GhostableInLibrary"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;IgnoreIfAlreadyExists&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="false"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Property&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Title"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="$Resources:CustomResources,PageLayouts_handbookHome_Title;"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Property&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ContentType"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="$Resources:cmscore,contenttype_pagelayout_name;"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Property&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PublishingAssociatedContentType"&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;=";#$Resources:CustomResources,ContentTypes_CustomPublishingContentType_Title;;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: #0000ff"&gt;#0x01010007FF3E057FA8AB4AA42FCB67B453FFC100E214EEE741181F4E9F7ACC43278EE811002D7E961EBCD042C6A40B97F107579F70;#"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;File&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Module&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Module&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="CustomMasterPages"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Url&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="_catalogs/masterpage"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Path&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="MasterPages"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;RootWebOnly&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="TRUE"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;File&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Url&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="blank.master"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Type&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="GhostableInLibrary"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Property&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ContentType"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="$Resources:cmscore,contenttype_masterpage_name;"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Property&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PublishingPreviewImage"&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview
Images/BlueBand.png, &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: #0000ff"&gt;~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview
Images/BlueBand.png"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Property&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="MasterPageDescription"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="a
blank master page used for testing purposes"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;File&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Module&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Elements&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
So - that's it for the basic elements needed for the custom publishing items.&amp;nbsp;
Now we just need the Feature.xml file for the publishing items.&amp;nbsp; Create it in
the root of the feature next to the content type and column definition files.
&lt;/p&gt;
&lt;p&gt;
Feature.xml
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 167px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 144px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Feature&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="http://schemas.microsoft.com/sharepoint/"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Title&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Custom
Publishing Feature"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Scope&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Site"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ENTER_NEW_GUID"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;AlwaysForceInstall&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="true"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ActivateOnDefault&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="false"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Version&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="1.0.0.0"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;ElementManifests&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;ElementManifest&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="CustomPublishingColumns.xml"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;ElementManifest&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="CustomPublishingContentType.xml"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;ElementManifest&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ProvisionedFiles.xml"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;ElementManifests&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Feature&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Now, we need to update the ddf, manifest, and Deploy/Update/Remove cmd files for the
solution deployment
&lt;/p&gt;
&lt;p&gt;
The ddf file should now look like this:
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 692px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 669px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;.OPTION EXPLICIT ;generate errors
.Set CabinetNameTemplate=MOSSFeatures.wsp
.Set DiskDirectoryTemplate=CDROM ;All cabinets go into a single directory
.Set CompressionType=MSZIP ;** All files are compressed in cabinet files
.Set UniqueFiles="ON"
.Set Cabinet=on
.Set DiskDirectory1=

;Here's the way it works...
;FileToCopyFromInProject NewFileInCABFile

;manifest file
manifest.xml manifest.xml

;assemblies
bin\debug\MOSSFeatures.dll MOSSFeatures.dll


;features
;FeatureName\feature.xml FeatureName\feature.xml
;FeatureName\elements.xml FeatureName\elements.xml

;CustomResources
TEMPLATE\FEATURES\CustomResources\Feature.xml CustomResources\Feature.xml
TEMPLATE\FEATURES\CustomResources\CustomResources.en-US.resx CustomResources\CustomResources.en-US.resx
TEMPLATE\FEATURES\CustomResources\CustomResources.resx CustomResources\CustomResources.resx
TEMPLATE\FEATURES\CustomResources\CustomResources.en-US.resx RESOURCES\CustomResources.en-US.resx
TEMPLATE\FEATURES\CustomResources\CustomResources.resx RESOURCES\CustomResources.resx

;CustomPublishingLayouts
TEMPLATE\FEATURES\CustomPublishingLayouts\Feature.xml CustomPublishingLayouts\Feature.xml
TEMPLATE\FEATURES\CustomPublishingLayouts\ProvisionedFiles.xml CustomPublishingLayouts\ProvisionedFiles.xml
TEMPLATE\FEATURES\CustomPublishingLayouts\CustomPublishingColumns.xml CustomPublishingLayouts\CustomPublishingColumns.xml
TEMPLATE\FEATURES\CustomPublishingLayouts\CustomPublishingContentType.xml CustomPublishingLayouts\CustomPublishingContentType.xml

;Publishing Layouts Page Layouts
TEMPLATE\FEATURES\CustomPublishingLayouts\PageLayouts\customPageLayout.aspx 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;FEATURES\CustomPublishingLayouts\PageLayouts\customPageLayout.aspx
;Publishing Layouts Master Pages TEMPLATE\FEATURES\CustomPublishingLayouts\MasterPages\blank.master
FEATURES\CustomPublishingLayouts\MasterPages\blank.master &lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
Here's the updated manifest.xml file:
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 615px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 592px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;
&lt;p&gt;
&lt;span style="COLOR: #0000ff"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;xml&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;version&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="1.0"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;encoding&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="utf-8"&lt;/span&gt; ?&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Solution&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;SolutionId&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ENTER_SOLUTION_ID_GUID_HERE"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="http://schemas.microsoft.com/sharepoint/"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ResetWebServer&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="TRUE"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assemblies&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assembly&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;DeploymentTarget&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="GlobalAssemblyCache"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="MOSSFeatures.dll"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControls&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControl&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Safe&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="True"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Assembly&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="MOSSFeatures,
Version=1.0.0.0, Culture=neutral, &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: #0000ff"&gt;PublicKeyToken=ENTER_YOUR_PUBLIC_KEY_HERE"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Namespace&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="MOSSFeatures"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;TypeName&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="*"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControls&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assembly&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assemblies&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Resources&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Resource&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="CustomResources\CustomResources.en-US.resx"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Resource&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="CustomResources\CustomResources.resx"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Resources&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;FeatureManifests&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;FeatureManifest&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="CustomResources\Feature.xml"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;FeatureManifest&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="CustomPublishingLayouts\Feature.xml"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;FeatureManifests&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;TemplateFiles&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!--
Page Layouts--&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;TemplateFile&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="FEATURES\CustomPublishingLayouts\PageLayouts\customPageLayout.aspx"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&amp;lt;!--
Master Pages --&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;TemplateFile&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="FEATURES\CustomPublishingLayouts\MasterPages\blank.master"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;TemplateFiles&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;RootFiles&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;RootFile&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Resources\CustomResources.en-US.resx"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;RootFile&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Resources\CustomResources.resx"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;RootFiles&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Solution&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;/p&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Deploy.cmd
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 791px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 768px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;@ECHO OFF

SET SITE_URL="http://mossdevelopment.richfinn.net"
SET SOLUTION_NAME=MOSSFeatures.wsp

REM ----- Deactivate the feature(s) -----
stsadm -o deactivatefeature -name CustomResources -url %SITE_URL% -force
stsadm -o deactivatefeature -name CustomPublishingLayouts -url %SITE_URL% -force

REM ----- Remove the features and solution -----
stsadm -o retractsolution -name %SOLUTION_NAME% -immediate -url %SITE_URL%


ECHO .
ECHO .
ECHO -------------------------------------------------------------------------------------------
ECHO Verify that the correct solutions have been completly retracted and then press ENTER
ECHO -------------------------------------------------------------------------------------------
ECHO .

pause

ECHO ON

REM ----- Delete the solution -----
stsadm -o deletesolution -name %SOLUTION_NAME%

REM ----- Add and depoly the solution -----
stsadm -o addsolution -filename %SOLUTION_NAME%
stsadm -o deploysolution -n %SOLUTION_NAME% -immediate -allowgacdeployment -allowCasPolicies -url %SITE_URL%


ECHO OFF
ECHO .
ECHO .
ECHO -------------------------------------------------------------------------------------------
ECHO Solution deployment complete, press ENTER to activate features, if any
ECHO -------------------------------------------------------------------------------------------

pause

ECHO ON
REM ----- Active features -----
stsadm -o activatefeature -name CustomResources -url %SITE_URL% -force
stsadm -o activatefeature -name CustomPublishingLayouts -url %SITE_URL% -force

REM ----- Remove the following comment if features are present
REM pause&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Update.cmd
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 567px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 544px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;cls
ECHO OFF

SET SITE_URL="http://mossdevelopment.richfinn.net"
SET SOLUTION_NAME=MOSSFeatures.wsp

REM ECHO .
REM ECHO .
REM ECHO -------------------------------------------------------------------------------------------
REM ECHO Verify that the correct solutions have been completly retracted and then press ENTER
REM ECHO -------------------------------------------------------------------------------------------
REM ECHO .

pause

ECHO ON

stsadm -o upgradesolution -name %SOLUTION_NAME% -filename %SOLUTION_NAME% -immediate -allowgacdeployment

ECHO OFF
ECHO .
ECHO .
ECHO -------------------------------------------------------------------------------------------
ECHO Solution deployment complete, press ENTER to activate features, if any
ECHO -------------------------------------------------------------------------------------------

pause

ECHO ON
REM ----- Active features -----
stsadm -o activatefeature -name CustomResources -url %SITE_URL% -force
stsadm -o activatefeature -name CustomPublishingLayouts -url %SITE_URL% -force

pause&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Remove.cmd
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 423px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 400px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;ECHO OFF

SET SITE_URL="http://mossdevelopment.richfinn.net"
SET SOLUTION_NAME=MOSSFeatures.wsp

REM ----------- Remove the features ------------------
stsadm -o deactivatefeature -name CustomResources -url %SITE_URL% -force
stsadm -o deactivatefeature -name CustomPublishingLayouts -url %SITE_URL% -force


REM -----------  Retract the solution ----------------
stsadm -o retractsolution -name %SOLUTION_NAME% -immediate -url %SITE_URL%

pause


REM ----------- Execute Time Jobs --------------------

REM stsadm execadmsvcjobs

REM ----------- Delete the solution -----------------

stsadm -o deletesolution -name %SOLUTION_NAME%

pause&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Now, deploying the solution will provision the new master page, page layout, and content
type.&amp;nbsp; Pages can now be created using the new layouts, as well.&amp;nbsp; When you
need to update the page layouts, just run the Update.cmd file, and the solution will
be updated with the changes.
&lt;/p&gt;
&lt;p&gt;
This was a fairly basic solution for deploying custom publishing items, but you can
see how powerful and extensible it is, and leveraging resource files is pretty cool,
too.&amp;nbsp; Next I hope to show how you can create a custom site definition to provision
sites using the custom page layouts rather than the out of box page layout.
&lt;/p&gt;
&lt;p&gt;
Here's the source project for this solution: &lt;a href="http://blog.richfinn.net/blog/downloads/MOSSFeatures_CustomPublishingFeature.zip" target=_blank&gt;MOSSFeatures_CustomPublishingFeature.zip&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=0e3bc28f-dffb-4ef3-b767-0fd52d96b587" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,0e3bc28f-dffb-4ef3-b767-0fd52d96b587.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
      <category>WSP Development</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=c7599774-e0cb-4410-af64-3549f159ba95</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,c7599774-e0cb-4410-af64-3549f159ba95.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,c7599774-e0cb-4410-af64-3549f159ba95.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=c7599774-e0cb-4410-af64-3549f159ba95</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've recently come to the conclusion that when creating a wss solution (WSP), writing
the needed lines for the ddf, manifest and provisioning files can be really time consuming. 
This is especially painful when it comes to images that are needed in master
pages and page layout files, as the number of images can be quite large sometimes. 
So, I've created a little console app that creates the lines automatically and outputs
them to a text file.  All you need to do manually is copy and paste them
into the correct files in the solution.
</p>
        <p>
The output looks like this:
</p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 1396px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">******************************************************
*************** MASTERPAGE ***************
****************************************************** 

***** DDF ***** 

TEMPLATE\FEATURES\CustomPublishingLayouts\MasterPages\blank.master FEATURES\CustomPublishingLayouts\MasterPages\blank.master
TEMPLATE\FEATURES\CustomPublishingLayouts\MasterPages\client1.master FEATURES\CustomPublishingLayouts\MasterPages\client1.master 

***** MANIFEST ***** 

<span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">TemplateFile</span><span style="COLOR: #ff0000">Location</span><span style="COLOR: #0000ff">="FEATURES\ClientPublishingLayouts\MasterPages\blank.master"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">TemplateFile</span><span style="COLOR: #ff0000">Location</span><span style="COLOR: #0000ff">="FEATURES\ClientPublishingLayouts\MasterPages\client1.master"</span><span style="COLOR: #0000ff">/&gt;</span> *****
PROVISION ***** <span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">File</span><span style="COLOR: #ff0000">Url</span><span style="COLOR: #0000ff">="blank.master"</span><span style="COLOR: #ff0000">Type</span><span style="COLOR: #0000ff">="GhostableInLibrary"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">File</span><span style="COLOR: #ff0000">Url</span><span style="COLOR: #0000ff">="client1.master"</span><span style="COLOR: #ff0000">Type</span><span style="COLOR: #0000ff">="GhostableInLibrary"</span><span style="COLOR: #0000ff">/&gt;</span> ****************************************************** </pre>
        </div>
        <p>
 
</p>
        <p>
The program is currently set up to create the needed lines in the case of a custom
publishing feature, but it can be easily changed for any feature type.
</p>
        <p>
        </p>
        <p>
There's a configuration file which allows you to enter the directories and templates
for output.  Looks like this:<br /></p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 1396px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #0000ff">&lt;?</span>
            <span style="COLOR: #800000">xml</span>
            <span style="COLOR: #ff0000">version</span>
            <span style="COLOR: #0000ff">="1.0"</span>
            <span style="COLOR: #ff0000">encoding</span>
            <span style="COLOR: #0000ff">="utf-8"</span> ?<span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">Templates</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">Template</span><span style="COLOR: #ff0000">Name</span><span style="COLOR: #0000ff">="ClientPublishingLayouts
MasterPages"</span><br /><span style="COLOR: #ff0000">         Path</span><span style="COLOR: #0000ff">="C:\Development\Solution\Project\TEMPLATE\FEATURES\ClientPublishingLayouts\MasterPages"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">Item</span><span style="COLOR: #ff0000">Name</span><span style="COLOR: #0000ff">="DDF"</span><br /><span style="COLOR: #ff0000">         Text</span><span style="COLOR: #0000ff">="TEMPLATE\FEATURES\ClientPublishingLayouts\MasterPages\FILENAME 
<br />
         FEATURES\ClientPublishingLayouts\MasterPages\FILENAME"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">Item</span><span style="COLOR: #ff0000">Name</span><span style="COLOR: #0000ff">="MANIFEST"</span><br /><span style="COLOR: #ff0000">         Text</span><span style="COLOR: #0000ff">="&amp;lt;TemplateFile
Location=&amp;quot;<br />
         FEATURES\ClientPublishingLayouts\MasterPages\FILENAME&amp;quot;/&amp;gt;"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">Item</span><span style="COLOR: #ff0000">Name</span><span style="COLOR: #0000ff">="PROVISION"</span><br /><span style="COLOR: #ff0000">         Text</span><span style="COLOR: #0000ff">="&amp;lt;File
Url=&amp;quot;FILENAME&amp;quot; 
<br />
         Type=&amp;quot;GhostableInLibrary&amp;quot;/&amp;gt;"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">Template</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">Template</span><span style="COLOR: #ff0000">Name</span><span style="COLOR: #0000ff">="_Layouts\ClientPages\Migration"</span><br /><span style="COLOR: #ff0000">         Path</span><span style="COLOR: #0000ff">="C:\Development\Solution\Project\TEMPLATE\LAYOUTS\ClientPages\Migration"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">Item</span><span style="COLOR: #ff0000">Name</span><span style="COLOR: #0000ff">="DDF"</span><br /><span style="COLOR: #ff0000">         Text</span><span style="COLOR: #0000ff">="TEMPLATE\LAYOUTS\ClientPages\Migration\FILENAME 
<br />
         LAYOUTS\ClientPages\Migration\FILENAME"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">Item</span><span style="COLOR: #ff0000">Name</span><span style="COLOR: #0000ff">="MANIFEST"</span><br /><span style="COLOR: #ff0000">         Text</span><span style="COLOR: #0000ff">="&amp;lt;TemplateFile
Location=&amp;quot;<br />
         LAYOUTS\ClientPages\Migration\FILENAME&amp;quot;/&amp;gt;"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">Template</span><span style="COLOR: #0000ff">&gt;</span> etc... <span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">Templates</span><span style="COLOR: #0000ff">&gt;</span></pre>
        </div>
        <p>
 
</p>
        <p>
You can download the source here: <a href="http://blog.richfinn.net/blog/downloads/CreateEntriesInSolutionFiles.zip" rel="nofollow">CreateEntriesInSolutionFiles.zip</a></p>
        <p>
So if you downloaded this before 7/23, the current download is a new release. 
Uses only one configuration file, and cleaner code...
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=c7599774-e0cb-4410-af64-3549f159ba95" />
      </body>
      <title>Application to generate lines for DDF, Manifest, and Provisioning Files</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,c7599774-e0cb-4410-af64-3549f159ba95.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/07/20/ApplicationToGenerateLinesForDDFManifestAndProvisioningFiles.aspx</link>
      <pubDate>Fri, 20 Jul 2007 16:02:00 GMT</pubDate>
      <description>&lt;p&gt;
I've recently come to the conclusion that when creating a wss solution (WSP), writing
the needed lines for the ddf, manifest and provisioning files can be really time consuming.&amp;nbsp;
This is especially painful&amp;nbsp;when it comes to&amp;nbsp;images that are needed in master
pages and page layout files, as the number of images can be quite large sometimes.&amp;nbsp;
So, I've created a little console app that creates the lines automatically and outputs
them to a text file.&amp;nbsp; All you need&amp;nbsp;to do manually is copy and paste them
into the correct files in the solution.
&lt;/p&gt;
&lt;p&gt;
The output looks like this:
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 1396px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;******************************************************
*************** MASTERPAGE ***************
****************************************************** 

***** DDF ***** 

TEMPLATE\FEATURES\CustomPublishingLayouts\MasterPages\blank.master FEATURES\CustomPublishingLayouts\MasterPages\blank.master
TEMPLATE\FEATURES\CustomPublishingLayouts\MasterPages\client1.master FEATURES\CustomPublishingLayouts\MasterPages\client1.master 

***** MANIFEST ***** 

&lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;TemplateFile&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="FEATURES\ClientPublishingLayouts\MasterPages\blank.master"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;TemplateFile&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="FEATURES\ClientPublishingLayouts\MasterPages\client1.master"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; *****
PROVISION ***** &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;File&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Url&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="blank.master"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Type&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="GhostableInLibrary"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;File&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Url&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="client1.master"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Type&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="GhostableInLibrary"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; ****************************************************** &lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
The program is&amp;nbsp;currently set up to create the needed lines in the case of a custom
publishing feature, but it can be easily changed for any feature type.
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
There's a configuration file which allows you to enter the directories and templates
for output.&amp;nbsp; Looks like this:&lt;br&gt;
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 1396px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;xml&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;version&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="1.0"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;encoding&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="utf-8"&lt;/span&gt; ?&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Templates&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Template&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ClientPublishingLayouts
MasterPages"&lt;/span&gt; 
&lt;br&gt;
&lt;span style="COLOR: #ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Path&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="C:\Development\Solution\Project\TEMPLATE\FEATURES\ClientPublishingLayouts\MasterPages"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Item&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="DDF"&lt;/span&gt; 
&lt;br&gt;
&lt;span style="COLOR: #ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Text&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="TEMPLATE\FEATURES\ClientPublishingLayouts\MasterPages\FILENAME 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FEATURES\ClientPublishingLayouts\MasterPages\FILENAME"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Item&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="MANIFEST"&lt;/span&gt; 
&lt;br&gt;
&lt;span style="COLOR: #ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Text&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;amp;lt;TemplateFile
Location=&amp;amp;quot;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FEATURES\ClientPublishingLayouts\MasterPages\FILENAME&amp;amp;quot;/&amp;amp;gt;"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Item&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PROVISION"&lt;/span&gt; 
&lt;br&gt;
&lt;span style="COLOR: #ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Text&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;amp;lt;File
Url=&amp;amp;quot;FILENAME&amp;amp;quot; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Type=&amp;amp;quot;GhostableInLibrary&amp;amp;quot;/&amp;amp;gt;"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Template&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Template&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="_Layouts\ClientPages\Migration"&lt;/span&gt; 
&lt;br&gt;
&lt;span style="COLOR: #ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Path&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="C:\Development\Solution\Project\TEMPLATE\LAYOUTS\ClientPages\Migration"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Item&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="DDF"&lt;/span&gt; 
&lt;br&gt;
&lt;span style="COLOR: #ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Text&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="TEMPLATE\LAYOUTS\ClientPages\Migration\FILENAME 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LAYOUTS\ClientPages\Migration\FILENAME"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Item&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="MANIFEST"&lt;/span&gt; 
&lt;br&gt;
&lt;span style="COLOR: #ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Text&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="&amp;amp;lt;TemplateFile
Location=&amp;amp;quot;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LAYOUTS\ClientPages\Migration\FILENAME&amp;amp;quot;/&amp;amp;gt;"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Template&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; etc... &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Templates&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
You can download the source here: &lt;a href="http://blog.richfinn.net/blog/downloads/CreateEntriesInSolutionFiles.zip" rel=nofollow&gt;CreateEntriesInSolutionFiles.zip&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
So if you downloaded this before 7/23, the current download is a new release.&amp;nbsp;
Uses only one configuration file, and cleaner code...
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=c7599774-e0cb-4410-af64-3549f159ba95" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,c7599774-e0cb-4410-af64-3549f159ba95.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
      <category>WSP Development</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=6cf204a7-e07b-4f4e-a9c8-f49705425fc4</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,6cf204a7-e07b-4f4e-a9c8-f49705425fc4.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,6cf204a7-e07b-4f4e-a9c8-f49705425fc4.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=6cf204a7-e07b-4f4e-a9c8-f49705425fc4</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I was trying to create a feature that used a custom feature receiver which was called
when the feature was activated and I was following all of the different examples
and samples and blogs that were out there, but I kept getting this error: 
</p>
        <p>
        </p>
        <p>
          <font face="Courier New">Failed to create feature receiver object from assembly "AssemblyName,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=KEY", type "AssemblyName.ClassName"
for feature GUID: System.ArgumentNullException: Value cannot be null. 
<br />
Parameter name: type 
<br />
at System.Activator.CreateInstance(Type type, Boolean nonPublic) 
<br />
at System.Activator.CreateInstance(Type type) 
<br />
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()</font>
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
no idea what this was at all, but I think I did find what fixed it! 
</p>
        <p>
          <br />
In the &lt;Feature&gt; element of my Feature.xml file, I took out the SolutionID attribute,
and then I added AlwaysForceInstall="true" and ActivateOnDefault="false".  To
get the feature to activate on install, call stsadm -o activatefeature in the bat
file you use to install the solution...
</p>
        <p>
Update (8/31/2007): 
<br />
Figured a little more out about this.  One potential issue is that the fully
qualified class name might not be correct.  In MOSS development, we often change
the namespace of a class to be different than the one Visual Studio gives it
when the class file is created.  Make sure the feature receiver class name matches
the one in the class file...
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=6cf204a7-e07b-4f4e-a9c8-f49705425fc4" />
      </body>
      <title>Deploying SharePoint Solutions (WSP) containing features that use feature receivers</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,6cf204a7-e07b-4f4e-a9c8-f49705425fc4.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/07/10/DeployingSharePointSolutionsWSPContainingFeaturesThatUseFeatureReceivers.aspx</link>
      <pubDate>Tue, 10 Jul 2007 20:50:38 GMT</pubDate>
      <description>&lt;p&gt;
I was trying to create a feature that used a custom feature receiver which was called
when the feature was activated and&amp;nbsp;I was following all of the different examples
and samples and blogs that were out there, but I kept getting this error: 
&lt;p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;Failed to create feature receiver object from assembly "AssemblyName,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=KEY", type "AssemblyName.ClassName"
for feature GUID: System.ArgumentNullException: Value cannot be null. 
&lt;br&gt;
Parameter name: type 
&lt;br&gt;
at System.Activator.CreateInstance(Type type, Boolean nonPublic) 
&lt;br&gt;
at System.Activator.CreateInstance(Type type) 
&lt;br&gt;
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()&lt;/font&gt; 
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
no idea what this was at all, but I think I did find what fixed it! 
&lt;p&gt;
&lt;br&gt;
In the &amp;lt;Feature&amp;gt; element of my Feature.xml file, I took out the SolutionID attribute,
and then I added AlwaysForceInstall="true" and ActivateOnDefault="false".&amp;nbsp; To
get the feature to activate on install, call stsadm -o activatefeature in the bat
file you use to install the solution...
&lt;/p&gt;
&lt;p&gt;
Update (8/31/2007): 
&lt;br&gt;
Figured a little more out about this.&amp;nbsp; One potential issue is that the&amp;nbsp;fully
qualified class name might not be correct.&amp;nbsp; In MOSS development, we often change
the namespace of a class&amp;nbsp;to be different than the one Visual Studio gives it
when the class file is created.&amp;nbsp; Make sure the feature receiver class name matches
the one in the class file...
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=6cf204a7-e07b-4f4e-a9c8-f49705425fc4" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,6cf204a7-e07b-4f4e-a9c8-f49705425fc4.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
      <category>WSP Development</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=0f3c30fe-a41d-411c-b5c3-9a8870745de4</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,0f3c30fe-a41d-411c-b5c3-9a8870745de4.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,0f3c30fe-a41d-411c-b5c3-9a8870745de4.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=0f3c30fe-a41d-411c-b5c3-9a8870745de4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I'm working with a client who needs to migrate content from MCMS2002 to MOSS by NOT
using the out-of-box migration tools.  While that's a story worthy of a whole
new blog, one of the problems I came across was the need to create publishing pages
from scratch using the object model.  It's really not that hard at all - you
just need to use some of the features of the new Microsoft.SharePoint.Publishing assembly.  
</p>
        <p>
Here's the code to get it done... 
</p>
        <p>
        </p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 1396px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #008000">//get
the current top level site as publishing web so you can get the available page layouts
for the known content type</span> PublishingSite pubSite = <span style="COLOR: #0000ff">new</span> PublishingSite(SPContext.Current.Site); <span style="COLOR: #008000">//get
the site content type that contains the page layout you want to use</span> SPContentType
contentType = pubSite.ContentTypes[<span style="COLOR: #006080">"Custom Page Layout
Content Type"</span>]; <span style="COLOR: #008000">//get the page layouts for the
content type</span> PageLayoutCollection pageLayouts = pubSite.GetPageLayouts(contentType, <span style="COLOR: #0000ff">true</span>); <span style="COLOR: #008000">//I
like refering to the page layouts by title, so I shove them into a generic dictionary </span> Dictionary&lt;<span style="COLOR: #0000ff">string</span>,
PageLayout&gt; dPageLayouts = <span style="COLOR: #0000ff">new</span> Dictionary&lt;<span style="COLOR: #0000ff">string</span>,
PageLayout&gt;(); <span style="COLOR: #0000ff">foreach</span> (PageLayout pageLayout <span style="COLOR: #0000ff">in</span> pageLayouts)
{ dPageLayouts.Add(pageLayout.Title, pageLayout); } <span style="COLOR: #008000">//get
the page layout you want to use</span> PageLayout pageLayoutToUse = dPageLayouts[<span style="COLOR: #006080">"layoutName"</span>]; <span style="COLOR: #008000">//get
the current publishing web</span> PublishingWeb pubWeb = PublishingWeb.GetPublishingWeb(SPContext.Current.Web); <span style="COLOR: #008000">//create
a new publishing page in the web</span> PublishingPage newPubPage = pubWeb.GetPublishingPages().Add(<span style="COLOR: #006080">"newPageName.aspx"</span>,
pageLayoutToUse); <span style="COLOR: #008000">//set properties and placeholder content
just like you would if you were adding a new file to a document library</span> SPListItem
newPage = newPubPage.ListItem; newPage[<span style="COLOR: #006080">"Title"</span>]
= <span style="COLOR: #006080">"New Page Title"</span>; newPage[<span style="COLOR: #006080">"content"</span>]
= <span style="COLOR: #006080">"&lt;span&gt;&lt;b&gt;here's some new content&lt;/b&gt;&lt;/span&gt;"</span>;
newPage.Update(); <span style="COLOR: #008000">//check the file in and publish it</span> newPage.File.CheckIn(<span style="COLOR: #006080">"Checked
in on creation"</span>); newPage.File.Publish(<span style="COLOR: #006080">"Published
on creation"</span>); <span style="COLOR: #0000ff">try</span> { <span style="COLOR: #008000">//this
is a hack that ensures if the site has workflow turned on, the new page will get approved</span> newPage.File.Approve(<span style="COLOR: #006080">"Approved
on creation"</span>); } <span style="COLOR: #0000ff">catch</span> { <span style="COLOR: #008000">//approval
is not enabled</span> } </pre>
        </div>
        <style type="text/css">.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; }
</style>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=0f3c30fe-a41d-411c-b5c3-9a8870745de4" />
      </body>
      <title>Programmatically add a new publishing page in MOSS</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,0f3c30fe-a41d-411c-b5c3-9a8870745de4.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/07/06/ProgrammaticallyAddANewPublishingPageInMOSS.aspx</link>
      <pubDate>Fri, 06 Jul 2007 20:50:38 GMT</pubDate>
      <description>&lt;p&gt;
I'm working with a client who needs to migrate content from MCMS2002 to MOSS by NOT
using the out-of-box migration tools.&amp;nbsp; While that's a story worthy of a whole
new blog, one of the problems I came across was the need to create publishing pages
from scratch using the object model.&amp;nbsp; It's really not that hard at all - you
just need to use some of the features of the new Microsoft.SharePoint.Publishing assembly.&amp;nbsp; 
&lt;p&gt;
Here's the code to get it done... 
&lt;p&gt;
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 1396px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #008000"&gt;//get
the current top level site as publishing web so you can get the available page layouts
for the known content type&lt;/span&gt; PublishingSite pubSite = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; PublishingSite(SPContext.Current.Site); &lt;span style="COLOR: #008000"&gt;//get
the site content type that contains the page layout you want to use&lt;/span&gt; SPContentType
contentType = pubSite.ContentTypes[&lt;span style="COLOR: #006080"&gt;"Custom Page Layout
Content Type"&lt;/span&gt;]; &lt;span style="COLOR: #008000"&gt;//get the page layouts for the
content type&lt;/span&gt; PageLayoutCollection pageLayouts = pubSite.GetPageLayouts(contentType, &lt;span style="COLOR: #0000ff"&gt;true&lt;/span&gt;); &lt;span style="COLOR: #008000"&gt;//I
like refering to the page layouts by title, so I shove them into a generic dictionary &lt;/span&gt; Dictionary&amp;lt;&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;,
PageLayout&amp;gt; dPageLayouts = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; Dictionary&amp;lt;&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;,
PageLayout&amp;gt;(); &lt;span style="COLOR: #0000ff"&gt;foreach&lt;/span&gt; (PageLayout pageLayout &lt;span style="COLOR: #0000ff"&gt;in&lt;/span&gt; pageLayouts)
{ dPageLayouts.Add(pageLayout.Title, pageLayout); } &lt;span style="COLOR: #008000"&gt;//get
the page layout you want to use&lt;/span&gt; PageLayout pageLayoutToUse = dPageLayouts[&lt;span style="COLOR: #006080"&gt;"layoutName"&lt;/span&gt;]; &lt;span style="COLOR: #008000"&gt;//get
the current publishing web&lt;/span&gt; PublishingWeb pubWeb = PublishingWeb.GetPublishingWeb(SPContext.Current.Web); &lt;span style="COLOR: #008000"&gt;//create
a new publishing page in the web&lt;/span&gt; PublishingPage newPubPage = pubWeb.GetPublishingPages().Add(&lt;span style="COLOR: #006080"&gt;"newPageName.aspx"&lt;/span&gt;,
pageLayoutToUse); &lt;span style="COLOR: #008000"&gt;//set properties and placeholder content
just like you would if you were adding a new file to a document library&lt;/span&gt; SPListItem
newPage = newPubPage.ListItem; newPage[&lt;span style="COLOR: #006080"&gt;"Title"&lt;/span&gt;]
= &lt;span style="COLOR: #006080"&gt;"New Page Title"&lt;/span&gt;; newPage[&lt;span style="COLOR: #006080"&gt;"content"&lt;/span&gt;]
= &lt;span style="COLOR: #006080"&gt;"&amp;lt;span&amp;gt;&amp;lt;b&amp;gt;here's some new content&amp;lt;/b&amp;gt;&amp;lt;/span&amp;gt;"&lt;/span&gt;;
newPage.Update(); &lt;span style="COLOR: #008000"&gt;//check the file in and publish it&lt;/span&gt; newPage.File.CheckIn(&lt;span style="COLOR: #006080"&gt;"Checked
in on creation"&lt;/span&gt;); newPage.File.Publish(&lt;span style="COLOR: #006080"&gt;"Published
on creation"&lt;/span&gt;); &lt;span style="COLOR: #0000ff"&gt;try&lt;/span&gt; { &lt;span style="COLOR: #008000"&gt;//this
is a hack that ensures if the site has workflow turned on, the new page will get approved&lt;/span&gt; newPage.File.Approve(&lt;span style="COLOR: #006080"&gt;"Approved
on creation"&lt;/span&gt;); } &lt;span style="COLOR: #0000ff"&gt;catch&lt;/span&gt; { &lt;span style="COLOR: #008000"&gt;//approval
is not enabled&lt;/span&gt; } &lt;/pre&gt;
&lt;/div&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;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=0f3c30fe-a41d-411c-b5c3-9a8870745de4" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,0f3c30fe-a41d-411c-b5c3-9a8870745de4.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=8ea8345e-ba1e-41dd-90f8-65e30498f0ae</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,8ea8345e-ba1e-41dd-90f8-65e30498f0ae.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,8ea8345e-ba1e-41dd-90f8-65e30498f0ae.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=8ea8345e-ba1e-41dd-90f8-65e30498f0ae</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
One of the greatest development features in MOSS is the ability to create solution
files which can be managed and deployed across your development landscape as you moved
towards production.  When a solution is deployed, all files inside are
deployed to the correct locations, which is extremely helpful in a load
balanced environment.<br /><br />
I'll demonstrate here what it takes to get a solution up and running from scratch. 
This is the template I use for all my new WSP files. 
</p>
        <p>
Create a class library project in Visual Studio.  I'll name mine 'SampleWSSSolution'. 
Once the project has loaded, right click on the project name in the project explorer,
and click 'Properties'.  On the 'Signing' tab, click the checkbox 'Sign the assembly'
and in the drop down choose '&lt;new&gt;'.  In the 'Create Strong Name Key' popup,
enter 'SampleWSSSolution' in the 'Key file name:' text box, and uncheck the 'Protect
my key file with a password' checkbox. 
</p>
        <p>
In the same project properties screen, click the 'Build Events' tab, and enter the
following into the 'Post-build event command line:' text area:<br /><br />
cd $(ProjectDir)<br />
makecab /f CreateSolutionCAB.ddf<br /><br />
This code will create the WSP file in the root directory of the project. 
</p>
        <p>
          <br />
Now, create four files in the VS project:<br />
- CreateSolutionCAB.ddf<br />
- manifest.xml<br />
- Deploy.cmd<br />
- Upgrade.cmd 
</p>
        <p>
Here's what the contents of the files should look like: 
</p>
        <p>
        </p>
        <p>
          <strong>CreateSolutionCAB.ddf<br /></strong>This file tells makecab.exe what files to put into the CAB file<strong><br />
-----------------------------------------------------------------------</strong></p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">.OPTION EXPLICIT ;generate errors
.Set CabinetNameTemplate=SOLUTIONNAME.wsp
.Set DiskDirectoryTemplate=CDROM ;All cabinets go into a single directory
.Set CompressionType=MSZIP ;** All files are compressed in cabinet files
.Set UniqueFiles="ON"
.Set Cabinet=on
.Set DiskDirectory1= 

;Here's the way it works...
;FileToCopyFromInProject NewFileInCABFile 

;manifest file
manifest.xml manifest.xml 

;features
FeatureName\feature.xml FeatureName\feature.xml
FeatureName\elements.xml FeatureName\elements.xml 

;aspx pages
CustomPageDirectoryName/default.aspx LAYOUTS\CustomPageDirectoryName\default.aspx
FeatureName\FeaturePageName.aspx LAYTOUS\DirectoryName\FeaturePageName.aspx 

;web parts
WebPartDirectoryName\feature.xml WebPartDirectryNameInFEATURES\feature.xml
WebPartDirectoryName\elementmanifest.xml WebPartDirectryNameInFEATURES\elementmanifest.xml
WebPartDirectoryName\WebPartName.webpart WebPartDirectryNameInFEATURES\WebPartName.webpart 

;assemblies
bin\debug\SampleWSSSolution.dll SampleWSSSolution.dll
</pre>
        </div>
        <p>
          <br />
          <br />
----------------------------------------------------------------------------------------------------------------------------<br /></p>
        <strong>
        </strong>
        <p>
          <strong>manifest.xml<br /></strong>This file is the manifest of the solution and tells WSS the contents and
where to put them once it is deployed<br /><strong>----------------------------------------------------<br /></strong></p>
        <style type="text/css">.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; }
</style>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">Solution</span>
            <span style="COLOR: #ff0000">SolutionId</span>
            <span style="COLOR: #0000ff">="GUID"</span>
            <span style="COLOR: #ff0000">xmlns</span>
            <span style="COLOR: #0000ff">=<a href="http://schemas.microsoft.com/sharepoint/">http://schemas.microsoft.com/sharepoint/</a></span>
            <br />
            <span style="COLOR: #ff0000">ResetWebServer</span>
            <span style="COLOR: #0000ff">="TRUE"</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">FeatureManifests</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">FeatureManifest</span>
            <span style="COLOR: #ff0000">Location</span>
            <span style="COLOR: #0000ff">="WebPartDirectryNameInFEATURES\feature.xml"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">FeatureManifest</span>
            <span style="COLOR: #ff0000">Location</span>
            <span style="COLOR: #0000ff">="FeatureName\feature.xml"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">FeatureManifests</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">TemplateFiles</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">TemplateFile</span>
            <span style="COLOR: #ff0000">Location</span>
            <span style="COLOR: #0000ff">="LAYOUTS\CustomPageDirectoryName\default.aspx"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">TemplateFile</span>
            <span style="COLOR: #ff0000">Location</span>
            <span style="COLOR: #0000ff">="LAYTOUS\DirectoryName\FeaturePageName.aspx"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">TemplateFiles</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">Assemblies</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">Assembly</span>
            <span style="COLOR: #ff0000">DeploymentTarget</span>
            <span style="COLOR: #0000ff">="GlobalAssemblyCache"</span>
            <span style="COLOR: #ff0000">Location</span>
            <span style="COLOR: #0000ff">="SampleWSSSolution.dll"</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">SafeControls</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">SafeControl</span>
            <span style="COLOR: #ff0000">Assembly</span>
            <span style="COLOR: #0000ff">="SampleWSSSolution,
Version=1.0.0.0, Culture=Neutral, 
<br />
PublicKeyToken=assembyPublicKeyToken"</span>
            <br />
            <span style="COLOR: #ff0000">                  Namespace</span>
            <span style="COLOR: #0000ff">="SampleWSSSolution"</span>
            <span style="COLOR: #ff0000">TypeName</span>
            <span style="COLOR: #0000ff">="*"</span>
            <span style="COLOR: #0000ff">/&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">SafeControls</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">Assembly</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">Assemblies</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;/</span>
            <span style="COLOR: #800000">Solution</span>
            <span style="COLOR: #0000ff">&gt;</span>
          </pre>
        </div>
        <p>
          <strong>-------------------------------------------------------------------------------------------------------</strong>
        </p>
        <p>
          <strong>
            <br />
Deploy.cmd<br />
----------------------------------------------------<br /></strong>
        </p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">REM ----- Deactivate the feature(s) -----
stsadm -o deactivatefeature -name FEATURENAME -url "http://www.sitecollectionurl.com" -force 

REM ----- Remove the features and solution -----
stsadm -o retractsolution -name SampleWSSSolution.wsp -immediate -url 
<br />
"http://www.sitecollectionurl.com" ECHO OFF ECHO . ECHO . ECHO -------------------------------------------------------------------------------------------
ECHO Verify that the correct solutions have been completly retracted and then press
ENTER ECHO -------------------------------------------------------------------------------------------
ECHO . pause ECHO ON REM ----- Delete the solution ----- stsadm -o deletesolution
-name SampleWSSSolution.wsp REM ----- Add and depoly the solution ----- stsadm -addsolution
-filename SampleWSSSolution.wsp stsadm -deploysolution -n SampleWSSSolution.wsp 
<br />
   -immediate -allowgacdeployment 
<br />
   -url "http://www.sitecollectionurl.com" ECHO OFF ECHO . ECHO . ECHO
-------------------------------------------------------------------------------------------
ECHO Solution deployment complete, press ENTER to activate features, if any ECHO -------------------------------------------------------------------------------------------
pause ECHO ON REM ----- Active features ----- stsadm -o activatefeature -name FEATURENAME
-url "http://www.sitecollectionurl.com" -force REM ----- Remove the following comment
if features are present REM pause </pre>
        </div>
        <p>
          <br />
---------------------------------------------------------------------------------------------------------------------- 
</p>
        <p>
          <strong>
            <br />
Upgrade.cmd<br />
-------------------------------------------------<br /></strong>
        </p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">cls
REM ----- Deactivate the feature(s) -----
stsadm -o deactivatefeature -name FEATURENAME -url "http://www.sitecollectionurl.com" -force 

ECHO OFF 

ECHO .
ECHO .
ECHO -------------------------------------------------------------------------------------------
ECHO Verify that the correct solutions have been completly retracted and then press ENTER
ECHO -------------------------------------------------------------------------------------------
ECHO . 

pause 

ECHO ON 

REM ----- Upgrade the solution -----
stsadm -upgradesolution -n SOLUTIONNAME.wsp 
<br />
   -filename SOLUTIONNAME.wsp 
<br />
   -immediate -allowgacdeployment 
<br />
   -url "http://www.sitecollectionurl.com" ECHO OFF ECHO . ECHO . ECHO
-------------------------------------------------------------------------------------------
ECHO Solution deployment complete, press ENTER to activate features, if any ECHO -------------------------------------------------------------------------------------------
pause ECHO ON REM ----- Active features ----- stsadm -o activatefeature -name FEATURENAME
-url "http://www.sitecollectionurl.com" -force REM ----- Remove the following comment
if features are present REM pause </pre>
        </div>
        <p>
          <br />
----------------------------------------------------------------------------------------------------------------------------<br /><br />
If you have features in the solution, make sure you add the following line to the
&lt;assemblies&gt; section of the web.config of your web application 
</p>
        <p>
&lt;add assembly="SampleWSSSolution, Version=1.0.0.0, Culture=neutral, PublicKeyToken=assemblyPublicKeyToken"
/&gt; 
</p>
        <p>
Now you can create features, web parts, web services, etc.  Just make sure you
change the placeholder content in the different files to the correct names of the
features you create.  Once you're finished creating the solution, run the Deploy.cmd
file and the solution will be added to the Solution Management section of the Operations
tab in Central Admin 
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatingMOSSSolutionsWSPFiles_9720/image.png">
            <img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="112" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatingMOSSSolutionsWSPFiles_9720/image_thumb.png" width="240" border="0" />
          </a>
        </p>
        <p>
So, when do you use Deploy.cmd and when do you use Upgrade.cmd?
</p>
        <p>
Use deploy for the first deployment of the solution, or for local development deployments
where you need to deactivate the features as well as remove the solution for a clean
install.  Upgrade will run -upgradesolution which updates deployed files, such
as the assembly and aspx files.  This works great for re-deploying Page Layout
files that are already being used in production.  I'll most likely post on the
Publishing deployment process soon...
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=8ea8345e-ba1e-41dd-90f8-65e30498f0ae" />
      </body>
      <title>Creating MOSS Solutions (WSP Files)</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,8ea8345e-ba1e-41dd-90f8-65e30498f0ae.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/07/02/CreatingMOSSSolutionsWSPFiles.aspx</link>
      <pubDate>Mon, 02 Jul 2007 20:50:38 GMT</pubDate>
      <description>&lt;p&gt;
One of the greatest development features in MOSS is the ability to create solution
files which can be managed and deployed across your development landscape as you moved
towards production.&amp;nbsp;&amp;nbsp;When a solution is deployed, all files inside&amp;nbsp;are
deployed to the correct&amp;nbsp;locations,&amp;nbsp;which is extremely helpful in a load
balanced environment.&lt;br&gt;
&lt;br&gt;
I'll demonstrate here&amp;nbsp;what it takes to get a solution up and running from scratch.&amp;nbsp;
This is the template I use for all my new WSP files. 
&lt;p&gt;
Create a class library project in Visual Studio.&amp;nbsp; I'll name mine 'SampleWSSSolution'.&amp;nbsp;
Once the project has loaded, right click on the project name in the project explorer,
and click 'Properties'.&amp;nbsp; On the 'Signing' tab, click the checkbox 'Sign the assembly'
and in the drop down choose '&amp;lt;new&amp;gt;'.&amp;nbsp; In the 'Create Strong Name Key' popup,
enter 'SampleWSSSolution' in the 'Key file name:' text box, and uncheck the 'Protect
my key file with a password' checkbox. 
&lt;p&gt;
In the same project properties screen, click the 'Build Events' tab, and enter the
following into the 'Post-build event command line:' text area:&lt;br&gt;
&lt;br&gt;
cd $(ProjectDir)&lt;br&gt;
makecab /f CreateSolutionCAB.ddf&lt;br&gt;
&lt;br&gt;
This code will create the WSP file in the root directory of the project. 
&lt;p&gt;
&lt;br&gt;
Now, create four files in the VS project:&lt;br&gt;
- CreateSolutionCAB.ddf&lt;br&gt;
- manifest.xml&lt;br&gt;
- Deploy.cmd&lt;br&gt;
- Upgrade.cmd 
&lt;p&gt;
Here's what the contents of the files should look like: 
&lt;p&gt;
&lt;p&gt;
&lt;strong&gt;CreateSolutionCAB.ddf&lt;br&gt;
&lt;/strong&gt;This file tells makecab.exe what files to put into the CAB file&lt;strong&gt;
&lt;br&gt;
-----------------------------------------------------------------------&lt;/strong&gt;
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;.OPTION EXPLICIT ;generate errors
.Set CabinetNameTemplate=SOLUTIONNAME.wsp
.Set DiskDirectoryTemplate=CDROM ;All cabinets go into a single directory
.Set CompressionType=MSZIP ;** All files are compressed in cabinet files
.Set UniqueFiles="ON"
.Set Cabinet=on
.Set DiskDirectory1= 

;Here's the way it works...
;FileToCopyFromInProject NewFileInCABFile 

;manifest file
manifest.xml manifest.xml 

;features
FeatureName\feature.xml FeatureName\feature.xml
FeatureName\elements.xml FeatureName\elements.xml 

;aspx pages
CustomPageDirectoryName/default.aspx LAYOUTS\CustomPageDirectoryName\default.aspx
FeatureName\FeaturePageName.aspx LAYTOUS\DirectoryName\FeaturePageName.aspx 

;web parts
WebPartDirectoryName\feature.xml WebPartDirectryNameInFEATURES\feature.xml
WebPartDirectoryName\elementmanifest.xml WebPartDirectryNameInFEATURES\elementmanifest.xml
WebPartDirectoryName\WebPartName.webpart WebPartDirectryNameInFEATURES\WebPartName.webpart 

;assemblies
bin\debug\SampleWSSSolution.dll SampleWSSSolution.dll
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;br&gt;
&lt;br&gt;
----------------------------------------------------------------------------------------------------------------------------&lt;br&gt;
&lt;/p&gt;
&lt;strong&gt;&lt;/strong&gt; 
&lt;p&gt;
&lt;strong&gt;manifest.xml&lt;br&gt;
&lt;/strong&gt;This file is the manifest of the solution and tells WSS the contents and
where to put them once it is deployed&lt;br&gt;
&lt;strong&gt;----------------------------------------------------&lt;br&gt;
&lt;/strong&gt;
&lt;/p&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;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Solution&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;SolutionId&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="GUID"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;=&lt;a href="http://schemas.microsoft.com/sharepoint/"&gt;http://schemas.microsoft.com/sharepoint/&lt;/a&gt;&lt;/span&gt; 
&lt;br&gt;
&lt;span style="COLOR: #ff0000"&gt;ResetWebServer&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="TRUE"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;FeatureManifests&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;FeatureManifest&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="WebPartDirectryNameInFEATURES\feature.xml"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;FeatureManifest&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="FeatureName\feature.xml"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;FeatureManifests&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;TemplateFiles&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;TemplateFile&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="LAYOUTS\CustomPageDirectoryName\default.aspx"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;TemplateFile&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="LAYTOUS\DirectoryName\FeaturePageName.aspx"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;TemplateFiles&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assemblies&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assembly&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;DeploymentTarget&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="GlobalAssemblyCache"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Location&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="SampleWSSSolution.dll"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControls&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControl&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Assembly&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="SampleWSSSolution,
Version=1.0.0.0, Culture=Neutral, 
&lt;br&gt;
PublicKeyToken=assembyPublicKeyToken"&lt;/span&gt; 
&lt;br&gt;
&lt;span style="COLOR: #ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Namespace&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="SampleWSSSolution"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;TypeName&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="*"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;SafeControls&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assembly&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Assemblies&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;Solution&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;strong&gt;-------------------------------------------------------------------------------------------------------&lt;/strong&gt; 
&lt;p&gt;
&lt;strong&gt;
&lt;br&gt;
Deploy.cmd&lt;br&gt;
----------------------------------------------------&lt;br&gt;
&lt;/strong&gt;
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;REM ----- Deactivate the feature(s) -----
stsadm -o deactivatefeature -name FEATURENAME -url "http://www.sitecollectionurl.com" -force 

REM ----- Remove the features and solution -----
stsadm -o retractsolution -name SampleWSSSolution.wsp -immediate -url 
&lt;br&gt;
"http://www.sitecollectionurl.com" ECHO OFF ECHO . ECHO . ECHO -------------------------------------------------------------------------------------------
ECHO Verify that the correct solutions have been completly retracted and then press
ENTER ECHO -------------------------------------------------------------------------------------------
ECHO . pause ECHO ON REM ----- Delete the solution ----- stsadm -o deletesolution
-name SampleWSSSolution.wsp REM ----- Add and depoly the solution ----- stsadm -addsolution
-filename SampleWSSSolution.wsp stsadm -deploysolution -n SampleWSSSolution.wsp 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;-immediate -allowgacdeployment 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;-url "http://www.sitecollectionurl.com" ECHO OFF ECHO . ECHO . ECHO
-------------------------------------------------------------------------------------------
ECHO Solution deployment complete, press ENTER to activate features, if any ECHO -------------------------------------------------------------------------------------------
pause ECHO ON REM ----- Active features ----- stsadm -o activatefeature -name FEATURENAME
-url "http://www.sitecollectionurl.com" -force REM ----- Remove the following comment
if features are present REM pause &lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;br&gt;
---------------------------------------------------------------------------------------------------------------------- 
&lt;p&gt;
&lt;strong&gt;
&lt;br&gt;
Upgrade.cmd&lt;br&gt;
-------------------------------------------------&lt;br&gt;
&lt;/strong&gt;
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;cls
REM ----- Deactivate the feature(s) -----
stsadm -o deactivatefeature -name FEATURENAME -url "http://www.sitecollectionurl.com" -force 

ECHO OFF 

ECHO .
ECHO .
ECHO -------------------------------------------------------------------------------------------
ECHO Verify that the correct solutions have been completly retracted and then press ENTER
ECHO -------------------------------------------------------------------------------------------
ECHO . 

pause 

ECHO ON 

REM ----- Upgrade the solution -----
stsadm -upgradesolution -n SOLUTIONNAME.wsp 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;-filename SOLUTIONNAME.wsp 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;-immediate -allowgacdeployment 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;-url "http://www.sitecollectionurl.com" ECHO OFF ECHO . ECHO . ECHO
-------------------------------------------------------------------------------------------
ECHO Solution deployment complete, press ENTER to activate features, if any ECHO -------------------------------------------------------------------------------------------
pause ECHO ON REM ----- Active features ----- stsadm -o activatefeature -name FEATURENAME
-url "http://www.sitecollectionurl.com" -force REM ----- Remove the following comment
if features are present REM pause &lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;br&gt;
----------------------------------------------------------------------------------------------------------------------------&lt;br&gt;
&lt;br&gt;
If you have features in the solution, make sure you add the following line to the
&amp;lt;assemblies&amp;gt; section of the web.config of your web application 
&lt;p&gt;
&amp;lt;add assembly="SampleWSSSolution, Version=1.0.0.0, Culture=neutral, PublicKeyToken=assemblyPublicKeyToken"
/&amp;gt; 
&lt;p&gt;
Now you can create features, web parts, web services, etc.&amp;nbsp; Just make sure you
change the placeholder content in the different files to the correct names of the
features you create.&amp;nbsp; Once you're finished creating the solution, run the Deploy.cmd
file and the solution will be added to the Solution Management section of the Operations
tab in Central Admin 
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatingMOSSSolutionsWSPFiles_9720/image.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=112 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/CreatingMOSSSolutionsWSPFiles_9720/image_thumb.png" width=240 border=0&gt;&lt;/a&gt; 
&lt;p&gt;
So, when do you use Deploy.cmd and when do you use Upgrade.cmd?
&lt;/p&gt;
&lt;p&gt;
Use deploy for the first deployment of the solution, or for local development deployments
where you need to deactivate the features as well as remove the solution for a clean
install.&amp;nbsp; Upgrade will run -upgradesolution which updates deployed files, such
as the assembly and aspx files.&amp;nbsp; This works great for re-deploying Page Layout
files that are already being used in production.&amp;nbsp; I'll most likely post on the
Publishing deployment process soon...
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=8ea8345e-ba1e-41dd-90f8-65e30498f0ae" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,8ea8345e-ba1e-41dd-90f8-65e30498f0ae.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
      <category>WSP Development</category>
    </item>
  </channel>
</rss>