Closed patridge closed 6 years ago
@patridge We are aware of the issue and are investigating the root cause. From my testing it only happens on Xamarin Android and Xamarin.iOS, currently what you did is the current work around. As of now we don't have an ETA for a fix.
Hi, after installing the missing packages I got a runtime exception with the Android version of a xamarin forms project . With the uwp version of the project all is ok. I am trying to send a message to my Iot hub.
StackTrace:
at Microsoft.Azure.Devices.Client.MessageConverter.TryGetAmqpObjectFromNetObject (System.Object netObject, Microsoft.Azure.Devices.Client.MappingType mappingType, System.Object& amqpObject) [0x00008] in <682ea61dd76b434382060d1847434f7e>:0
at Microsoft.Azure.Devices.Client.MessageConverter.UpdateAmqpMessageHeadersAndProperties (Microsoft.Azure.Amqp.AmqpMessage amqpMessage, Microsoft.Azure.Devices.Client.Message data, System.Boolean copyUserProperties) [0x001d8] in <682ea61dd76b434382060d1847434f7e>:0
at Microsoft.Azure.Devices.Client.Message.PopulateAmqpMessageForSend (Microsoft.Azure.Amqp.AmqpMessage message) [0x00000] in <682ea61dd76b434382060d1847434f7e>:0
at Microsoft.Azure.Devices.Client.Message.ToAmqpMessage (System.Boolean setBodyCalled) [0x0005e] in <682ea61dd76b434382060d1847434f7e>:0
at Microsoft.Azure.Devices.Client.Transport.AmqpTransportHandler+<>cDisplayClass37_0+<1[TResult].GetResult () [0x00000] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at Microsoft.Azure.Devices.Client.Transport.ErrorDelegatingHandler+<ExecuteWithErrorHandlingAsync>d__20
1[T].MoveNext () [0x0011f] in <682ea61dd76b434382060d1847434f7e>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <896ad1d315ca4ba7b117efb8dacaedcf>:0
at Microsoft.Azure.Devices.Client.Transport.ErrorDelegatingHandler+
We're tracking multiple issues caused by the PCL libraries. The decision was to remove the PCL binary from our next release. As a workaround, please try adding a new netstandard1.3 (or 2.0) library to your project and reference it from the Xamarin application. Using our SDK within this library should make things work.
Tentatively closing this as a duplicate of #138 .
In my case it only worked if the netstandard library was 1.2 or lower otherwise I'd get the above exception or the Linker one
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageTargetFallback>$(PackageTargetFallback);portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10+UAP10;</PackageTargetFallback>
</PropertyGroup>
Thanks for letting us know @PureWeen. I'll reopen this to ensure we don't hit that kind of issue after removing the PCL libs.
I think this is a duplicate of both #205 and #197.
Closing as dup of #205 which is fixed in 1.6.1 release.
Steps
Microsoft.Azure.Devices.Client
package (v1.4.2)Expected
Since the package installs, I would expect the project to build and run (without actually calling into the new NuGet package code).
Actual
Build exception
Workaround attempt
If I manually install the missing NuGet package to get the reference needed, it continues to change the error message for other missing assemblies, in this order:
Microsoft.Azure.Devices.Shared, Version=1.0.0.0
Microsoft.WindowsAzure.Storage, Version=8.1.1.0
DotNetty.Transport, Version=0.4.6.0
(plus a conflict between "different versions of the same dependent assembly")DotNetty.Codecs.Mqtt, Version=0.4.6.0
DotNetty.Handlers, Version=0.4.6.0
I haven't tested if any code using Microsoft.Azure.Devices.Shared actually works yet. This was all just to get the project to build.
Initial NuGet log
In case it helps to debug things, here's what NuGet says while installing the initial Microsoft.Azure.Devices.Client package on the Xamarin.Android project.
System info