I have a internal website in my client which communicates with sharepoint via Microsoft.PowerShell.SDK, which means that the C# project is executing powershell comands.
After updating all PowerShell Modules and Visual Studio Nugget Package, I started to notice a odd behavior from PnP.Framework Module.
When i tried to execute Command 1, the executions gets stuck in Log 1 and does return any error. After that, i tried a workaround and changed the extension of the file to .xml, as you can see in Command 2 and gave me the following error Log2.
This problem occurred 2 months ago when i updated Microsoft.Graph to version 5, but since then the problem has not been fixed.
In my search for an answer, i found an old issue in 2021 that reported the same issue when executed Command 1.
Unable to load one or more of the requested types.
Could not load type 'Microsoft.Graph.HttpProvider' from assembly 'Microsoft.Graph.Core, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.Group' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.IGraphServiceUsersCollectionPage' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.IGraphServiceUsersCollectionPage' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.IGraphServiceUsersCollectionPage' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.IGraphServiceUsersCollectionPage' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.IGraphServiceGroupsCollectionPage' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.IGroupMembersCollectionWithReferencesPage' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.IGraphServiceUsersCollectionPage' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.IGraphServiceUsersCollectionPage' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.IGroupOwnersCollectionWithReferencesPage' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.User' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.Group' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.Group' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.Group' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.Subscription' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.IGraphServiceSubscriptionsCollectionPage' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.Subscription' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.Subscription' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.Group' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.IGraphServiceGroupsCollectionPage' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.IGraphServiceGroupsCollectionPage' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.IGroupMembersCollectionWithReferencesPage' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.IGroupMembersCollectionWithReferencesPage' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.IGraphServiceUsersCollectionPage' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.IGraphServiceUsersCollectionPage' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.IGroupOwnersCollectionWithReferencesPage' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.User' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.Group' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.Group' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.IGraphServiceUsersCollectionPage' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could not load type 'Microsoft.Graph.IUserDeltaCollectionPage' from assembly 'Microsoft.Graph, Version=5.33.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
I have a internal website in my client which communicates with sharepoint via Microsoft.PowerShell.SDK, which means that the C# project is executing powershell comands. After updating all PowerShell Modules and Visual Studio Nugget Package, I started to notice a odd behavior from PnP.Framework Module.
When i tried to execute Command 1, the executions gets stuck in Log 1 and does return any error. After that, i tried a workaround and changed the extension of the file to .xml, as you can see in Command 2 and gave me the following error Log2.
This problem occurred 2 months ago when i updated Microsoft.Graph to version 5, but since then the problem has not been fixed. In my search for an answer, i found an old issue in 2021 that reported the same issue when executed Command 1.
Command 1:
Command 2:
Log 1
Log 2
Information