I was trying to use power shell from within my C# application on Windows Sever 2008.This somehow took me sometime to located the DLL, so here it is.
Error 1 The type or namespace name 'Management' does not exist in the namespace 'System' (are you missing an assembly reference?) f:\samples\<application>\<application>\Program.cs 4 14 <application>
Added the reference to the System.Management.Automation.dll located at
C:\Program Files\Reference Assemblies\Microsoft\WindowsPowerShell\v1.0\System.Management.Automation.dll
Hope you find this post useful, Cheers !!!
Jeevan Bisht : Support Escalation Engineer
I adore your site, looks excellent and full of good info. Keep it up.
works for me.
What do you adore about this site? There is no such file called automation.dllC:\Program Files\Reference Assemblies\Microsoft\WindowsPowerShell\v1.0\System.Management.Automation.dllI have Visual Studio 2012, and I have the sample programs that are working fine, but the ones that I create have no System.management.automationIt's so frustrating!
Edmond you have to install windows sdk to get System.Management.Automation.dll