Get-PnPProvisioningTemplate Could not load type 'Microsoft.SharePoint.Client.DocumentSet.DocumentSet

%3CLINGO-SUB%20id%3D%22lingo-sub-30435%22%20slang%3D%22en-US%22%3EGet-PnPProvisioningTemplate%20Could%20not%20load%20type%20'Microsoft.SharePoint.Client.DocumentSet.DocumentSet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-30435%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20extract%20the%20data%20using%20the%20SharePointPnPPowerShell2016%20module.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20call%20Get-PnPProvisioningTemplate%20it%20start%20to%20run%2C%20it%20goes%20through%20some%20of%20the%20settings%20Regional%20Settings%2C%20Supported%20UI%20Languages%2C%20Audit%20Settings%2C%20Site%20Security%2C%20Fields%2C%20Content%20Types%2C%20but%20then%20throws%20an%20error%3C%2FP%3E%3CP%3EMessage%20%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECould%20not%20load%20type%20'Microsoft.SharePoint.Client.DocumentSet.DocumentSetTemplate'%20from%20assembly%20'Microsoft.SharePoint.Client.DocumentManagement%2C%20Version%3D16.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D71e9bce111e9429c'.%3CBR%20%2F%3E%26nbsp%3BStackTrace%20%3A%20at%20OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ObjectContentType.GetEntities(Web%20web%2C%20PnPMonitoredScope%20scope%2C%20ProvisioningTemplateCreationInformation%20creationInfo%2C%20ProvisioningTemplate%20template)%20at%20OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ObjectContentType.ExtractObjects(Web%20web%2C%20ProvisioningTemplate%20template%2C%20ProvisioningTemplateCreationInformation%20creationInfo)%20at%20OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.SiteToTemplateConversion.GetRemoteTemplate(Web%20web%2C%20ProvisioningTemplateCreationInformation%20creationInfo)%20at%20Microsoft.SharePoint.Client.WebExtensions.GetProvisioningTemplate(Web%20web%2C%20ProvisioningTemplateCreationInformation%20creationInfo)%20at%20PnPVSExtract_cj.Program.Main(String%5B%5D%20args)%20in%20c%3A%5Cusers%5Ca0721713%5Cdocuments%5Cvisual%20studio%202015%5CProjects%5CPnPVSExtract_cj%5CPnPVSExtract_cj%5CProgram.cs%3Aline%2066%20Date%20%3A11%2F14%2F2016%204%3A56%3A31%20PM%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20running%20another%20environment%20with%20very%20similar%20set%20up%2C%20and%20it%20progress%20to%20List%20Instances%20and%20runs%20without%20problems.%3C%2FP%3E%3CP%3EAny%20ideas%20would%20help!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-30437%22%20slang%3D%22en-US%22%3ERe%3A%20Get-PnPProvisioningTemplate%20Could%20not%20load%20type%20'Microsoft.SharePoint.Client.DocumentSet.Documen%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-30437%22%20slang%3D%22en-US%22%3E%3CP%3EApparently%20I%20had%20an%20outdated%20version%20of%20the%20CSOM%20assemblies%20had%20been%20installed%3B%3CBR%20%2F%3Etry%20installing%20the%20latest%20version%20of%20the%20%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fdownload%2Fdetails.aspx%3Fid%3D51679%22%20rel%3D%22noreferrer%20noopener%22%20target%3D%22_blank%22%3E%3CFONT%20color%3D%22%230066cc%22%3ESharePoint%20Server%202016%20Client%20Components%20SDK%3C%2FFONT%3E%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

I am trying to extract the data using the SharePointPnPPowerShell2016 module.

 

When I call Get-PnPProvisioningTemplate it start to run, it goes through some of the settings Regional Settings, Supported UI Languages, Audit Settings, Site Security, Fields, Content Types, but then throws an error

Message :

 

Could not load type 'Microsoft.SharePoint.Client.DocumentSet.DocumentSetTemplate' from assembly 'Microsoft.SharePoint.Client.DocumentManagement, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'.
 StackTrace : at OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ObjectContentType.GetEntities(Web web, PnPMonitoredScope scope, ProvisioningTemplateCreationInformation creationInfo, ProvisioningTemplate template) at OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ObjectContentType.ExtractObjects(Web web, ProvisioningTemplate template, ProvisioningTemplateCreationInformation creationInfo) at OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.SiteToTemplateConversion.GetRemoteTemplate(Web web, ProvisioningTemplateCreationInformation creationInfo) at Microsoft.SharePoint.Client.WebExtensions.GetProvisioningTemplate(Web web, ProvisioningTemplateCreationInformation creationInfo) at PnPVSExtract_cj.Program.Main(String[] args) in c:\users\a0721713\documents\visual studio 2015\Projects\PnPVSExtract_cj\PnPVSExtract_cj\Program.cs:line 66 Date :11/14/2016 4:56:31 PM

 

I am running another environment with very similar set up, and it progress to List Instances and runs without problems.

Any ideas would help!

1 Reply

Apparently I had an outdated version of the CSOM assemblies had been installed;
try installing the latest version of the SharePoint Server 2016 Client Components SDK