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 want to create a Web Template programmatically in Sharepoint 2010.

I have read Vesa "vesku" Juvonen blog where he creates a web template using the elements.xml file and onet.xml file, but i want to do this programmatically.

Is this possible? Are there any blogs or code sample that show how to do this?

share|improve this question
up vote 0 down vote accepted

The definitions themselves need to be done through xml with the elements and onet files. Any other customization or feature activation can be done using feature receivers and code.

I've worked through some scenarios were I have minimal things defined in the xml, and then do much of the work in the feature receivers where you have full access to the api and code versus declarative means.

share|improve this answer

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.