Discussion:
System.Management.Automation.dll missing?
(too old to reply)
aramey
2007-11-21 20:38:05 UTC
Permalink
Previously System.Management.Automation.dll was located in the
PowerShell
install folder. This made it easy to reference, but now it's gone,
although file
"system.management.automation.dll-help.xml" does exist.

I can add the reference to my ASP files by adding this into
web.config:
<add assembly="System.Management.Automation, Version=1.0.0.0, ...
and that works fine,

but how to I reference this for the code I'm compiling with csc.exe?
I need to know which file this is. I don't have visual studio and
need to compile some common code into an assembly.

Does anyone know how to reference this file using csc.exe?

Thanks,
Anne
aramey
2007-11-21 21:11:34 UTC
Permalink
Post by aramey
Previously System.Management.Automation.dll was located in the
PowerShell
install folder. This made it easy to reference, but now it's gone,
although file
"system.management.automation.dll-help.xml" does exist.
I can add the reference to my ASP files by adding this into
<add assembly="System.Management.Automation, Version=1.0.0.0, ...
and that works fine,
but how to I reference this for the code I'm compiling with csc.exe?
I need to know which file this is. I don't have visual studio and
need to compile some common code into an assembly.
Does anyone know how to reference this file using csc.exe?
Thanks,
Anne
Found the answer:

You should be able to refer to the PIA's directly in the GAC in c:
\windows\Assembly\GAC\[whateverpiayouwant]\[version_pubkey]\[pia.dll]

In My case it looks like this:
/r:c:\WINDOWS\assembly\GAC_MSIL\System.Management.Automation
\1.0.0.0_31bf3856ad364e35\System.Manament.Automation.dll

Thank you so much to artleo: http://blogs.msdn.com/artleo/archive/2005/09/19/471497.aspx
Oisin Grehan
2007-11-21 22:26:14 UTC
Permalink
Post by aramey
Post by aramey
Previously System.Management.Automation.dll was located in the
PowerShell
install folder. This made it easy to reference, but now it's gone,
although file
"system.management.automation.dll-help.xml" does exist.
I can add the reference to my ASP files by adding this into
<add assembly="System.Management.Automation, Version=1.0.0.0, ...
and that works fine,
but how to I reference this for the code I'm compiling with csc.exe?
I need to know which file this is. I don't have visual studio and
need to compile some common code into an assembly.
Does anyone know how to reference this file using csc.exe?
Thanks,
Anne
\windows\Assembly\GAC\[whateverpiayouwant]\[version_pubkey]\[pia.dll]
/r:c:\WINDOWS\assembly\GAC_MSIL\System.Management.Automation
\1.0.0.0_31bf3856ad364e35\System.Manament.Automation.dll
Thank you so much to artleo:http://blogs.msdn.com/artleo/archive/2005/09/19/471497.aspx- Hide quoted text -
- Show quoted text -
Hi,

Because the assembly is in the GAC, you don't need that long format:

csc.exe cmdlet.cs ... /r:System.Management.Automation.dll

should work fine.

- Oisin / x0n
aramey
2007-11-24 03:49:52 UTC
Permalink
Post by Oisin Grehan
Post by aramey
Post by aramey
Previously System.Management.Automation.dll was located in the
PowerShell
install folder. This made it easy to reference, but now it's gone,
although file
"system.management.automation.dll-help.xml" does exist.
I can add the reference to my ASP files by adding this into
<add assembly="System.Management.Automation, Version=1.0.0.0, ...
and that works fine,
but how to I reference this for the code I'm compiling with csc.exe?
I need to know which file this is. I don't have visual studio and
need to compile some common code into an assembly.
Does anyone know how to reference this file using csc.exe?
Thanks,
Anne
\windows\Assembly\GAC\[whateverpiayouwant]\[version_pubkey]\[pia.dll]
/r:c:\WINDOWS\assembly\GAC_MSIL\System.Management.Automation
\1.0.0.0_31bf3856ad364e35\System.Manament.Automation.dll
Thank you so much to artleo:http://blogs.msdn.com/artleo/archive/2005/09/19/471497.aspx-Hide quoted text -
- Show quoted text -
Hi,
csc.exe cmdlet.cs ... /r:System.Management.Automation.dll
should work fine.
- Oisin / x0n
Actually, that didn't work, which is why I had such trouble. That
didn't work and a search of the system turned up no file.
Oisin Grehan
2007-11-26 03:14:30 UTC
Permalink
Post by aramey
Post by Oisin Grehan
Post by aramey
Post by aramey
Previously System.Management.Automation.dll was located in the
PowerShell
install folder. This made it easy to reference, but now it's gone,
although file
"system.management.automation.dll-help.xml" does exist.
I can add the reference to my ASP files by adding this into
<add assembly="System.Management.Automation, Version=1.0.0.0, ...
and that works fine,
but how to I reference this for the code I'm compiling with csc.exe?
I need to know which file this is. I don't have visual studio and
need to compile some common code into an assembly.
Does anyone know how to reference this file using csc.exe?
Thanks,
Anne
\windows\Assembly\GAC\[whateverpiayouwant]\[version_pubkey]\[pia.dll]
/r:c:\WINDOWS\assembly\GAC_MSIL\System.Management.Automation
\1.0.0.0_31bf3856ad364e35\System.Manament.Automation.dll
Thank you so much to artleo:http://blogs.msdn.com/artleo/archive/2005/09/19/471497.aspx-Hidequoted text -
- Show quoted text -
Hi,
csc.exe cmdlet.cs ... /r:System.Management.Automation.dll
should work fine.
- Oisin / x0n
Actually, that didn't work, which is why I had such trouble. That
didn't work and a search of the system turned up no file.- Hide quoted text -
- Show quoted text -
Of course you're right, sorry. Utter brainfart on my behalf. The
reason other DLLs work is because they exist in the same directory as
the compiler typically. I don't know what I was thinking. ;-)

- Oisin

Loading...