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.
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.
As far as I know there isn't any way around this. The reason for that is the package is built using the .NETFramework
so until the creators port their package to the .NETStandard
, it will only be usable from .NETFramework
apps since, in theory, that package could use libraries that are not in the .NETStandard
.