Could not load type 'Microsoft.SharePoint.Client.AuditMaskType' from assembly 'Microsoft.SharePoint.Client, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'. #1025
Comments
The auditmaskType enum is available in the latest of all 3 csom flavors (online = 16.1, 2016 = 16.0 and 2013 = 15.0). Based on your error message you're using 2016 csom (version 16.0) against 2013 SharePoint. Can you reproduce this issue using the latest engine version in combination with the correct 2013 CSOM assemblies? |
I seem to have the same problem
|
Please download the newest version of PNP Core engine and it should be resolved. |
As mentioned by @virendramunot this should be fixed as of the Feb release. We loaded online CSOM for on-premises nuget packages resulting in this issue. If you can stil repro with the latest (March 2017) version then please re-open the issue. |
Hey, I have update my code with new PNP package and now getting the same error again. Has something change from the previous version which I need to change. The error description is below: System.TypeLoadException was unhandled Thanks in Advance. |
HI Vesa You can close this now. Regards |
thx virendramunot for following up on this and sharing the solution for others who might be running into to the same issue. |
Same issue here. |
What VS version you are using? If VS2015 then download the latest Microsoft.SharePoint.Client DLL from MSDN. |
Please note that you should NOT use CSOM SDKs from MS download, rather ensure that you are using NuGet packages, which are automatically associated in the solutions. If you have SDK installed, that adds assemblies to GAC, which can override references for on-premises. With SPO, this is not a problem, since fully qualified assembly name is different between SDK and NuGet. NuGet CSOM is always is the latest for SPO... for on-premises, this is slightly more complex since also server version impacts on behavior. For the on-premises NuGets, see following - https://dev.office.com/blogs/sharepoint-csom-versions-for-on-premises-released-as-nuget-packages. |
Agreed Vesa...but even the latest Nuget Package didnt resolve the issue for me when I downloaded VS2015. So I installed the latest Client SDK from MS and it worked. So suggested. |
Hi Vesa, I am facing similar problem. I am getting an exception Could not load type 'Microsoft.SharePoint.Client.ClientRequestWrapper' from assembly 'Microsoft.SharePoint.Client.Runtime, Version=16.1.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'. The piece of code, which I am trying to execute is, this.SourceClientContext.Load(SourceClientContext.Web); I am using VS 2017 and the Nuget Packages Any help would be highly helpful. |
HI... Yes I am too getting the same issue in Visual Studio 2017. Did you manage to resolve it? |
From @virendramunot on January 19, 2017 10:59
I am using PNP PnP Provisioning Engine code to create site on my on-prem sharepoint 2013 environment. Below is the snapshot of the code which I wrote on remote server using Console App.
ProvisioningTemplateCreationInformation ptci = new ProvisioningTemplateCreationInformation(ctx.Web);
The error is thrown at this line template = ctx.Web.GetProvisioningTemplate(ptci);
I have latest SharePoint Client SDK and Latest Provisioning engine DLL.
Not sure what this error. Any help will be appreciated.
Copied from original issue: pnp/PnP-Tools#106
The text was updated successfully, but these errors were encountered: