<?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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>Rich Finn</title>
    <link>http://blog.richfinn.net/</link>
    <description>MOSS, WSS3,  and other MS related posts</description>
    <language>en-us</language>
    <copyright>Rich Finn</copyright>
    <lastBuildDate>Thu, 08 Jan 2009 22:14:36 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.9.7174.0</generator>
    <managingEditor>blog.richfinn.net@gmail.com</managingEditor>
    <webMaster>blog.richfinn.net@gmail.com</webMaster>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
      <trackback:ping>http://blog.richfinn.net/Trackback.aspx?guid=38290727-37c4-4de3-8171-30d8d8eca20b</trackback:ping>
      <pingback:server>http://blog.richfinn.net/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/PermaLink,guid,38290727-37c4-4de3-8171-30d8d8eca20b.aspx</pingback:target>
      <dc:creator>Rich Finn</dc:creator>
      <wfw:commentRss>http://blog.richfinn.net/SyndicationService.asmx/GetEntryCommentsRss?guid=38290727-37c4-4de3-8171-30d8d8eca20b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I’m a huge fan of the Telerik RadEditor for rich-text editing in SharePoint 2007,
however, since it’s release, there has been a very frustrating issue with the Reusable
Content functionality in the control.  It hasn’t worked.
</p>
        <p>
The core of the issue is that the relationship between the Reusable Content fragment
and the Reusable Content list is severed when the page is saved.
</p>
        <p>
You can read about the issue on <a href="http://webgrizzly.wordpress.com/2008/01/23/problem-with-telerik-radeditor-for-moss-2007/" target="_blank">WebGrizzly’s
blog</a>, as well as on Telerik’s site both <a href="http://www.telerik.com/community/forums/sharepoint-2007/lite-editor-for-moss/sharepoint-reusable-content.aspx" target="_blank">here</a> and <a href="http://www.telerik.com/community/forums/sharepoint-2007/full-featured-editor/reusable-content.aspx" target="_blank">here</a>. 
There’s even a <a href="http://www.telerik.com/community/forums/sharepoint-2007/full-featured-editor/reusable-content-in-radeditor.aspx" target="_blank">post</a> where
Telerik says that they have done all they can and don’t think it’s possible to have
Reusable Content in the RadEditor.
</p>
        <p>
I didn’t like the sound of this, as I HAD to have this working in the RadEditor for
a custom Feature I was working on, so in I dove.  By walking down the path that
the content takes in SharePoint’s default rich-text-editor, I found that it’s a combination
of both client-side and server-side code that makes Reusable Content possible.
</p>
        <p>
In order to fix the RadEditor, you have to do a bit of custom coding.  I’m not
going to go into Solutions or Features here, as you already should know how to create
them if you want to fix the control, and to make things easier, I’ve posted the <a href="http://www.codeplex.com/sptelerikrcfix" target="_blank">class
file on CodePlex</a>.  Essentially, you need to create your own custom implementation
of the RadEditor by inheriting from the RadHtmlField and drawing the code out a little
further to add the needed client-side and server-side processing to wire up the functionality.
</p>
        <p>
If the task of creating your own implementation of the RadEditor seems a little daunting,
trust me, it’s not that bad, and it’s completely worth it.  As you already know,
the RadEditor is awesome, and Telerik’s controls are some of the best out there. 
The controls in <a href="http://www.telerik.com/products/aspnet-ajax/sharepoint.aspx" target="_blank">Telerik’s
ASP.NET AJAX</a> suite even work in SharePoint, and if you get the full version of
the RadEditor for SharePoint, you actually are getting the full suite.
</p>
        <p>
          <a href="http://www.codeplex.com/sptelerikrcfix" target="_blank">Download the RadEditor
Reusable Content fix</a>
        </p>
        <p>
So – you may be wondering, have you shared this code with Telerik? 
</p>
        <p>
I actually contacted Telerik and was surprised by the response I got.  I was
asked if I had tested this fix with the blog and wiki editors, as well as the web
part editor.  Telerik was also curious if I was able to fix the Reusable Content
fragment selection dialog box (_layouts/ReusableTextPicker.aspx) in Firefox, as they
were hesitant to implement code that still exposed some issues related with Reusable
Content. I responded with my opinion that it shouldn’t matter as Reusable Content
is a component of the Publishing Feature – the classname of the ResusableTextPicker
is Microsoft.SharePoint.<strong>Publishing</strong>.Internal.CodeBehind.ReusableTextPickerPage
– and the button for adding Reusable Content is on the toolbar of the out-of-box text
editor for Publishing Fields.  The blog and wiki templates are part of WSS, not
SharePoint, and the content editor web part, even added to pages on Publishing sites,
does not have the ability to add Reusable Content.
</p>
        <p>
As for the errors on the ReusableTextPicker page in FireFox, I don’t feel that it
should be Telerik’s responsibility (or mine of that matter) to fix it. That problem
is caused by the JavaScript used to retrieve the values of the expando attributes
on the table rows of the page as it’s shipped by Microsoft.  If only they had
used <a href="http://www.jquery.com" target="_blank">JQuery</a>…
</p>
        <p>
One final thing – <strong><font color="#ff0000">this is not supported by Telerik!</font></strong> 
If you implement, you have to give thought about your upgrade path when Telerik releases
a new version of the assembly.  Also, I’m leaving my code in beta for right now
as I’m the only one i know of that’s used it, so if you give it a shot, please let
me know how it works out for you.
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/aggbug.ashx?id=38290727-37c4-4de3-8171-30d8d8eca20b" />
      </body>
      <title>Fixing the Reusable Content bug in Telerik&amp;rsquo;s RadEditor for SharePoint</title>
      <guid isPermaLink="false">http://blog.richfinn.net/PermaLink,guid,38290727-37c4-4de3-8171-30d8d8eca20b.aspx</guid>
      <link>http://feedproxy.google.com/~r/RichFinn/~3/s0uDX81jzmA/FixingTheReusableContentBugInTelerikrsquosRadEditorForSharePoint.aspx</link>
      <pubDate>Thu, 08 Jan 2009 22:14:36 GMT</pubDate>
      <description>&lt;p&gt;
I’m a huge fan of the Telerik RadEditor for rich-text editing in SharePoint 2007,
however, since it’s release, there has been a very frustrating issue with the Reusable
Content functionality in the control.&amp;nbsp; It hasn’t worked.
&lt;/p&gt;
&lt;p&gt;
The core of the issue is that the relationship between the Reusable Content fragment
and the Reusable Content list is severed when the page is saved.
&lt;/p&gt;
&lt;p&gt;
You can read about the issue on &lt;a href="http://webgrizzly.wordpress.com/2008/01/23/problem-with-telerik-radeditor-for-moss-2007/" target=_blank&gt;WebGrizzly’s
blog&lt;/a&gt;, as well as on Telerik’s site both &lt;a href="http://www.telerik.com/community/forums/sharepoint-2007/lite-editor-for-moss/sharepoint-reusable-content.aspx" target=_blank&gt;here&lt;/a&gt; and &lt;a href="http://www.telerik.com/community/forums/sharepoint-2007/full-featured-editor/reusable-content.aspx" target=_blank&gt;here&lt;/a&gt;.&amp;nbsp;
There’s even a &lt;a href="http://www.telerik.com/community/forums/sharepoint-2007/full-featured-editor/reusable-content-in-radeditor.aspx" target=_blank&gt;post&lt;/a&gt; where
Telerik says that they have done all they can and don’t think it’s possible to have
Reusable Content in the RadEditor.
&lt;/p&gt;
&lt;p&gt;
I didn’t like the sound of this, as I HAD to have this working in the RadEditor for
a custom Feature I was working on, so in I dove.&amp;nbsp; By walking down the path that
the content takes in SharePoint’s default rich-text-editor, I found that it’s a combination
of both client-side and server-side code that makes Reusable Content possible.
&lt;/p&gt;
&lt;p&gt;
In order to fix the RadEditor, you have to do a bit of custom coding.&amp;nbsp; I’m not
going to go into Solutions or Features here, as you already should know how to create
them if you want to fix the control, and to make things easier, I’ve posted the &lt;a href="http://www.codeplex.com/sptelerikrcfix" target=_blank&gt;class
file on CodePlex&lt;/a&gt;.&amp;nbsp; Essentially, you need to create your own custom implementation
of the RadEditor by inheriting from the RadHtmlField and drawing the code out a little
further to add the needed client-side and server-side processing to wire up the functionality.
&lt;/p&gt;
&lt;p&gt;
If the task of creating your own implementation of the RadEditor seems a little daunting,
trust me, it’s not that bad, and it’s completely worth it.&amp;nbsp; As you already know,
the RadEditor is awesome, and Telerik’s controls are some of the best out there.&amp;nbsp;
The controls in &lt;a href="http://www.telerik.com/products/aspnet-ajax/sharepoint.aspx" target=_blank&gt;Telerik’s
ASP.NET AJAX&lt;/a&gt; suite even work in SharePoint, and if you get the full version of
the RadEditor for SharePoint, you actually are getting the full suite.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codeplex.com/sptelerikrcfix" target=_blank&gt;Download the RadEditor
Reusable Content fix&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
So – you may be wondering, have you shared this code with Telerik? 
&lt;/p&gt;
&lt;p&gt;
I actually contacted Telerik and was surprised by the response I got.&amp;nbsp; I was
asked if I had tested this fix with the blog and wiki editors, as well as the web
part editor.&amp;nbsp; Telerik was also curious if I was able to fix the Reusable Content
fragment selection dialog box (_layouts/ReusableTextPicker.aspx) in Firefox, as they
were hesitant to implement code that still exposed some issues related with Reusable
Content. I responded with my opinion that it shouldn’t matter as Reusable Content
is a component of the Publishing Feature – the classname of the ResusableTextPicker
is Microsoft.SharePoint.&lt;strong&gt;Publishing&lt;/strong&gt;.Internal.CodeBehind.ReusableTextPickerPage
– and the button for adding Reusable Content is on the toolbar of the out-of-box text
editor for Publishing Fields.&amp;nbsp; The blog and wiki templates are part of WSS, not
SharePoint, and the content editor web part, even added to pages on Publishing sites,
does not have the ability to add Reusable Content.
&lt;/p&gt;
&lt;p&gt;
As for the errors on the ReusableTextPicker page in FireFox, I don’t feel that it
should be Telerik’s responsibility (or mine of that matter) to fix it. That problem
is caused by the JavaScript used to retrieve the values of the expando attributes
on the table rows of the page as it’s shipped by Microsoft.&amp;nbsp; If only they had
used &lt;a href="http://www.jquery.com" target=_blank&gt;JQuery&lt;/a&gt;…
&lt;/p&gt;
&lt;p&gt;
One final thing – &lt;strong&gt;&lt;font color=#ff0000&gt;this is not supported by Telerik!&lt;/font&gt;&lt;/strong&gt;&amp;nbsp;
If you implement, you have to give thought about your upgrade path when Telerik releases
a new version of the assembly.&amp;nbsp; Also, I’m leaving my code in beta for right now
as I’m the only one i know of that’s used it, so if you give it a shot, please let
me know how it works out for you.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/aggbug.ashx?id=38290727-37c4-4de3-8171-30d8d8eca20b" /&gt;</description>
      <comments>http://blog.richfinn.net/CommentView,guid,38290727-37c4-4de3-8171-30d8d8eca20b.aspx</comments>
    <feedburner:origLink>http://blog.richfinn.net/2009/01/08/FixingTheReusableContentBugInTelerikrsquosRadEditorForSharePoint.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://blog.richfinn.net/Trackback.aspx?guid=fcf33971-919a-4086-8f53-8dd9d05d0b41</trackback:ping>
      <pingback:server>http://blog.richfinn.net/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/PermaLink,guid,fcf33971-919a-4086-8f53-8dd9d05d0b41.aspx</pingback:target>
      <dc:creator>Rich Finn</dc:creator>
      <wfw:comment>http://blog.richfinn.net/CommentView,guid,fcf33971-919a-4086-8f53-8dd9d05d0b41.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/content/binary/WindowsLiveWriter/BuildingSolutionsWSPinVisualStudioSayhe_DEB3/image_thumb_12.png" width="696" border="0" /></a><br />
