<span class="Apple-style-span" style="font-size: small;">I am new to using RabbitMQ and I couldn&#39;t find if this question has been asked on the mailing list before. </span><div><span class="Apple-style-span" style="font-size: small;"><br>
</span></div><div><span class="Apple-style-span" style="font-size: small;">I&#39;m trying to use RabbitMQ.Net inside a Powershell script. Something like this:<br><br></span><div><span class="Apple-style-span" style="font-size: small;">[System.Reflection.Assembly]::LoadFile(  &quot;C:\tools\RabbitMQ.Client.dll&quot;)</span></div>
<div><span class="Apple-style-span" style="font-size: small;"><br></span></div><div><span class="Apple-style-span" style="font-size: small;">function GetAmqpChannel( $amqp_host =&quot;127.0.0.1&quot;, $uid =&quot;guest&quot;, $pwd =&quot;guest&quot;)</span></div>
<div><span class="Apple-style-span" style="font-size: small;">{</span></div><div><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-size: small;">        </span></span><span class="Apple-style-span" style="font-size: small;">$factory = new-object RabbitMQ.Client.ConnectionFactory</span></div>
<div><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-size: small;">        </span></span><span class="Apple-style-span" style="font-size: small;">$protocol = [RabbitMQ.Client.Protocols]::DefaultProtocol</span></div>
<div><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-size: small;">        </span></span><span class="Apple-style-span" style="font-size: small;">return $factory.CreateConnection($protocol, $amqp_host).CreateModel()</span></div>
<div><span class="Apple-style-span" style="font-size: small;">}</span></div><div><span class="Apple-style-span" style="font-size: small;"><br></span></div><div><span class="Apple-style-span" style="font-size: small;">GetAmqpChannel<br>
</span></div><div><span class="Apple-style-span" style="font-size: small;"><br></span></div><div><span class="Apple-style-span" style="font-size: small;"><br></span></div><div><span class="Apple-style-span" style="font-size: small;"><br>
</span></div><div><span class="Apple-style-span" style="font-size: small;">However I receive the following error:</span></div><div><span class="Apple-style-span" style="font-size: small;"><br></span></div><div><span class="Apple-style-span" style="font-size: small;"><br>
</span></div><div><div><span class="Apple-style-span" style="font-size: small;">The field/property: &quot;shutdownReport&quot; for type: &quot;RabbitMQ.Client.Framing.Impl.v0_8.Connection&quot; differs only in case from</span></div>
<div><span class="Apple-style-span" style="font-size: small;"> the field/property: &quot;ShutdownReport&quot;. Failed to use non CLS compliant type.</span></div><div><span class="Apple-style-span" style="font-size: small;"><br>
</span></div><div><span class="Apple-style-span" style="font-size: small;"><br></span></div><div><span class="Apple-style-span" style="font-size: small;">Looking at the source it seems that the problem is that </span><span class="Apple-style-span" style="font-family: Calibri; "><span class="Apple-style-span" style="font-size: small;">RabbitMQ.Client.Impl declares both</span></span></div>
</div><div><p class="MsoNormal"><span style="font-family: Tahoma, sans-serif; color: black; "><span class="Apple-style-span" style="font-size: small;">public </span></span><u><span style="font-family: Tahoma, sans-serif; color: rgb(33, 93, 198); "><span class="Apple-style-span" style="font-size: small;">System.Collections.IList</span></span></u><span style="font-family: Tahoma, sans-serif; color: black; "><span class="Apple-style-span" style="font-size: small;"> ShutdownReport {
get; }</span><span class="Apple-style-span" style="font-size: small;"></span></span></p><p class="MsoNormal"><span class="Apple-style-span" style="font-family: Tahoma; font-size: 12px;"></span></p><p class="MsoNormal"><span style="font-family: Tahoma, sans-serif; color: black; "><span class="Apple-style-span" style="font-size: small;">public </span></span><u><span style="font-family: Tahoma, sans-serif; color: rgb(33, 93, 198); "><span class="Apple-style-span" style="font-size: small;">System.Collections.IList</span></span></u><span style="font-family: Tahoma, sans-serif; color: black; "><span class="Apple-style-span" style="font-size: small;"> shutdownReport</span><span class="Apple-style-span" style="font-size: small;"></span></span></p>
<p class="MsoNormal"><span class="Apple-style-span" style="font-size: small;"><br></span></p><p class="MsoNormal"><span class="Apple-style-span" style="font-size: small;">As a result the Client.Impl class isn&#39;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?</span></p>
<p class="MsoNormal"><span class="Apple-style-span" style="font-size: 13px;"><br></span></p><p class="MsoNormal"><span class="Apple-style-span" style="font-size: 13px;">Many thanks</span></p><p class="MsoNormal"><span class="Apple-style-span" style="font-size: 13px;">Jon</span></p>
<p class="MsoNormal"><br></p><p class="MsoNormal"><span class="Apple-style-span" style="font-weight: bold;"><br></span></p><p></p></div></div>