[System.Drawing.Bitmap] not found in powershell,but at powershell ise is exist!

Copper Contributor

hello everyone:

I have a question, such as a title.

- - - - - - - - - - - - - - -powershell - - - - - - - - - - ----------------------

PS C:\> [System.Drawing.Bitmap]
 [System.Drawing.Bitmap]
 CategoryInfo:InvalidOperation:(System.Drawing.Bitmap:TypeName)[],RuntimeException
 FullyQualifiedErrorId:TypeNotFound

 

----------------------------- powershell ise ------------------- ----------------------

PS C:\> [System.Drawing.Bitmap]

IsPublic IsSerial    Name      BaseType
-------- --------    ----          --------
True      True        Bitmap     System.Drawing.Image

 

------------------------------version------------------------------------------------

Name                                      Value
----                                          -----
PSVersion                                5.1.17763.771
PSEdition                                 Desktop
PSCompatibleVersions            {1.0, 2.0, 3.0, 4.0...}
BuildVersion                            10.0.17763.771
CLRVersion                              4.0.30319.42000
WSManStackVersion               3.0
PSRemotingProtocolVersion  2.3
SerializationVersion                1.1.0.1

 

PS:Powershell is the same version as powershell ise

2 Replies
PS> Add-Type -AssemblyName System.Drawing
PS> [System.Drawing.Bitmap]

IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True Bitmap System.Drawing.Image