I need to use one of my dotnet core 3 assemblies within a powershell script:
try {
Add-Type -Path "app.dll"
}
catch {
$_.Exception.LoaderExceptions
}
This fails:
Could not load type 'System.Object' from assembly 'System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' because the parent does
not exist.
Why I try to Add-Type System.Private.CoreLib.lib, the same error occurs. It seems to work well with a netstandard2.0 assembly, but not with my netcoreapp3.0 assembly. What can I do in order to use the methods of my assembly in the powershell script?