We will discuss how we can resolve the below issue which comes when we were trying to create a sharepoint list from a custom list template using c#.net .net managed object model code.
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 and no extension method ListTemplate accepting a first argument of type ListCreationInformation could be found
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:
- the list is too large to save as a template the size of a template cannot exceed 52428800 bytes
- Bind SharePoint Online List Data into HTML table or jQuery Datatable using jQuery and Rest API
- Insert/Add item to SharePoint Online list using PowerShell
- cannot find module ‘@microsoft/sp-build-web’ SharePoint Framework (spfx)
- Cannot import a spreadsheet into SharePoint. This feature requires a browser that supports ActiveX controls in SharePoint
- Could not load file or assembly ‘Microsoft.AI.Web’ or one of its dependencies. The system cannot find the file specified.
- How to create and use PowerShell global variable
- How to check file size using PowerShell Script
Hope this will be helpful to resolve ListCreationInformation does not contain a definition for ListTemplate and no extension method ListTemplate accepting a first argument of type ListCreationInformation could be found issue.
Hello Everyone!! I am Bhawana a SharePoint MVP and having about 10+ years of SharePoint experience as well as in .Net technologies. I have worked in all the versions of SharePoint from wss to Office 365. I have good exposure in Customization and Migration using Nintex, Metalogix tools. Now exploring more in SharePoint 2016 🙂 Hope here I can contribute and share my knowledge to the fullest. As I believe “There is no wealth like knowledge and no poverty like ignorance”