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
LVL 21
Peter HutchisonSenior Network Systems SpecialistAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Peter HutchisonSenior Network Systems SpecialistAuthor Commented:
Resolved.

I reinstalled Windows SDK for Windows 7 and .NET 3.5 SP1 and updated the references.
The DLL has been updated to v6.1.7600 which has the appropriate references in it.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.