We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PS /Users/> $webclient = New-Object System.Net.Web WebException WebRequest WebUtility WebExceptionStatus WebResponse WebHeaderCollection WebSockets PS /Users/> $webclient = New-Object System.Net.WebClient
should be able to use system.net.webclient like in windows PS C:\Windows\system32> new-object System.Net.WebClient
AllowReadStreamBuffering : False AllowWriteStreamBuffering : False Encoding : System.Text.SBCSCodePageEncoding BaseAddress : Credentials : UseDefaultCredentials : False Headers : {} QueryString : {} ResponseHeaders : Proxy : System.Net.WebRequest+WebProxyWrapper CachePolicy : IsBusy : False Site : Container :
Received error mesage New-Object : Cannot find type [System.Net.WebClient]: verify that the assembly containing this type is loaded. At line:1 char:14
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Name Value
PSVersion 6.0.0-alpha PSEdition Core PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 3.0.0.0 GitCommitId v6.0.0-alpha.10 CLRVersion WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
The text was updated successfully, but these errors were encountered:
PowerShell Core edition is built on CoreCLR. WebClient is not currently available there: https://github.com/dotnet/corefx/issues/11794
Sorry, something went wrong.
No branches or pull requests
Steps to reproduce
PS /Users/> $webclient = New-Object System.Net.Web
WebException WebRequest WebUtility WebExceptionStatus WebResponse WebHeaderCollection WebSockets
PS /Users/> $webclient = New-Object System.Net.WebClient
Expected behavior
should be able to use system.net.webclient like in windows
PS C:\Windows\system32> new-object System.Net.WebClient
AllowReadStreamBuffering : False
AllowWriteStreamBuffering : False
Encoding : System.Text.SBCSCodePageEncoding
BaseAddress :
Credentials :
UseDefaultCredentials : False
Headers : {}
QueryString : {}
ResponseHeaders :
Proxy : System.Net.WebRequest+WebProxyWrapper
CachePolicy :
IsBusy : False
Site :
Container :
Actual behavior
Received error mesage
New-Object : Cannot find type [System.Net.WebClient]: verify that the assembly
containing this type is loaded.
At line:1 char:14
on
FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewOb
jectCommand
Environment data
Name Value
PSVersion 6.0.0-alpha
PSEdition Core
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 3.0.0.0
GitCommitId v6.0.0-alpha.10
CLRVersion
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
The text was updated successfully, but these errors were encountered: