When using the PnP Powershell cmdlets to apply a provisioning template to a newly created Microsoft SharePoint site, I am getting this error:
"Apply-PnPProvisioningTemplate : Method not found 'System.String Microsoft.SharePoint.Client.WebParts.WebPartDefinition.get_ZoneId()'"
STEPS OF WHAT I DID:
I generated a .xml provisioning template using a software I developed. Everything works fine with the PnP method, except when I try to provision the home page to add web parts from created lists. For the web part xml code, I extracted the provisioning template from a dummy website with the web part xml code in it, and used it in my software generally. Now when trying to provision to a new site, I get the mentioned error.
I tried uninstalling and reinstalling the 2013 PnP powershell Module, and looked a lot on for workarounds but information and help is way too sparse when it comes to PnP powershell cmdlets errors, on top of not working.
Also, I tried re-dowloading the provisioning template from the dummy website, using get-PnPProvisioningTemplate, and this time, I got the same mentionned error, rather than working fine.
here is the link to the xml template : https://codeshare.io/aYWYeN
in hope I was clear enough and that someone will be able to help me
Microsoft.SharePoint.Client.WebParts.WebPartDefinition
and check if there are older/newer versions of that DLL. Potentially, reinstall/update/use higher version of .NET framework (also, what .NET version and what OS version?) – Vesper