-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime Error in Microsoft.Azure.Devices.Client on Xamarin Android #373
Comments
I'm not sure if this is the same? It looks like this three problems are somehow related to visual studio for mac? |
I see the same behavior. Merely adding Microsoft.Azure.Devices.Client package v1.6.2 causes the app to crash at startup. The log:
|
Can you give an ETA or workaround on this? |
@benclerix-cegeka At the moment this seems to be a Xamarin compiler issue. |
@CIPop Ok thanks for the fast feedback! |
A workaround seems to be to set the Linker option to "Sdk and User assemblies" under the Android options in the properties of the Droid project. Not sure what the reason is but the Copying them manually, packing the APK and deploying it should probably work as well. |
@jfversluis it looks like it's a workaround for some projects. In my "steps to reproduce"-project the app didn't crash anymore. But in my real app I get now "The LinkAssemblies task failed unexpectedly". I look into that, perhaps I find a fix for that. |
@sgmbh it seems to be a trade-off indeed and not working for all projects. I found the same issue in several other places with a couple of workarounds, see the links underneath. dotnet/efcore#8922 (comment) |
Thanks @jfversluis for this links. Actually I tried exactly this steps before because I also saw this error : "System.Runtime.CompilerServices.Unsafe" (third last line in my fulllog file). Although I don't use Entity Framework, it looks like the problem seems related. |
Following solution worked for me: dotnet/android#1196 (comment). |
@benclerix-cegeka I tried your workaround but unfortunately I get the same error "link assemblies task failed" in a slightly other way:
|
I can confirm that latest vs 15.7 with XF 3.0.0.446417 fixed this issue. |
I can also confirm that with the following version this issue is fixed: |
OS and version used: Windows 10
SDK version used: Android 8.0
Xamarin.Forms version used: 2.5.0.122203 (edit: 2.5.0.280555)
Microsoft.Azure.Devices.Client version used: 1.6.2 (edit: 1.7.0)
Description of the issue:
Steps to reproduce the error:
New Cross-Platform App (Xamarin.Forms) > Blank App > Platform (Android & iOS) > UI Technology (Xamarin.Forms) > Code Sharing Strategy (.NET Standard) > OK
On Solution > Manage Nuget Packages for Solution... > Add "Microsoft.Azure.Devices.Client"
Build & run on Android Device (Nexus 5S) with Android 8.0 > it looks like the app will start, but it will crash at startup.
Edit 15. Feb. 2018: Build & run on iOS Device (iPhone 8) with iOS 11 works.
Code sample exhibiting the issue:
see description
Console log of the issue:
Build Log:
buildlog.txt
Smartphone Log:
fulllog.txt
The text was updated successfully, but these errors were encountered: