Link to home
Start Free TrialLog in
Avatar of Peter Hutchison
Peter HutchisonFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Problem with Powershell references in Visual Studio

I have problems referencing powershell functions from within Visual Studio 2008 or 2010. I have imported the
System.Management.Automation.dll but it still cannot find references to:

        Dim connInfo As WSManConnectionInfo
        Dim mycommand As PSCommand, pscmd As PowerShell
        Dim ws As System.Management.Automation.Runspaces.run

Also it cannot find AuthenticationMechanism or RunspaceAvailability so I am unable to build the project

I tried removing and re-adding references with no luck.
I used to work ok before but it lost all the references for some reason. I even went back to an earlier version of the project.
I tried creating a new project with the appropriate references.

Are there different versions of System.Management.Automation.dll ?
 Mine is 6.0.6000.16386 dated 12/01/2007
ASKER CERTIFIED SOLUTION
Avatar of Peter Hutchison
Peter Hutchison
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial