I'm trying to migrate a C# class library that I previously built which was targeting .NET Framework v4.5 to .NET Standard 2.0.
I tried many packages to include PowerShell support in my library but every time I include a package I get a warning saying that the package was included using a target framework different from the .NET Standard 2.0.
For example, with the System.Management.Automation_PowerShell_3.0` package I get the following error message
Le package 'System.Management.Automation_PowerShell_3.0 6.3.9600.17400' a été restauré en utilisant '.NETFramework,Version=v4.6.1' au lieu du framework cible du projet '.NETStandard,Version=v2.0'. Ce package n'est peut-être pas totalement compatible avec votre projet.
which would be roughly translated to English as
The package 'System.Management.Automation_PowerShell_3.0 6.3.9600.17400' was restored using '.NETFramework,Version=v4.6.1' instead of the projet's target framework '.NETStandard,Version=v2.0'. This package may not be completely compatible with the target project.
Since the main reason, I'm trying to port my library to .NET Standard is to support both the .NET Framework and the .NET Core targets, having a package one of the packages be .NET Framework-specific defeats the purpose of the port.
Do I have any workaround? Is there a PowerShell package that targets .NET Standard 2.0 that I missed (I tried about 10 PowerShell-related packaged in the VS17 NuGet explorer before posting here)?
For some background, I use PowerShell to run node.exe from my C# library.