Unable to cast transparent proxy in a dll when called from PowerShell, but successful in C# console app Unable to cast transparent proxy in a dll when called from PowerShell, but successful in C# console app powershell powershell