0

I am trying to get the context of my site using OfficeDevPnP.Core AuthenticationManager with the ClientID and ClientSecret

 var ClientId = "<>";
 var ClientSecret = "<>";

 AuthenticationManager AM = new AuthenticationManager();

 var ctx = AM.GetAppOnlyAuthenticatedContext("https://swayams.sharepoint.com", ClientId, ClientSecret);

The error its throwing is -

System.MissingMethodException: 'Method not found: System.Runtime.Remoting.ObjectHandle System.Activator.CreateInstance(System.String, System.String)'.'

I am trying to achieve this from a .Net Core 2.0 console application.

Has anyone ever encountered this problem

2 Answers 2

1

maybe you have solved it in the meantime yourself but i ran into the same issue with PnP and an ASP.NET Core 2.0 Webservice. You have to use an Application which uses the .NET Framework and not .NET Core. As far as i know is the PnP Framework built on the standard SharePoint CSOM and there are only Assemblies for the .NET Framework.

Regards,

Johannes

0

PNP only supported in full Dot Net Framework, not core.

Noticed when creating new Azure Function and default selection (V2) was blocking usage of PNP. Fixed by creating new Project with V1 selected.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.