Adding SharePoint Project Items to SharePoint 2010 in Visual Studio 2010
Summary: Learn how to add and work with SharePoint project items in Microsoft SharePoint 2010 to quickly build business solutions by using the SharePoint development tools in Microsoft Visual Studio 2010.
Applies to: Office 2010 | SharePoint Foundation 2010 | SharePoint Server 2010 | Visual Studio | Visual Studio 2008 | Visual Studio 2010
Provided by: Ted Pattison, Critical Path Training, LLC (SharePoint MVP)
![]() The SharePoint development tools in Microsoft Visual Studio 2010 make it easier to create business solutions, by using SharePoint project items. This Microsoft SharePoint 2010 Visual How To demonstrates how to add SharePoint project items to create a new list with event handlers that enforce custom business rules. ![]() Start by creating a new SharePoint site by using the Blank site template. You will use this site as a test site. Next, launch Microsoft Visual Studio 2010 and create a new SharePoint project named Movies by using the Empty SharePoint Project template. When you are prompted by the SharePoint Configuration Wizard, add the URL of a local test site and select Deploy as a sandboxed solution. Now, build the project using the following steps. To build the SharePoint project and add SharePoint project items
|
![]()
Watch the video
> [!VIDEO https://www.microsoft.com/en-us/videoplayer/embed/21665af4-e7fc-4574-b9f3-9d5a08fd22c5] Length: 00:18:41 ![]()
About the Author
|
You can use several different types of SharePoint project templates to create SharePoint project items when you are creating business solutions by using the SharePoint development tools in Microsoft Visual Studio 2010. These are described in Table 1. For more information, see SharePoint Project and Project Item Templates.
Table 1. Project templates used to create SharePoint project items
Template Name |
Description |
Solution Type Supported |
---|---|---|
Visual Web Part |
Web Part that relies on a user control to provide its user interface elements. |
Farm only |
Web Part |
Standard Web Part that does not rely on a user control. |
Sandboxed or Farm |
Sequential Workflow |
Workflow template for creating sequential workflows. |
Farm only |
State Machine Workflow |
Workflow template for creating state machine workflows. |
Farm only |
Workflow Association Form |
Application page used to accept user input to configure a workflow association. |
Farm only |
Workflow Initiation Form |
Application page used to accept user input just before a workflow instance begins to execute. |
Farm only |
Business Data Connectivity Model |
Component with a visual designer for creating a Microsoft .NET Connector to integrate external data sources into solutions that are based on Microsoft Business Connectivity Services (BCS) and SharePoint Search. |
Farm only |
Event Receiver |
Class that has an event receiver and a feature element to wire it to a specific event. |
Sandboxed or Farm |
Module |
Folder into which you add Elem,element files, which automatically maintains a Module element with an inner File element for each file. |
Sandboxed or Farm |
Content Type |
Collaborative Application Markup Language (CAML) element for creating a SharePoint content type. |
Sandboxed or Farm |
List Definition from Content Type |
CAML elements for creating a SharePoint List Definition from a specific content type. |
Sandboxed or Farm |
List Definition |
CAML elements for creating a SharePoint List Definition from a specific list type. |
Sandboxed or Farm |
List Instance |
CAML element for provisioning a list instance. |
Sandboxed or Farm |
Empty Element |
Blank element manifest into which you add any CAML elements. |
Sandboxed or Farm |
User Control |
An .ascx file and supporting code-beside file for creating a user interface by using a visual designer. |
Farm only |