Failed to use Plumsail.Forms.SharePoint Nuget package in .NET 6 or 8

In the context of a projet we have some PowerShell script that we use to deploy s specific sharepoint environment.
To inject plumsail forms in the sharepoint site, I developed a new PowerShell module and used the provisioning PlumsailForm package (the last one version 1.2.1. This powershell module implements 2 new CmdLet. One for exporting forms, one for importing form.
The exporting cmdlet runs well either with standard PwerShell 7.4 (the last version available on Windows as Terminal...), but also in old Windows Powershell 5.x

But when I try to run the Import CmdLet, the SetFormSets or the GenerateForms methods of the FormsManager class throw an exception when I try to run the CmdLet in PowerShell 7.4

Could not load type 'Microsoft.SharePoint.Client.SharePointOnlineCredentials' from assembly 'Microsoft.SharePoint.Client.Runtime, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c'

Why does these methods need to access this class that is supposed to be deprecated and that is not availbale in the new .NET Core environment ?

The Import CmdLet runs well in the old PowerShell plateform...but it is not a solution...just a temporary workaround that leads to some others problems..

Could you port the provisioning package to be compatible with .NET 6 or 8 ?.


Hello @educos35,

The Plumsail.Forms.O365 NuGet package currently supports only .NET Framework v4.8. Please switch to this version to provision forms.

Yes that's what I have done. I created the powershell module as a library class under .NET 4.8....but when I use this module with the last supported version of PowerShell, it show me the exception....


Most probably the root cause is the outdated version of SharePoint CSOM SDK. The minimal required version is 16.1.24614.12000. From the error message I see the version is

Please update SharePoint Online Client Components SDK and try again:

I just verified this point: I ran the powershell module with debugging in Visual Studio and looked at the loaded modules. The are all marked with version 16.01.24614.12000 as you suggest. So the correct sharepoint SDK is used.
The main reason of the problem is that new last PowerShell 7 and following version are working on .NET Core infrastructure. Loading a .Net 4.8 Module is permitted BUT .NET COre does not support the class SharePointOnlineCredentials that should no more be used.

Hopefully, I found a really interesting article on this page that explain how to you .NET 4.8 powershell module in compatibility mode in PowerShell 7 !!
How to use Microsoft.Online.SharePoint.PowerShell with PowerShell 7? (

I hope that next version of you package wil solve this problem.


Ho but no...the compatibility mode cannot work just because it cannot pass Context object from the ConnectPnp-Online to my module that has been imported in another context !!!
So there seems to be no way to use PowerShell 7 with your Plumsila NuGet package...