Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Powershell issue

Powershell issue

Scheduled Pinned Locked Moved C#
helpcsharpdotnetvisual-studiocom
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    abhinarulkar
    wrote on last edited by
    #1

    Hello, I am writing a code in C#.net which would fire powershell commands. The sample code which I have got from internet uses System.Management.Automation and other such namespaces. Upon browsing some sites I found that I have to reference System.Management.Automation.dll which can be found in GAC however I could not see the same in references dialog from Visual Studio. I removed the dll from GAC using powershell command and placed it to a local directory but still referencing the dll from Visual Studio gives error saying that its not a valid assembly or a COM dll. Please help me and give me some directions on what could be the problem. Below is the environment I am using Windows Powershell 1.0 (for XP SP2) Windows XP SP2 .NET Framework 2.0 Visual Studio 2003 Thanks Abhishek.

    Learning is a never ending process of Life.

    E 1 Reply Last reply
    0
    • A abhinarulkar

      Hello, I am writing a code in C#.net which would fire powershell commands. The sample code which I have got from internet uses System.Management.Automation and other such namespaces. Upon browsing some sites I found that I have to reference System.Management.Automation.dll which can be found in GAC however I could not see the same in references dialog from Visual Studio. I removed the dll from GAC using powershell command and placed it to a local directory but still referencing the dll from Visual Studio gives error saying that its not a valid assembly or a COM dll. Please help me and give me some directions on what could be the problem. Below is the environment I am using Windows Powershell 1.0 (for XP SP2) Windows XP SP2 .NET Framework 2.0 Visual Studio 2003 Thanks Abhishek.

      Learning is a never ending process of Life.

      E Offline
      E Offline
      Ed Poore
      wrote on last edited by
      #2

      abhinarulkar wrote:

      .NET Framework 2.0 Visual Studio 2003

      You cannot create programs for .NET 2.0 using VS2003.  You might want to look at the Express editions if you want a free alternative for .NET 2.

      A 1 Reply Last reply
      0
      • E Ed Poore

        abhinarulkar wrote:

        .NET Framework 2.0 Visual Studio 2003

        You cannot create programs for .NET 2.0 using VS2003.  You might want to look at the Express editions if you want a free alternative for .NET 2.

        A Offline
        A Offline
        abhinarulkar
        wrote on last edited by
        #3

        Thanks for that one. I have upgraded to VS 2005 and it works now!!

        Learning is a never ending process of Life.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups