<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ThumNet &#187; site-definition</title>
	<atom:link href="http://blog.thumnet.com/tag/site-definition/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.thumnet.com</link>
	<description>Just a ThumNet blog</description>
	<lastBuildDate>Fri, 06 Aug 2010 09:34:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Problem with VS2010 beta 2 Site Definition</title>
		<link>http://blog.thumnet.com/problem-vs2010-beta2-sitedefinition/159/</link>
		<comments>http://blog.thumnet.com/problem-vs2010-beta2-sitedefinition/159/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 10:40:23 +0000</pubDate>
		<dc:creator>Jeffrey Tummers</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[qnh]]></category>
		<category><![CDATA[sharepoint2010]]></category>
		<category><![CDATA[site-definition]]></category>
		<category><![CDATA[visualstudio2010]]></category>

		<guid isPermaLink="false">http://blog.thumnet.com/?p=159</guid>
		<description><![CDATA[I encountered the following problem while creating a new custom Site Definition in Visual Studio 2010 beta 2. The problem occurs when trying to create a new Document Library in the site based on the custom Site Definition. Error message: Error An error occurred while getting items from the &#34;&#34; provider: Cannot complete this action. Please try [...]]]></description>
			<content:encoded><![CDATA[<p>I encountered the following problem while creating a new custom Site Definition in Visual Studio 2010 beta 2.</p>
<p>The problem occurs when trying to create a new Document Library in the site based on the custom Site Definition.</p>
<div id="attachment_164" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.thumnet.com/wp-content/uploads/2009/12/00-error-while-creating-document-library.png" rel="lightbox[159]"><img class="size-medium wp-image-164" title="00-error-while-creating-document-library" src="http://blog.thumnet.com/wp-content/uploads/2009/12/00-error-while-creating-document-library-300x188.png" alt="Error while trying to add a new Document Library" width="300" height="188" /></a><p class="wp-caption-text">Error while trying to add a new Document Library</p></div>
<p><strong>Error message:</strong></p>
<pre class="brush: plain;">
Error

An error occurred while getting items from the &quot;&quot; provider:
Cannot complete this action.

Please try again.
</pre>
<p><em>Read on to see the solution for this error.</em></p>
<p>Visual Studio 2010 now has native integration of SharePoint 2010 projects.</p>
<div id="attachment_160" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.thumnet.com/wp-content/uploads/2009/12/01-new-site-definition-in-vs2010.png" rel="lightbox[159]"><img class="size-medium wp-image-160" title="01-new-site-definition-in-vs2010" src="http://blog.thumnet.com/wp-content/uploads/2009/12/01-new-site-definition-in-vs2010-300x168.png" alt="New Site Definition in Visual Studio 2010" width="300" height="168" /></a><p class="wp-caption-text">New Site Definition in Visual Studio 2010</p></div>
<p>After creating the new Site Definition Project in the <strong>onet.xml</strong> file<strong> </strong>contains the following:</p>
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;Project Title=&quot;SampleSiteDefinition&quot; Revision=&quot;2&quot; ListDir=&quot;&quot; xmlns:ows=&quot;Microsoft SharePoint&quot; xmlns=&quot;http://schemas.microsoft.com/sharepoint/&quot;&gt;
  &lt;NavBars&gt;
  &lt;/NavBars&gt;
  &lt;Configurations&gt;
    &lt;Configuration ID=&quot;0&quot; Name=&quot;SampleSiteDefinition&quot;&gt;
      &lt;Lists/&gt;
      &lt;SiteFeatures&gt;
      &lt;/SiteFeatures&gt;
      &lt;WebFeatures&gt;
      &lt;/WebFeatures&gt;
      &lt;Modules&gt;
        &lt;Module Name=&quot;DefaultBlank&quot; /&gt;
      &lt;/Modules&gt;
    &lt;/Configuration&gt;
  &lt;/Configurations&gt;
  &lt;Modules&gt;
    &lt;Module Name=&quot;DefaultBlank&quot; Url=&quot;&quot; Path=&quot;&quot;&gt;
      &lt;File Url=&quot;default.aspx&quot;&gt;
      &lt;/File&gt;
    &lt;/Module&gt;
  &lt;/Modules&gt;
&lt;/Project&gt;
</pre>
<p><em>Now you can modify to the onet.xml and default.aspx as you like. </em></p>
<p>When deploying the new Site Definition, creating a site, and then trying to create a new Document Library you get the error above.  The solution for the error turned out to be the <strong>missing </strong>declaration of the <strong>&lt;DocumentTemplates&gt;</strong> XML node.</p>
<p>Correct default <strong>onet.xml</strong> should be:</p>
<pre class="brush: xml; highlight: [5,6];">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;Project Title=&quot;SampleSiteDefinition&quot; Revision=&quot;2&quot; ListDir=&quot;&quot; xmlns:ows=&quot;Microsoft SharePoint&quot; xmlns=&quot;http://schemas.microsoft.com/sharepoint/&quot;&gt;
  &lt;NavBars&gt;
  &lt;/NavBars&gt;
  &lt;DocumentTemplates&gt;
  &lt;/DocumentTemplates&gt;
  &lt;Configurations&gt;
      &lt;Lists/&gt;
      &lt;SiteFeatures&gt;
      &lt;/SiteFeatures&gt;
      &lt;WebFeatures&gt;
      &lt;/WebFeatures&gt;
      &lt;Modules&gt;
        &lt;Module Name=&quot;DefaultBlank&quot; /&gt;
      &lt;/Modules&gt;
    &lt;/Configuration&gt;
  &lt;/Configurations&gt;
  &lt;Modules&gt;
    &lt;Module Name=&quot;DefaultBlank&quot; Url=&quot;&quot; Path=&quot;&quot;&gt;
      &lt;File Url=&quot;default.aspx&quot;&gt;
      &lt;/File&gt;
    &lt;/Module&gt;
  &lt;/Modules&gt;
&lt;/Project&gt;
</pre>
<p>After re-deploying the Site Definition and creating a new Site, you are able to create a Document Library.</p>
<div id="attachment_170" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.thumnet.com/wp-content/uploads/2009/12/02-correctly-working-new-doclib-screen.png" rel="lightbox[159]"><img class="size-medium wp-image-170" title="02-correctly-working-new-doclib-screen" src="http://blog.thumnet.com/wp-content/uploads/2009/12/02-correctly-working-new-doclib-screen-300x188.png" alt="Working new Document Library" width="300" height="188" /></a><p class="wp-caption-text">Working new Document Library</p></div>
<h5>Reference:</h5>
<p><a href="http://msdn.microsoft.com/en-us/library/ms474369(office.14).aspx">Microsoft&#8217;s Reference for SharePoint 2010 onet.xml</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.thumnet.com/problem-vs2010-beta2-sitedefinition/159/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Looking for SharePoint 2010 Feature (GU)IDs</title>
		<link>http://blog.thumnet.com/looking-for-sharepoint-2010-feature-guid/142/</link>
		<comments>http://blog.thumnet.com/looking-for-sharepoint-2010-feature-guid/142/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 17:23:29 +0000</pubDate>
		<dc:creator>Jeffrey Tummers</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[feature-guid]]></category>
		<category><![CDATA[qnh]]></category>
		<category><![CDATA[sharepoint2010]]></category>
		<category><![CDATA[site-definition]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://blog.thumnet.com/?p=142</guid>
		<description><![CDATA[Have you ever been looking for a feature (GU)ID in SharePoint? Well here is an easy way to find them. I needed default SharePoint feature guids for the development of a custom Site Definition. Using a custom Site Definition you can automatically activate SharePoint features within the onet.xml file. Here we go: Open the SharePoint [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever been looking for a feature (GU)ID in SharePoint? Well here is an easy way to find them.</p>
<p>I needed default SharePoint feature guids for the development of a custom Site Definition. Using a custom Site Definition you can automatically activate SharePoint features within the onet.xml file.</p>
<p>Here we go:</p>
<ol>
<li>Open the SharePoint site in IE8 (or IE7).</li>
<li style="text-align: left;">Go to the Site Settings page.<br />
<img class="size-full wp-image-143" title="site-settings-menu" src="http://blog.thumnet.com/wp-content/uploads/2009/12/site-settings-menu.jpg" alt="site-settings-menu" width="259" height="587" /></li>
<li>Click on the Manage Site features (or Site Collection features)<br />
<img class="alignnone size-full wp-image-144" title="site-features" src="http://blog.thumnet.com/wp-content/uploads/2009/12/site-features.jpg" alt="site-features" width="287" height="131" /></li>
<li>Use the Developer Tools (shortcut F12)</li>
<li>Click in the toolbar on Find &#8211;&gt; Select Element by Click (shortcut CTRL+B, but this opens bookmarks manager on my machine)<br />
<img class="alignnone size-full wp-image-145" title="developertools-select" src="http://blog.thumnet.com/wp-content/uploads/2009/12/developertools-select.jpg" alt="developertools-select" width="393" height="168" /></li>
<li>Select the Activate (or Deactivate) button next to the feature you need the GUID from.<br />
<img class="alignnone size-full wp-image-147" title="select-feature-activate-button" src="http://blog.thumnet.com/wp-content/uploads/2009/12/select-feature-activate-button.jpg" alt="select-feature-activate-button" width="748" height="84" /></li>
<li>Developer Tools scrolls down to the HTML source for the specific button, the button tag is contained within a Div tag. This Div tag contains an ID attribute and thats the GUID for the feature!<br />
<img class="alignnone size-full wp-image-148" title="selected-feature-html" src="http://blog.thumnet.com/wp-content/uploads/2009/12/selected-feature-html.jpg" alt="selected-feature-html" width="502" height="213" /></li>
<li>In this case the GUID is: <strong>9c03e124-eef7-4dc6-b5eb-86ccd207cb87</strong><br />
<img class="alignnone size-full wp-image-149" title="selected-feature-guid" src="http://blog.thumnet.com/wp-content/uploads/2009/12/selected-feature-guid.jpg" alt="selected-feature-guid" width="492" height="145" /></li>
</ol>
<p>This trick also works for SharePoint 2007!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.thumnet.com/looking-for-sharepoint-2010-feature-guid/142/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
