ListCreationInformation does not contain a definition for ListTemplate and no extension method ListTemplate accepting a first argument of type ListCreationInformation could be found

This SharePoint tutorial explains, how to fix an error that comes when we were trying to create a SharePoint list from a custom list template using (c#.net) .net managed object model code. The error comes as ListCreationInformation does not contain a definition for ListTemplate and no extension method ListTemplate accepting a first argument of type ListCreationInformation could be found.

But we got the below error in the below line:

listCreationInfo.ListTemplate = listTemplate;

The error comes as:

‘ListCreationInformation’ does not contain a definition for ‘ListTemplate’ and no extension method ‘ListTemplate’ accepting a first argument of type ‘ListCreationInformation’ could be found (are you missing a using directive or an assembly reference?)

ListCreationInformation does not contain a definition for ListTemplate

Solution:

The solution is to use the updated dll (Microsoft.SharePoint.Client.dll).

Here I have used the 16.1.6420.1200 version of Microsoft.SharePoint.Client.dll.

You may like following SharePoint tutorials:

Here, we learned how to fix the error, ListCreationInformation does not contain a definition for ListTemplate error.

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.

>