How can I create a survey list through visual studio?

I am using sharepoint 2013 and visual studio 2013.

  • In the sense you are creating a SP2013 app?
    – Stephen
    Commented Jan 24, 2014 at 11:27
  • No. Empty sharepoint project. Am able to create custom lists, calender lists etc. Commented Jan 24, 2014 at 11:30

3 Answers 3


There is no "Survey" list template within Visual Studio 2012 (or 2013 to my knowledge) so you would need to create this yourself.

There is an in built survey App within the 2013. The site below gives you an idea of how to set that up.

How to quickly build a Survey using SharePoint 2013

  • Thanks Stephan. I could do the same from sharepoint UI. But I need to do it using visual studio. For the ease of integration. Any way for getting it? Commented Jan 24, 2014 at 11:41
  • You could reverse engineer the WSP to give you the list details but you would still need to develop the rest of it. you would NOT be able to get the list template for VS.
    – Stephen
    Commented Jan 24, 2014 at 12:52
  • I am able to get and export the survey template as .stp file. Here I stuck. Can I copy entire stuff from manifest.xml to schema.xml? Commented Jan 24, 2014 at 17:17

You can create it from the SharePoint UI, export the site to WSP and then import it in Visual Studio, the below link explains how you can export the site to WSP and import it in VS.


  • Sorry. But link is missing :) Commented Jan 24, 2014 at 11:59
  • Also can I export that survey only? Commented Jan 24, 2014 at 12:10
  • So sorry for late reply, i have added the link and yes you can import only the Survey List but you will have to export the whole site Commented Jan 26, 2014 at 13:10

You can create survey list using SharePoint client object model.this This code user can include anywhere just copy paste in your visual studio

ClientContext clientContext = new ClientContext("siteurl");
            clientContext.AuthenticationMode = ClientAuthenticationMode.Default;
            clientContext.Credentials = new System.Net.NetworkCredential("administrator", "password", "raghupc");
             Web oweb = clientContext.Web;
            ListCreationInformation lci = new ListCreationInformation();
            lci.Description = "SurveyTest";
            lci.Title = "SurveyTest";
             lci.TemplateType = 102;
            List newLib = clientContext.Web.Lists.Add(lci);


Please find the attached link

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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