-
NoticeMany bugs reported are actually related to the PnP Framework which is used behind the scenes. Consider carefully where to report an issue:
Reporting an Issue or Missing FeatureError executing Connect-PnPOnline command from a PowerShell script ran via Windows Task Scheduler. Expected behaviorSuccessful connection to SharePoint Online instance Actual behaviorTerminatingError(Connect-PnPOnline): "Could not load type 'Microsoft.Extensions.DependencyInjection.ServiceCollection' from assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'." Steps to reproduce behaviorCalling the Connect-PnPOnline cmdlet via script. What is the version of the Cmdlet module you are running?2.4.0 Which operating system/environment are you running PnP PowerShell on?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Wanted to provide an update that this issue was resolved by a reordering of the Import-Module statements in the invoking script. Listing the "Import-Module Pnp.PowerShell" seems to allow the proper dlls to be loaded without error. |
Beta Was this translation helpful? Give feedback.
Wanted to provide an update that this issue was resolved by a reordering of the Import-Module statements in the invoking script. Listing the "Import-Module Pnp.PowerShell" seems to allow the proper dlls to be loaded without error.