Xamarin.Android 5.1.99

The Xamarin.Android 5.1.99 is an alpha for Xamarin.Android 6.0, which fixes numerous bugs and provides a binding for Android 6.0 Marshmallow.

Note: Xamarin.Android 5.1.99 requires JDK 1.7 to use Android Wear and API-21+. JDK 1.6 may be used when targeting previous API levels.

Xamarin.Android 5.1

New Features

Build Improvements

The Xamarin.Android Build system has been reviewed to avoid executing MSBuild targets more than is necessary.

Sample5.1.4 Rebuild Time5.1.99 Rebuild TimeImprovement
TipCalc.UI.Android 11.278727s 1.892669s -9.386058s

TODO: Build time improvements.

Changing build options will now consistently cause build outputs to be rebuilt.

When using Visual Studio, MSBuild, or xbuild, a new $(InstallDependsOnTargets) MSBuild property can now be overridden to perform pre- and post-Install actions. (Bug #16553)

Line Numbers and Release Builds

TODO: How's this work?

  • 18137: Release builds do not include file name/line number in exception stack traces

Add Mono.Posix.dll

A version of Mono.Posix.dll (without the obsolete Mono.Posix namespace) is now included, providing access to the Mono.Unix and Mono.Unix.Native namespaces.

Note: Android does not support Unix Real-time signals on many architectures. Attempting to use them may result throwing a NotSupportedException.

Reduced NoClassDefFoundError Generation.

In order to avoid extra NoClassDefFoundError generation, and to support properly looking up Java types located in assemblies other than Mono.Android.dll, the packaging process now generates a mapping between all bound Java types and their corresponding wrappers. This should reduce the need to use the .JavaCast<T>() extension method. (Bug #7459)

Note, however, that this only works for bound types. If a Java method returns e.g. an interface type, and the implementation returns a non-public or otherwise unbound type, then the previous behavior of following an algorithmically determined "best matching wrapper" is used.

Bug Fixes

  • 1969: System.Net.NetworkInformation.GetAllNetworkInterfaces() fails.
  • 18824: For certain projects, setting the linker mode to a value other than "None" leads to incorrect line numbers when debugging
  • 23771: UTF8 Decoder's Convert does not keep internal state between calls when flush parameter is false
  • 28538: Android application crashed as soon as it launches on device/Emulator
  • 28565: ClassNotFoundException when instantiating LayerDrawable.
  • 28789: Generic fragments throw TypeLoadException. (Now they instead throw NotSupportedException.)
  • 29731: [XA 5.1] Android.Bluetooth.BluetoothAdapter.Enable is incorrectly marked as [Obsolete("deprecated")]
  • 29757: Resource overriding with aapt is FUBAR
  • 30318: Xamarin.Android Breakpoints in Forms PCL project do not work after cleaning solution, redeploying, and restarting debugging
  • 31497: Multiple re-downloads of the same package.
  • 31527: Unable to load file or assembly 'System.Runtime' in project with both shared runtime and Link SDK enabled
  • 31705: Embedded resources are not being fast deployed from the IDE in XA 5.1.4+.
  • 31875: as invocation fails if dos2unix is in %PATH%.
  • 32418: Need MSBuild output when downloading maven zip files and unzipping.
  • 32696: Android XML Resource reader tries to read extra attributes.
  • 33305: Exceptions thrown from void-returning async methods don't contain the full stack trace.

Integrated Mono Features/Fixes

Xamarin.Android uses Mono 4.2 commit 9b990f2b.

  • 1856: Wrong stack trace when exception is re-thrown
  • 2917: XslCompiledTransform.Load() ignoring xsl:output properties
  • 4148: JavaScriptSerializer invalid JSON primitive
  • 10268: Linker issue with horizontallistview project in release mode
  • 16475: Method not found: System.Web.Routing.RouteCollection.get_AppendTrailingSlash
  • 17817: Convert.ToUInt64() with base 10 does not check range
  • 18171: XElement implements IXmlSerializable, but lacks parameterless constructor, and has incorrect QName in KnownTypeCollection
  • 18558: XML Serializer does not match .NET behavior when using subclasses with multiple XmlElement tags
  • 19334: BeginWrite failure at System.Net.Sockets.NetworkStream.BeginWrite
  • 19697: WCF SendTimeout not working in Xamarin
  • 19823: InvalidOperationException in ServicePoint.RemoveConnectionGroup()
  • 20048: Socket ctor missing
  • 20764: WebMessageFormatter crashes with void return type OperationContract
  • 21810: Method not implemented System.Web.HttpApplication.RegisterModule
  • 23119: Remove npgsql from mono (or at least update)
  • 24086: Runtime test - TestDaylightSavingsTime fails against Asia/Amman for 2012 DateTimes
  • 24647: ExceptionDispatchInfo::Throw() does not replace capture stack trace
  • 25717: Calling a created delegate for value type fails in Mono but works in Windows
  • 26205: System.IO.Package.LoadRelationships() throws null reference for some NuGet packages with PCLs generated on Windows
  • 26362: [Process] Exited event raised while process still running
  • 26546: Issue when using null value for integer and datetime in SqlParameter
  • 26858: HttpListeners scheme parser is case sensitive
  • 26998: Issue with DataContractJsonSerializer - Deserialize type incorrect on iOS
  • 27348: Deadlock in WebConnectionGroup.Close() / WebConnection.Close()
  • 27352: HttpRequestMessage: adding Accept header with multiple values fails
  • 27386: HttpClient doesn't honor BaseAddress with the Get*Async() methods
  • 27614: Native interop: out LPArrays cause crash
  • 27697: Debugger crash: error: * Assertion at ../../../../../mono/mono/mini/debugger-agent.c:2475, conditiontls' not met``
  • 27725: Missing day names in ar-EG culture
  • 27982: Inconsistent behavior in DynamicAttribute.Equals() method
  • 28014: Type is not serializable with a type-forwarded SerializableAttribute
  • 28181: * Assertion: should not be reached at debugger-agent.c:5957
  • 28184: ParameterInfo.GetCustomAttributes() returns null in some cases
  • 28235: System.Type change to reference source broke IronPython
  • 28290: Marshal.AllocCoTaskMem() does not throw OutOfMemoryException on alloc failure
  • 28331: Custom Attributes incompatability
  • 28369: mono runtime crash assertion 'hash != NULL' failed
  • 28383: Marshal.AllocCoTaskMem(0) incorrectly returns null
  • 28398: * Assertion: should not be reached at class.c:6405
  • 28692: GetCustomAttributes() seems to return attributes in a different order than in windows.
  • 28777: GZipStream (DeflateStreamNative) native exception after Flush() with no buffer data: Internal error (no progress possible) Flush
  • 28793: SynchronizationContext.SetSynchronizationContext() leaks back inappropriately into caller
  • 28857: Nursery-canaries and AOT causes assertion failure
  • 28876: Satellite assembly finder fails for memory-loaded assemblies with GetDirectoryName(): Invalid path
  • 28961: AOT error when upgrading to Unified API
  • 29039: CultureInfo.GetCultures(CultureTypes.SpecificCultures) returns broken ar-SA culture
  • 29183: Array constructor fails to construct multi bound array
  • 29625: Unable to extract certain archives using ZipFile.ExtractToDirectory
  • 29667: Mono v4.0 crashes after a while
  • 29679: Mono crashes with Assertion at class.c:5748 when getting custom attributes from corefx contract assembly
  • 29823: 4.0 Regression - SqlConnectionBuilder broken after migrating to System.Data reference source
  • 29906: Static method TimeZoneInfo.GetSystemTimeZones() is not thread safe.
  • 29927: Http Response doesn't UnescapeDataString
  • 29970: [MonoNativeFunctionWrapper] doesn't work with methods that return structures on 32bit device
  • 30043: Disposing a FileSystemWatcher object causes ArgumentOutOfRangeException
  • 30171: BinaryReader.ReadChar() returns incorrect result on 8.10
  • 30502: AssemblyName.CultureName implementation differs from .NET.
  • 30551: Potential race in do_rehash
  • 30604: HttpClient times out when redirected on a Post request
  • 30617: Stepping over foreach exits method
  • 30698: Build fails when building for device using --aot-options=-O=float32 and performing a calculation on float or nfloat variables
  • 30741: MemoryMappedFiles from reference source is causing segfaults
  • 30825: Null string to mono_mmap_open_handle() Regression between 4.1.0.1738 and 4.3.0.109
  • 30851: Incorrect (Swedish) date format since version 3.4.0
  • 30868: ObjectDisposedException in mono 4.0.1.28, but not mono 3.12.1
  • 30869: HttpClient authentication not working
  • 30880: IPv4Mask property produces a Not Implemented Exception
  • 30897: App crashes with Thai locale selected
  • 30972: System.IO.Compression.ZipArchive disregards provided encoding
  • 31020: Order of interfaces in GetInterfaces() is random
  • 31231: Crash with generics makeref
  • 31336: HttpClient adds comma in User-Agent
  • 31398: Cultures zh-Hans and zh-CHS are equal when they should not be
  • 31451: mono_trace_set_printerr_handler() calls g_set_print_handler() instead of g_set_printerr_handler()
  • 31507: ObjectDisposedException when canceling postAsync
  • 31635: UnixMarshal.PtrToString() fails with UTF32Encoding
  • 31877: SendChunked() - "Method must be implemented"
  • 31932: Regression: Stack Overflow with native P/Invoke Callback
  • 31996: AOT compiler fails if path to project has a comma
  • 32137: System.Text.Encoding.UTF8.EncodingName not the returning human-readable description of the current encoding
  • 32179: Consistent crash in mini-arm.c when running FSharp on Raspberry Pi 2
  • 32539: Process.ProcessName value fetched using Process.GetProcesses() is trimmed to 15 characters
  • 32579: System.Diagnostics.Process.MainModule.FileName does not return full path of the executable and returns 15 chars trimmed value which is same as Process.ProcessName
  • 32685: NullReferenceException in ServicePoint.CheckAvaliableForRecycling
  • 32815: PropertyInfo.Module throws System.NotImplementedException
  • 32886: [Mono 3.12] Some WCF methods that do not use ref parameters fail with nvalidOperationException during ClientRuntimeChannel.EndProcess when called via a ChannelFactory channel
  • 32918: StackTrace() missing original exception - ExceptionDispatchInfo
  • 32931: NullReferenceException in KeyValuePair.get_Key when using generic method and Linq
  • 33080: JIT error only on ARMV7

API Changes

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.