Error loading System.Management.Automation assembly

前端 未结 1 1616
礼貌的吻别
礼貌的吻别 2021-01-13 00:58

I am developing a WPF application which is running a powershell script.

string scriptPath = \"/script/myscript.ps1\";
Runspace runspace = RunspaceFactory.C         


        
相关标签:
1条回答
  • 2021-01-13 01:58

    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

    0 讨论(0)
提交回复
热议问题