It's hard for me to solve the PowerShell class. I am following the example of this question .
I have a link added to System.Management.Automation from C:\Program Files\Reference Assemblies\Microsoft\WindowsPowerShell\v1.0\System.Management.Automation.dll
I have using System.Management.Automation; included at the beginning of my class.
However, when I try to create an instance of powershell: PowerShell ps = PowerShell.Create() , PowerShell will not be resolved.
Using ctrl + . to automatically add the full namespace (or using the operator), it simply offers Microsoft.Powershell instead of PowerShell .
I am very confused why this is happening, since even the example contained in the MSDN documentation in the PowerShell class has exactly the same thing I have.
I am in .NET 3.5, Visual Studio 2010 and Windows Server 2008 R2
source share