I am working with visual studio 2012 and want to add sharepoint 2013 "Web Template" item from VS 2012 list of sharepoint 2013 item templates. But I could not find "Web Template" item in SP 2013 item templates list? From where i can get and How can I add "web template" item to SP2013 item templates in VS 2012.
2 Answers
There is no actual Project item template in Visual Studio 2012 to create this but the links here below point to articles giving you the step by step procedure, after you decide whether you want the Site Definion (farm deployment only) or the Web Template (sandboxed or SharePoint Online compatible). Mirjam has quite a good explanation of these aspects here http://sharepointchick.com/archive/0001/01/01/site-definitions-vs.-webtemplates.aspx
Also, even if it target VS 2010, is perfectly doable with Visual Studio 2012, is a step by step procedure into creating one http://blogs.msdn.com/b/vesku/archive/2010/10/14/sharepoint-2010-and-web-templates.aspx
Both articles also describe some tricks and benefits,in case you need to figure out, which approach to choose
There are two types of Templates when it comes to Webs.
One is Site Definition and other is web template, you can save a web as a template when it is created using out of box or custom site definition.
This article will explain you the difference between site template and site definition.
To create a site definition project
On the menu bar, choose File, New, Project. If your IDE is set to use Visual Basic development settings, on the menu bar, choose File, New Project.
The New Project dialog box appears.
Expand the Visual C# node or the Visual Basic node, expand the SharePoint node, and then choose the 2010 node.
In the Templates list, choose the SharePoint 2010 Project template.
In the Name box, enter TestSiteDef, and then choose the OK button.
The SharePoint Customization Wizard appears.
On the Specify the site and security level for debugging page, enter the URL for the SharePoint site where you want to debug the site definition, or use the default location (httpSystem Name/).
In the What is the trust level for this SharePoint solution? section, choose the Deploy as a farm solution option button.
All site definition projects must be deployed as farm solutions. For more information about sandboxed solutions versus farm solutions, see Sandboxed Solution Considerations.
Choose the Finish button.
The project appears in Solution Explorer.
In Solution Explorer, choose the project node, and then, on the menu bar, choose Project, Add New Item.
Under either Visual C# or Visual Basic, expand the SharePoint node, and then choose the 2010 node.
In the Templates pane, choose the Site Definition template, leave the Name as SiteDefinition1, and then choose the Add button.
For More information check this MSDN article out.