Creating a SharePoint list via a Console Application
This month I thought I would document the process of creating a list through a console application in Visual Studio, In this post we create a Todo List with site columns and add them to the default view.
- So we need so we need to right click on the project name and go to Properties, click on build and then change the platform target to x64 from any CPU
- Now in the program type out the following code, you can just add the body of the code block into the main method but I like to section my methods out, up to you…
- Build the solution and then run it.
You should see a Command prompt box appear while the application is running you could add Console.Writeline or ReadLine to prompt once done, otherwise it will disappear and completed
Now go to your site contents within your SharePoint Environment
And you should see your new todo list