SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

While creating Wiki Page Library from the browser (Site Actions->More Options->Wiki Page Library) is easy, doing it form Visual Studio not so much.

When I create new ListDefinition in Visual Studio 2010 I use Custom Library or Document library. Then in elements.xml of the ListDefinition I can edit DocumentTemplate (from default for Document Library 101 to 119 for the Wiki Page Library type) but it changes nothing and library stil behaves as normal document library. Is there something more to edit or do I have to generate this library from code?

I want to define my own columns so this is why I need to create ListDefinition. Because if you create new ListInstance you can choose Wiki Pages Library but then you have only Elements.xml in your Visual Studio 2010 project and can not add custom columns from there (only from SharePoint Designer).

share|improve this question

Did you remember to change the feature id as well? From onet.xml:

<List FeatureId="00BFEA71-C796-4402-9F2F-0EB9A6E71B18" Type="119" Title="$Resources:core,WikiWebLibPages;" Url="$Resources:core,WikiWebLibPages_Folder;" />
share|improve this answer
I need to change Id of the feature that activates this ListDefinition or add this FeatureId attribute to my Schema.xml of the ListDef? – Piotr Hajduk Aug 3 '12 at 13:32
Have a look at this MSDN article: Creating SharePoint 2010 List Definitions in Visual Studio 2010 – fraabye Aug 3 '12 at 13:36
Nice article but it doesn't help me at all. – Piotr Hajduk Aug 3 '12 at 13:44
In your elements.xml, in the line where you changed the template type, change the feature id if it exists. – fraabye Aug 3 '12 at 14:02
There is an existing post around adding fields (columns) to a custom list in elements.xml. – fraabye Aug 3 '12 at 14:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.