Exception : Unable to cast object
LaurentDardenne opened this issue · 5 comments
Profiler version 3.0.1 (Windows Serveur 2012)
Exception with this code :
$trace = Trace-Script -ScriptBlock { & E:\RELEASES\XYZ\WpfTools.ps1}
There are other errors with PS v7.1.0
Same error with :
$trace = Trace-Script -ScriptBlock { Dir }
$PsVersionTable
Name Value
---- -----
PSVersion 5.1.14409.1018
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0, 5.0, 5.1.14409.1018}
BuildVersion 10.0.14409.1018
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
#25 We have the cast issue reported here, only thing I can recommend right now is cloning this repo and trying to run the demo.ps1, the dlls are now pushed in the repo so you don't have to build.
I cannot repro it on my side, I am building on server 2016 and it passes.
The null issue is totally my fault, trying to .trim() on possibly null object is stupid...
Thank you.
>>The null issue is totally my fault, trying to .trim() on possibly null object is stupid...
Only those who do nothing are never wrong ;-)
Did your cast problem got solved or are you moving to the other issue?
I no longer have an exception using the last commit.