用 VS for Mac 创建 .net core console application 时依赖加载失败。
梯子开了全局,但是一直报这个错误。
Failed to download package from 'https://api.nuget.org/v3-flatcontainer/netstandard.library/1.6.0/netstandard.library.1.6.0.nupkg'.
An error occurred while sending the request
Error: SecureChannelFailure (The authentication or decryption has failed.)
The authentication or decryption has failed.
Error while sending TLS Alert (Fatal:InternalError): System.IO.IOException: Unable to write data to the transport connection: Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'.. ---> System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'.
at System.Net.Sockets.Socket.ThrowIfDisposedAndClosed () [0x00021] in <54b353f17dee4a2c97c9f919bcfe90f1>:0
at System.Net.Sockets.Socket.BeginSend (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.Net.Sockets.SocketFlags socket_flags, System.AsyncCallback callback, System.Object state) [0x00000] in <54b353f17dee4a2c97c9f919bcfe90f1>:0
at System.Net.Sockets.NetworkStream.BeginWrite (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.AsyncCallback callback, System.Object state) [0x000b4] in <54b353f17dee4a2c97c9f919bcfe90f1>:0
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.BeginWrite (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.AsyncCallback callback, System.Object state) [0x00113] in <54b353f17dee4a2c97c9f919bcfe90f1>:0
at Mono.Security.Protocol.Tls.RecordProtocol.BeginSendRecord (Mono.Security.Protocol.Tls.ContentType contentType, System.Byte[] recordData, System.AsyncCallback callback, System.Object state) [0x00026] in <4d95459e5c814a5dad6816d7b3a5a54b>:0
at Mono.Security.Protocol.Tls.RecordProtocol.BeginSendRecord (Mono.Security.Protocol.Tls.Handshake.HandshakeType handshakeType, System.AsyncCallback callback, System.Object state) [0x00024] in <4d95459e5c814a5dad6816d7b3a5a54b>:0
at Mono.Security.Protocol.Tls.SslClientStream.BeginNegotiateHandshake (System.AsyncCallback callback, System.Object state) [0x0004c] in <4d95459e5c814a5dad6816d7b3a5a54b>:0
at Mono.Security.Protocol.Tls.SslStreamBase.BeginNegotiateHandshake (Mono.Security.Protocol.Tls.SslStreamBase+InternalAsyncResult asyncResult) [0x00021] in <4d95459e5c814a5dad6816d7b3a5a54b>:0
Unable to write data to the transport connection: Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'..
Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'.
有折腾过.net core 的可以帮忙解答一下吗?
我也遇到了这个问题了。可以使用下面这个命令手动还原。