I am developing a WPF application which is running a powershell script.
string scriptPath = \"/script/myscript.ps1\"; Runspace runspace = RunspaceFactory.C
Finally I was able to fix my issue. This is what I does; open my .csproj file search for System.Management.Automation reference. Replace that with the following <Reference Include="System.Management.Automation" /> These steps fixed my issue
<Reference Include="System.Management.Automation" />