How can I create a survey list through visual studio?
I am using sharepoint 2013 and visual studio 2013.
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.
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.
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); clientContext.Load(newLib); clientContext.ExecuteQuery();