In order to reference the System.Management.Automation.Runspaces in a Visual Studio project, you need to open the .csproj or .vbproj in Notepad. In the “ItemGroup” node, add a new value at the end:
<Reference Include=”System.Management.Automation.Runspaces” />
The post here explains more: http://74.125.47.132/search?q=cache:wCk4wwQ7eNwJ:www.eggheadcafe.com/sof…