How to create a custom SharePoint list definition using Visual Studio 2012

In this article you will learn how to create a custom list definition (not a list instance) using the Visual Studio 2012 visual designer with step-by-step with screenshots.

In Visual Studio 2012 select File | New Project

Select Templates | Visual C# | Office/SharePoint | SharePoint 2013 – Empty Project


If you don’t see this type of project available then you may need to download and install the Microsoft Office Developer Tools for Visual Studio 2012

Provide a name and location for the project/solution and OK

In the SharePoint Customization Wizard Prompt, configure the server to use for developing/debugging. If possible you will want to try and achieve a Sandboxed solution over a Farm Solution due to it’s ability to be able to be reused in more scenarios requiring less permission is the SharePoint environment.


Once the new solution has been created, we can use the new Visual Designer to create the List Definition. Right click the project in the solution explorer and select Add | New Item


Select Visual C# Items | Office/SharePoint | List, provide a name and click OK


Provide a display name for the list. We just want to create a list definition, not an instance of the list; This isn’t an option so what we do instead is go with the “Create a customizable list template and a list instance of it” and we will make some mods to the generated project files to remove the list instance so we are just left with the definition.


You should now see the list instance and definition files in solution explorer.


If you select the SettingsProfile in the solution explorer you will get the new List Visual Designer. Notice the “List” tab, this represents the instance of the list.


Since we only want the list definition, we are going to delete the list instance files from solution explorer. Select SettingProfileInstance, right-click and Delete.


You should now be left with just the list definition, the “List” tab will now be greyed out.


We can now get on with creating the list definition and there are plenty of articles out there on the finer points of doing this. Here are some for reference:


Just for completeness if you are following this through I’ve added a couple of columns to my definition.


Now lets deploy it to SharePoint to make sure it works

Double click the Feature in solution explorer to bring up the feature visual designer and package explorer

Here you can set options such as how the feature appears and it’s scope. For our purposes just confirm the items in the feature include just the list definition files.


Now select the project, right-click and Deploy


Once the solution has been deployed I’m going to navigate to my site in a browser and verify that the new solution has been deployed and the feature activated (by default the solution is deployed and activated, and the feature is scoped at a web level and activated). You should see messages in the Visual Studio status bar to this effect during the deployment.





Everything is now is place for us to create an instance of the list from the definition, so I’ll create a new app and select our Widget Settings Profile app (list definition).


Provide a name for the new list instance based on our custom list definition.


We can now create items in the list and we see our columns coming through that were defined in the custom list definition.


Job complete, in this article we went through creating a list definition using the Visual Studio 2012 SharePoint 2013 List project template. We manually deleted the default list instance files so that we were just left with the list definition in our solution.

12 thoughts on “How to create a custom SharePoint list definition using Visual Studio 2012

Add yours

    1. Hi Ajeet,

      I think the lookup column type is not available through the Visual Designer and you have to revert to manipulating the xml file directly to add this type of column. Here’s some articles related to the subject that hopefully point you in the right direction.


  1. Good Post. I also created site definition and deploy then create new item , I couldn’t input new item , so as to reslove this issue, I tried to open schema.xml with visual studio 2012, there shows some properties are not declared, but I don’t know how to declare some properties on schema.xml


    1. Your problem sounds very specific to the site definition that you have created and sounds like there are mandatory properties (that must be included in the schema) that are missing. A suggestion that comes to mind is to try SPCAF. It has a free module called SPCop that validates a lot of SharePoint rules (especially in SharePoint xml files) and will pick up a lot of these types of issues before you get to putting it onto your SharePoint server. If it picks up errors they should be more meaningful than the errors SharePoint is throwing at run time.


  2. Very helpful Cameron…Thank you.

    I have a requirement for my company where I need to create a web part that displays articles from any list on the intranet. For the articles to be displayed correctly with Read More link at the bottom of the short description, I point to a JS file store in /_catalogs/masterpage gallery. My thinking is to create a list definition then with when ever a person creates an instance of the list, that JS link should be hardcoded already so that end users with little to no SharePoint Dev experience can use it. Your help will be appreciated.


  3. Thanks for sharing this step by step guide. We were able to create a custom list definition for our site with views and attached custom forms. But recently we bumped into an issue that the library created using the custom list definition does not display any file/folder when opening using any of the MS office products. We hope you could help us.


    1. I haven’t come across this issue before. Since I wrote that article Microsoft has changed their guidance on provisioning artefacts in SharePoint and the current guidance is to use remote provisioning. The Office Dev Patterns and Practices group (PnP) has been focused around the effort of supporting this move away from SharePoint Solutions and Features to use remote provisioning instead


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create a website or blog at

Up ↑

%d bloggers like this: