[rabbitmq-discuss] RabbitMQ.Net, Windows Powershell and CLS compliance

Jon Palmer jonspalmer at gmail.com
Sun Mar 1 18:36:02 GMT 2009


I am new to using RabbitMQ and I couldn't find if this question has been
asked on the mailing list before.
I'm trying to use RabbitMQ.Net inside a Powershell script. Something like
this:

[System.Reflection.Assembly]::LoadFile(  "C:\tools\RabbitMQ.Client.dll")

function GetAmqpChannel( $amqp_host ="127.0.0.1", $uid ="guest", $pwd
="guest")
{
$factory = new-object RabbitMQ.Client.ConnectionFactory
$protocol = [RabbitMQ.Client.Protocols]::DefaultProtocol
return $factory.CreateConnection($protocol, $amqp_host).CreateModel()
}

GetAmqpChannel



However I receive the following error:


The field/property: "shutdownReport" for type:
"RabbitMQ.Client.Framing.Impl.v0_8.Connection" differs only in case from
 the field/property: "ShutdownReport". Failed to use non CLS compliant type.


Looking at the source it seems that the problem is that RabbitMQ.Client.Impl
declares both

public *System.Collections.IList* ShutdownReport { get; }

public *System.Collections.IList* shutdownReport


As a result the Client.Impl class isn't CLS compliant. This prevents me from
using RabbitMQ.Net inside powershell. Does anyone have suggestions about how
this can be fixed? Are both the getter and the field a required part of the
public API or could one be removed?


Many thanks

Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20090301/714ab416/attachment.htm 


More information about the rabbitmq-discuss mailing list