Creating a site column
A site column is the building block for creating a content type. In this recipe, we will create a site column using the SharePoint object model.
Getting ready
You should have a fully-functional development machine with SharePoint 2010 installed and configured. You also need Visual Studio 2010 IDE installed on the same development machine. For more information on this, refer to Chapter 1, List and Event Receivers.
How to do it…
- Launch your Visual Studio 2010 IDE as an administrator (right-click on the shortcut and select Run as administrator.)
- Select File | New | Project. The new project wizard dialog box as shown in the following screenshot will be displayed (make sure to select .NET Framework 3.5 in the top drop-down box):
Get Microsoft SharePoint 2010 Development with Visual Studio 2010: Expert Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.