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

I have the following queries :

  1. How do I programmatically deploy Managed Metadata Fields, and associate then to particular Term Set in Store while deployment
  2. When I am trying to create List/List Definition programmatically, I get the option to create a customizable list from following templates only : enter image description here I would like to create a customizable list from piture library template, how do I do that?
share|improve this question

My advice is do not use xml list templates. It will give you many headaches when you are upgrading the solutions, creating lookups and etc...

I would suggest create a feature receiver and create the list in the feature activated event. With the C# code you get much flexibility and opportunities to change the things around without affecting the existing data.

There you can create Picture Libraries and customize it as well.

share|improve this answer
another point against custom XML list definitions: they will throw nonsensical errors and are impossible to debug. – Derek Gusoff Aug 25 '14 at 0:08

@vikas: You can only create a list definition based on the existing list types currently enabled in your site collection that you have set up for the visual studio project. Make sure that you have activated the SharePoint publishing farm solution / features first. You should also determine that if you were to create a new library manually that the picture library type is available. If it is not available from the web front end then it will not be an option that is available in visual studio.

share|improve this answer
The publishing feature is activated and picture library template is available for OOTB creation – vikas mehta Dec 13 '12 at 10:44
@vikasmehta, can you create a new picture library as a user instead of inside visual studio? Have you opened visual studio "as administrator"? I've had a few strange ones in the past on Windows 7 whereby by admin rights hadn't been elevated enough. Also, are you a site collection administrator on the site? – Brian Scott Dec 13 '12 at 11:12

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.