Jeevan Bisht's System Center Blog

System Center Rocks !!

Windows 2008 Powershell C# : The type or namespace name 'Management' does not exist in the namespace 'System'

Windows 2008 Powershell C# : The type or namespace name 'Management' does not exist in the namespace 'System'

  • Comments 5
  • Likes

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.

  • I adore your site, looks excellent and full of good info. Keep it up.

  • works for me.

    thanks!

  • What do you adore about this site? There is no such file called automation.dll
    C:\Program Files\Reference Assemblies\Microsoft\WindowsPowerShell\v1.0\System.Management.Automation.dll

    I have Visual Studio 2012, and I have the sample programs that are working fine, but the ones that I create have no System.management.automation

    It's so frustrating!

  • Edmond you have to install windows sdk to get System.Management.Automation.dll

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment