1. Open Visual
Studio 2012 (Run as administrator).
2. Go to
File=> New => Project.
3. Select Console
Application in the Visual C# node from the installed
templates.
4. Enter
the Name and click on Ok.
5. In
the solution explorer, right click on References folder and
then click on Add Reference.
6. Add
the following assemblies from 15 hive (C:\Program Files\Common Files\microsoft
shared\Web Server Extensions\15\ISAPI).
a. Microsoft.SharePoint.Client.dll
b. Microsoft.SharePoint.Client.Runtime.dll
7. Open
Program.cs file and replace the code with the following
using System.Linq;using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Microsoft.SharePoint.Client;
{
/// <summary>
/// Console Application
/// Create a custom task list using CSOM
/// </summary>
class Program
{
static void Main(string[] args)
{
// Get
the context to the SharePoint site
ClientContext context = new ClientContext("http://c4968397007/");
Web web = context.Web;
ListCreationInformation
creationInfo = new ListCreationInformation();
creationInfo.Title = "Custom Tasks";
creationInfo.Description = "My Custom Task List";
creationInfo.TemplateType = (int)ListTemplateType.Tasks;
// Add
the new task list to the list collection
web.Lists.Add(creationInfo);
//
Execute the query to the server
context.ExecuteQuery();
}
}
}
Summary:
A custom task list will be created successfully. Thus in this blog we have seen how to create a custom task list in Sharepoint 2013 using Client Side Object Model.

Join the conversation! Your thoughts help the community grow.