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).

  • Here is workaround, create documents library using visual studio, add all the content types of wiki page library to the list definition of documents library – Akshay Dattatray Nangare Oct 15 '16 at 13:30
  • Don't create List Definition at all. It's an outdated approach - causes a lot of pain in maintenance. I recommend to create a custom Content Type for your columns. Then you create desired regular Wiki list(s) and add this CT into it (them). – dbardakov Jul 8 '17 at 7:01
  • @dbardakov - the problem is when you create list from wiki page library template in visual studio, you don't have access to columns tab, so you cant add custom type to wiki library :( – Zavael Mar 28 '18 at 10:52

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;" />
  • 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
  • 1
    My problem is to make this ListDefinition capable of creating proper Wiki Pages Libratry instances, not adding fields to a custom lists. (adding FeatureId to ListDef elements.xml does nothing, and changing it in elements.xml of instance make the project un-deployable ;) – Piotr Hajduk Aug 3 '12 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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