-
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
VS 15.5 Mono Linker throws NullReferenceException when trying to link on Xamarin.Andoird #270
Comments
I tried stepping through it a little bit with windbg and it seems like it chokes on BufferedInputStream when it's trying to match up properties with interfaces seems to return a null value that gets passed into
|
It seems like these being netstandard1.3 + the ICloneable fake out in AMQP + me using netstandard2.0 = Not Happy Linker I pulled down this and the AMQP project and just changed the Netstandard libraries over to 2.0 and removed ICloneable from the NETSTANDARD typedef since ICloneable is part of the Netstandard2.0 spec I also had to do this
Now my Android project is able to compile and run and IoT messages are happily working |
Thanks @PureWeen for reporting the issue and the solution! |
Thanks again @PureWeen for researching and finding a workaround. I was going through the issues linked and found a few Xamarin/Android issues that are tracking a bug-fix on their side: dotnet/android#1196 (comment) A group of related to bugs is also documented here: xamarin/AndroidSupportComponents#75 (comment) |
Thanks @abhipsaMisra for the investigation and new sample! Closing for now: please reopen if this is still observed on the latest Visual Studio release. |
AzureDeviceClient.zip
Windows 10 and iOS
I'm using the latest 1.6.0 but the same issues exists with 1.5.2
Description of the issue:
Compiling Xamarin android with full linking on causes the following exception
Severity Code Description Project File Line Suppression State
Error The "LinkAssemblies" task failed unexpectedly.
System.NullReferenceException: Object reference not set to an instance of an object.
at Mono.Linker.TypeReferenceExtensions.d__4.MoveNext()
at Mono.Linker.Steps.TypeMapStep.TryMatchMethod(TypeReference type, MethodDefinition method)
at Mono.Linker.Steps.TypeMapStep.d__12.MoveNext()
at Mono.Linker.Steps.TypeMapStep.MapVirtualInterfaceMethod(MethodDefinition method)
at Mono.Linker.Steps.TypeMapStep.MapVirtualMethods(TypeDefinition type)
at Mono.Linker.Steps.TypeMapStep.MapType(TypeDefinition type)
at Mono.Linker.Steps.TypeMapStep.ProcessAssembly(AssemblyDefinition assembly)
at Mono.Linker.Steps.BaseStep.Process(LinkContext context)
at Mono.Linker.Pipeline.Process(LinkContext context)
at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context)
at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
at Xamarin.Android.Tasks.LinkAssemblies.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets 1696
Code sample exhibiting the issue:
I've attached a project that's just an empty Android project I added the IoT libraries to that should exhibit the issues
The text was updated successfully, but these errors were encountered: