<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/language/xml/tags/Net</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sun, 26 May 2013 13:37:50 GMT</pubDate>
<item>
<title>(XML) Setting up Sharepoint files as a visual studio .Net solution - rumremix</title>
<link>http://snipplr.com/view/63219/setting-up-sharepoint-files-as-a-visual-studio-net-solution/</link>
<description><![CDATA[ <p>Setting up a sp .net soln 

File --&amp;gt; New --&amp;gt; Project
on lefthand side -&amp;gt; Sharepoint -&amp;gt; 2010
usually select an empty template
name the project

to add files, create a module...
right-click project --&amp;gt; add --&amp;gt; new item
select "module"
give the module a name (such as masterpagecatalog)
this will create the module, containing an elements.xml file and open the elements.xml file in code editor. Sample.txt will also be created but may be deleted.

Drag any previously created files that will live in the new module into the module icon in solution explorer

Edit elements.xml.  (See example edits to elements.xml in code block further down.) 


Edits to make to default xml:

in &amp;lt;Module&amp;gt; tag, put a url (such as  Url="_catalogs/masterpage" ) and put  RootWebOnly="TRUE"

The &amp;lt;file&amp;gt; tag will also be created with a default url property. Make sure to edit this so that it is correct. By default, it will create a path starting with the name of the module. And if there is no such folder already with that name beneath the Module path, the feature will create one.  The actual path is designated by both the &amp;lt;module&amp;gt; url property and the &amp;lt;file&amp;gt; url property (that is, both of those properties are combined).

Add Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE" to the &amp;lt;file&amp;gt; elements. IgnoreIfAlreadyExists="TRUE" means "overwrite existing file". Type="GhostableInLibrary" setting is used when a file is placed into a library. If a file is placed outside of a library, Type="Ghostable" would be used.

Change the &amp;lt;file&amp;gt; tags so that it is not self-closing.

Add some Property tags.Columns in the master page correspond to file object properties indicated in the module xml. Other file properties in the xml will also be added to the "property bag" that do not correspond to master page columns (see &amp;lt;property&amp;gt; tags above). 

First, it is good practice to always add
&amp;lt;Property Name="FeatureId" Value="$SharePoint.Feature.Id$" Type="string"/&amp;gt;

On compliation, Value="$SharePoint.Feature.Id$" will be replaced with guid of feature. 

For a master page, the following metadata will be added via the property tags

&amp;lt;Property Name="UIVersion" Value="4" /&amp;gt;  
&amp;lt;Property Name="ContentTypeId" Value="0x010105" /&amp;gt;
&amp;lt;Property Name="ContentType" Value="$Resources:cmscore,contenttype_masterpage_name;" /&amp;gt;
&amp;lt;Property Name="MasterPageDescription" Value="Masterpage for SepulvedaPOC sites." /&amp;gt; 


Make sure to edit the description as appropriate.

When the module was created, VS automatically created a feature called "Feature 1". Note that features may also be created by right-clicking "Features" in soln explorer and selecting "Add Feature".

Next step: add event reciever feature activated code if necessary

* Make sure to add the proper modules to the feature
* Make sure that Scope is set to "Site" in the feature if the solution is a sandbox solution</p> ]]></description>
<pubDate>Fri, 10 Feb 2012 04:50:30 GMT</pubDate>
<guid>http://snipplr.com/view/63219/setting-up-sharepoint-files-as-a-visual-studio-net-solution/</guid>
</item>
<item>
<title>(XML) Priority Binding - ethansimmons</title>
<link>http://snipplr.com/view/34652/priority-binding/</link>
<description><![CDATA[ <p>WPF unleashed pg 303</p> ]]></description>
<pubDate>Mon, 17 May 2010 16:27:18 GMT</pubDate>
<guid>http://snipplr.com/view/34652/priority-binding/</guid>
</item>
<item>
<title>(XML) .NET Connection String - Anthony</title>
<link>http://snipplr.com/view/8058/net-connection-string/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 27 Aug 2008 09:38:41 GMT</pubDate>
<guid>http://snipplr.com/view/8058/net-connection-string/</guid>
</item>
<item>
<title>(XML) URLRewriter.NET Regex - omixen</title>
<link>http://snipplr.com/view/5887/urlrewriternet-regex/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 16 Apr 2008 11:45:21 GMT</pubDate>
<guid>http://snipplr.com/view/5887/urlrewriternet-regex/</guid>
</item>
</channel>
</rss>