Now that PowerShell is open sourced and available on Linux, any one knows how to add .Net assemblies under linux? if at all possible?
I have installed PS on Ubuntu 16.04 as in here and installed Mono as in here.
After running PS on terminal, this line surprisingly works just fine:
add-type -assembly "/usr/lib/mono/4.5-api/System.Web.Extensions.dll"
No errors etc...
Yet when I try to:
$js = New-Object "System.Web.Script.Serialization.JavaScriptSerializer"
I am getting this error:
new-object : Cannot find type [System.Web.Script.Serialization.JavaScriptSerializer]: verify that the
assembly containing this type is loaded.
At line:1 char:10
+ $ps_js = new-object "System.Web.Script.Serialization.JavaScriptSerial ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidType: (:) [New-Object], PSArgumentException
+ FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand
Any hints on that one? Is it a bug maybe as powershell on linux is still "alpha"?
BTW - On windows all is working just fine...