Closed rakheshrao-shl closed 3 years ago
So it looks like it might be a quick fix dependent on the code. Here is the fix possibly. https://stackoverflow.com/questions/42837447/powershell-unable-to-find-type-when-using-ps-5-classes
It maybe worth fixing things this way...
Which version are you using? Installed from PSGallery?
I've added tests to make sure things work - and they do. I've also released new version which changes a bit how things are loaded.
However I was able to reproduce your issue on Windows 2016
But when I added some diagnostic it's pretty clear it can't load net standard 2.0. Net Standard 2.0 works with Net Framework 4.6.1 as minimum.
Most likely you have not updated Windows 2016 to up-to-date net framework.
From my testing it would seem you need 4.7.2 or so to be sure t works properly.
Yes I can confirm, this is now working. So all good. A thing to note for anyone reading this later, make sure you restart your system
I am trying to use your excellent Module, however, I seem to be encountering errors like below:
I am stuck as this doesn't seem to want to go away. I am running this on Windows Server 2016. This is the output from the $PSVersionTable
I have tried this on 2 separate Windows Server instances and am encountering the same issue. Any idea what is going on and how to work around this issue?