Column definition:<br /><a href="http://blog.richfinn.net/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/PermaLink,guid,fcf33971-919a-4086-8f53-8dd9d05d0b41.aspx</guid>
      <link>http://feedproxy.google.com/~r/RichFinn/~3/SlyKASRS0os/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/aggbug.ashx?id=fcf33971-919a-4086-8f53-8dd9d05d0b41" /&gt;</description>
      <comments>http://blog.richfinn.net/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>
    <feedburner:origLink>http://blog.richfinn.net/2008/08/13/BuildingSolutionsWSPInVisualStudioSayHelloToSPSource.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://blog.richfinn.net/Trackback.aspx?guid=2c3596d1-d7f3-4dad-8484-4a45e5ed315d</trackback:ping>
      <pingback:server>http://blog.richfinn.net/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/PermaLink,guid,2c3596d1-d7f3-4dad-8484-4a45e5ed315d.aspx</pingback:target>
      <dc:creator>Rich Finn</dc:creator>
      <wfw:comment>http://blog.richfinn.net/CommentView,guid,2c3596d1-d7f3-4dad-8484-4a45e5ed315d.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/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/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/PermaLink,guid,2c3596d1-d7f3-4dad-8484-4a45e5ed315d.aspx</guid>
      <link>http://feedproxy.google.com/~r/RichFinn/~3/LHrHpEY73gc/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/aggbug.ashx?id=2c3596d1-d7f3-4dad-8484-4a45e5ed315d" /&gt;</description>
      <comments>http://blog.richfinn.net/CommentView,guid,2c3596d1-d7f3-4dad-8484-4a45e5ed315d.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
    <feedburner:origLink>http://blog.richfinn.net/2008/07/22/PublicFacingSharePointHeresSomethingScaryPleaseActivateViewFormPagesLockDown.aspx</feedburner:origLink></item>
  </channel>
</rss>
