Learn how to import a Microsoft SharePoint 2010 site definition using Microsoft Visual Studio 2010 and Microsoft SharePoint Designer 2010. This sample accompanies the article
Importing SharePoint 2010 Site Definitions in Visual Studio 2010 in the MSDN Library.
Microsoft Visual Studio 2010 provides a project type that enables you to import a site definition and add code. You can then deploy this site definition to the SharePoint Solutions Gallery and create new sites based on the site definition.
This sample and the accompanying article demonstrate the following tasks:
- Creating a blank SharePoint 2010 site as a subsite from the SharePoint master site. This site is opened in SharePoint Designer 2010 for customization.
- Editing the site in SharePoint Designer and creating a new document library for candidate resumes. The new document library has an additional
Yes/No column added that indicates whether the person who presented the resume has been interviewed.
- Saving the modified site as a template in SharePoint Designer.
- Locating the modified template in SharePoint by clicking Site Settings, clicking
Galleries, and then clicking Solutions. The template is saved as a WSP file.
- Opening and customizing the WSP file in Visual Studio 2010.
- Adding a Web Part to the package that uses a Collaborative Application Markup Language (CAML) query to determine the number of resumes that have resulted in an interview and the number that have not resulted in an interview. These results are displayed
on a literal control as a percentage.
- Saving the solution as a WSP file in Visual Studio 2010.
- Uploading the new template and removing the existing templates.
- Creating a new site using the customized Recruitment site template.
- Uploading documents to the Resumes document library and setting the Interviewed column appropriately.
- Editing a page and selecting the Web Part that was added to the package in Visual Studio 2010.