I'm making a script in PowerShell and coding my own dll library in C# to help me with it. But when I attempt to call it I get this error
Exception calling "ReadWebsiteJson" with "1" argument(s): "Could not load type 'System.IO.File' from assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral,
the code that tries to call this library looks like this:
$jsonpath = "$env/config/WebTemplates.json"
[PowerLib.JsonParser]::ReadWebsiteJson($jsonpath)
I've already tried to fix this by: a) importing System.IO with NuGet into my dll file b) downloading system.io.dll from the internet and loading it using Get-Type c) loading this downloaded dll using Install-Script but nothing worked and I'm running out of ideas on how to fix this. Thank you all in advance!