我正在使用 Powershell 中的 NetMQ 库,但不断收到以下异常。
环境
NetMQ Version: NetMQ.4.0.0.1
Operating System: Windows Server 2012
.NET Version: 4
我在 PowerShell 中使用它:
$pubSocket = New-Object NetMQ.Sockets.ResponseSocket -Args ("@tcp://localhost:5556")
但是它会引发以下异常:
New-Object : Exception calling ".ctor" with "1" argument(s): "Exception of type 'NetMQ.NetMQException' was thrown."
At line:1 char:14
+ ... pubSocket = New-Object NetMQ.Sockets.ResponseSocket -Args ("@tcp://lo ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException
+ FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand