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

Alexis Richardson alexis.richardson at cohesiveft.com
Sun Mar 1 19:33:51 GMT 2009


Jon,

Thanks very much for raising this here.  Someone will look at your
'getter and the field' question asap.

Meanwhile (as it is Sunday..), can I ask if you have tried patching
the code per your suggested fix?  If so, can you let us know what
happens.

alexis


On Sun, Mar 1, 2009 at 6:36 PM, Jon Palmer <jonspalmer at gmail.com> wrote:
> 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
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>




More information about the rabbitmq-discuss mailing list