I've made the very simple change in RabbitMQ.Client.Impl.ConnectionBase to make shutdownReport a private not public field and so far my Powershell problems are fixed.<div><br></div><div>It feels like shutdownReport being public is just a bug and that it is intended as the private backing field for the public property. I'll wait to here more once the week starts.</div>
<div><br></div><div>Thanks</div><div>Jon<br><br><div class="gmail_quote">On Sun, Mar 1, 2009 at 11:33 AM, Alexis Richardson <span dir="ltr"><<a href="mailto:alexis.richardson@cohesiveft.com">alexis.richardson@cohesiveft.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Jon,<br>
<br>
Thanks very much for raising this here. Someone will look at your<br>
'getter and the field' question asap.<br>
<br>
Meanwhile (as it is Sunday..), can I ask if you have tried patching<br>
the code per your suggested fix? If so, can you let us know what<br>
happens.<br>
<br>
alexis<br>
<div><div></div><div class="Wj3C7c"><br>
<br>
On Sun, Mar 1, 2009 at 6:36 PM, Jon Palmer <<a href="mailto:jonspalmer@gmail.com">jonspalmer@gmail.com</a>> wrote:<br>
> I am new to using RabbitMQ and I couldn't find if this question has been<br>
> asked on the mailing list before.<br>
> I'm trying to use RabbitMQ.Net inside a Powershell script. Something like<br>
> this:<br>
><br>
> [System.Reflection.Assembly]::LoadFile( "C:\tools\RabbitMQ.Client.dll")<br>
> function GetAmqpChannel( $amqp_host ="127.0.0.1", $uid ="guest", $pwd<br>
> ="guest")<br>
> {<br>
> $factory = new-object RabbitMQ.Client.ConnectionFactory<br>
> $protocol = [RabbitMQ.Client.Protocols]::DefaultProtocol<br>
> return $factory.CreateConnection($protocol, $amqp_host).CreateModel()<br>
> }<br>
> GetAmqpChannel<br>
><br>
><br>
><br>
> However I receive the following error:<br>
><br>
> The field/property: "shutdownReport" for type:<br>
> "RabbitMQ.Client.Framing.Impl.v0_8.Connection" differs only in case from<br>
> the field/property: "ShutdownReport". Failed to use non CLS compliant type.<br>
><br>
> Looking at the source it seems that the problem is that RabbitMQ.Client.Impl<br>
> declares both<br>
><br>
> public System.Collections.IList ShutdownReport { get; }<br>
><br>
> public System.Collections.IList shutdownReport<br>
><br>
> As a result the Client.Impl class isn't CLS compliant. This prevents me from<br>
> using RabbitMQ.Net inside powershell. Does anyone have suggestions about how<br>
> this can be fixed? Are both the getter and the field a required part of the<br>
> public API or could one be removed?<br>
><br>
> Many thanks<br>
><br>
> Jon<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> rabbitmq-discuss mailing list<br>
> <a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
> <a href="http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
><br>
><br>
</blockquote></div><br></div>