Powershell issue
-
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.
-
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.
-
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.
Thanks for that one. I have upgraded to VS 2005 and it works now!!
Learning is a never ending process of Life.