pnpframework icon indicating copy to clipboard operation
pnpframework copied to clipboard

System.MissingMethodException AddAsync

Open jipefernandes opened this issue 2 years ago • 2 comments

Hi, I’m trying to migration my.net 4.7 solution to a new version with the .net 6. To achieve this I’ve update my projects and updated the following PNP packages do the latest version available today:

  • PnP.Framework
  • PnP.Core However when I try to add new group in my SharePoint using this method “UnifiedGroupsUtility.CreateUnifiedGroup”I got the following error:, System.MissingMethodException: 'Method not found: 'System.Threading.Tasks.Task`1<Microsoft.Graph.Group> Microsoft.Graph.IGraphServiceGroupsCollectionRequest.AddAsync(Microsoft.Graph.Group)'.'

Here the exception message: Method not found: 'System.Threading.Tasks.Task`1<Microsoft.Graph.Group> Microsoft.Graph.IGraphServiceGroupsCollectionRequest.AddAsync(Microsoft.Graph.Group)'.

I’ve already spend more than a day to try to understand or fixed but with no success. Anyone knows this error and can help me please? Thank you so much. Best Regards JP Fernandes

jipefernandes avatar Mar 22 '22 14:03 jipefernandes

Hitting this same issue. In my case after migrating a FunctionApp from .net core 3.1 to .net 6. Using PnP Framework 1.9.40-nightly.

luismanez avatar Jun 29 '22 13:06 luismanez

In my case (and pretty sure yours too), this issue is because your project (or one of its dependencies), is referencing a greater version of the MS Graph SDK, and then, we are here: https://github.com/pnp/pnpframework/issues/660

luismanez avatar Jun 30 '22 07:06 luismanez