Skip to content
New issue

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

macos 10.12 missing system.net.webclient #2326

Closed
minoseah629 opened this issue Sep 21, 2016 · 1 comment
Closed

macos 10.12 missing system.net.webclient #2326

minoseah629 opened this issue Sep 21, 2016 · 1 comment
Labels
Resolution-External The issue is caused by external component(s).

Comments

@minoseah629
Copy link

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

  • $webclient = New-Object System.Net.WebClient
  •          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidType: (:) [New-Object], PSArgumentExcepti
      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

@vors vors added the Resolution-External The issue is caused by external component(s). label Sep 21, 2016
@vors
Copy link
Collaborator

vors commented Sep 21, 2016

PowerShell Core edition is built on CoreCLR.
WebClient is not currently available there: https://github.com/dotnet/corefx/issues/11794

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-External The issue is caused by external component(s).
Projects
None yet
Development

No branches or pull requests

2 participants