Alpha Release: XamarinVS 4.0.0, Cycle 6 Preview

BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
edited October 2015 in Visual Studio

This thread has now been closed to direct all further updates about this release onto the latest announcement:


  • Xamarin.VisualStudio_4.0.0.1505.msi (9ac5fb8)

Mac Build Host

  • monotouch- (f85a845)

Reason for release: Preview of the upcoming Cycle 6 feature release, in particular to gather as many additional customer bug reports as possible. (See the release blog and "Xamarin Release Cycles" for more information about "Cycles" and "Service Releases.")

Release notes:

Date published: See

NOTE: These Alpha versions have some known open bugs, and they have not yet completed the full suite of tests by the Xamarin QA team. The reason for this release is to gather as many additional customer bug reports as possible. (See also guideline #2 below.)

Previous versions, downgrading

You can downgrade back to the current Stable version by switching updater channels.

Guidelines for this thread

  1. This first post will be updated regularly.

  2. If you find a new problem that is specific to this version:

    a. If you can share some specific error messages or can reproduce the problem consistently, please email the information you have so far to [email protected].

    b. If you only have a general description of the problem, you can post it directly on this forum thread so that hopefully a member of the Xamarin team or another user will recognize it and be able to help fill in some details.

Important changes

  • XamarinVS 4.0.0 uses a new SSH-based build host connection that no longer requires the old "Xamarin.iOS Build Host" app on the Mac. (For a few more details see the release notes and a short introduction to setting up the new SSH connection.

  • [iOS] The Cycle 6 builds now require Xcode 7 or higher. For example, attempting to build an iOS app for device using Xcode 6.4 will now fail with "Native linking failed, undefined symbol: ___divdc3".

  • [Xamarin Studio] [Visual Studio] [iOS] [Android] Support for OS X 10.9 Mavericks has been deprecated. The Cycle 6 builds now require OS X 10.10 Yosemite.

Important known issues in the Alpha builds

  • Non-public Bug 34065 - [XamarinVS] [iOS] "System.IO.EndOfStreamException: We could not fully deserialize the response" when attempting to open Interface.storyboard in a WatchKit app.

New issues in the Alpha builds reported by users in the forum announcements

  • Non-public Bug 33465 - [Android] "Error MSB4018: The "MergeResources" task failed unexpectedly."

Remaining known issues from Cycle 5, with more common or severe issues near the top

  • Non-public Bug 30481, Bug 29557 - [Mono] [Android] [iOS] SqlConnection.GetSchema() fails with "SourceTable is required to be a non-empty string".

  • Bug 30548 - [Android] Under certain conditions new threads take several seconds to start. This problem seems to be triggered by Xamarin.Insights 1.10. Partial workarounds: upgrade Xamarin.Insights to version 1.10.3, downgrade to version 1.9, or remove it entirely.

  • Bug 29745 - [iOS] Error due to duplicate symbols during native compilation for device: "duplicate symbol _monoeg_g_array_new" (and many similar messages). Workarounds: disable profiling under "Project Properties -> iOS Build", or if your app uses the -all_load linker flag (via either gcc_flags or LinkerFlags) try removing it.

  • Bug 29731 - [Android] Android.Bluetooth.BluetoothAdapter.Enable is incorrectly marked as [Obsolete("deprecated")] for API level 20 and higher.

EDIT Sep 08: Add Android Bug 33465. Remove Android Bug 30513 because it's fixed.
EDIT Sep 10: Adjust the "guidelines" to mention [email protected].
EDIT Sep 18: Add iOS Bug 33124.
EDIT Sep 21: Update for Sep 18's new Alpha builds.
EDIT Sep 24: Update for new Alpha builds.


  • DavidSpeakDavidSpeak GBUniversity ✭✭

    After connecting to the Mac (Yosemite 10.10.3) as an admin user via SSH the new agent icon in VS is "orange" and says "Mac1.local (limited)" and I cannot see my iPhone in the device list, just "Device". Do I need to update the Mac as well as VS?

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
    edited September 2015

    Yup. You'll need to update the Mac as well.

    EDIT: Another little detail is that you'll need to log into the Mac from XamarinVS using the same user account that is currently logged in locally on the Mac.

  • PhilipGruebelePhilipGruebele USMember ✭✭

    Compiling both my project and XLabs for Android works, but every time I try to debug deploy to the Xamarin android simulator I get this error:

    7> SDCardDirectory:
    7> External: False
    7> ManifestTemplate: obj\Debug\android\AndroidManifest.xml
    7>The "InstallPackageAssemblies" task failed unexpectedly.
    7>System.NotSupportedException: The given path's format is not supported.
    7> at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
    7> at System.IO.File.InternalGetLastWriteTimeUtc(String path, Boolean checkHost)
    7> at System.IO.File.GetLastWriteTime(String path)
    7> at Xamarin.Android.Tasks.InstallPackageAssemblies.Execute()
    7> at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
    7> at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()
    7>Done executing task "InstallPackageAssemblies" -- FAILED.
    7>Done building target "_Upload" in project "XLabs.Sample.Droid.csproj" -- FAILED.
    7>Done building project "XLabs.Sample.Droid.csproj" -- FAILED.
    7>Build FAILED.
    ========== Build: 6 succeeded, 0 failed, 19 up-to-date, 0 skipped ==========
    ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

    I am using the latest nuget packages, Android tools, JDK 1.7 etc. This was working with the previous alpha so it's specific to this new release.

    If you give me a quick workaround I will continue testing. Otherwise this alpha is DOA for me.


  • PhilipGruebelePhilipGruebele USMember ✭✭

    With my IOS project, the following code now throws "System.ExecutionEngineException: Attempting to JIT compile method 'System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Sys…" on the second time "await outstream.WriteAsync(bytes, 0, l);" is called so it seems there are some AOT bugs:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using PCLStorage;

    namespace TDSP
    using System.Diagnostics;
    using System.IO;
    using System.Reflection;

    class FileManipulations
        public static async Task CopyResourceToFile(string resourcePath, string filePath, string fileName)
                // the regular file to write
                IFolder folder = FileSystem.Current.LocalStorage;
                if (filePath != null)
                    folder = await folder.CreateFolderAsync(filePath, CreationCollisionOption.OpenIfExists);
                IFile file = await folder.CreateFileAsync(fileName, CreationCollisionOption.ReplaceExisting);
                using (Stream outstream = await file.OpenAsync(FileAccess.ReadAndWrite))
                    // the embedded file to read
                    var assembly = typeof(GlobalViewModel).GetTypeInfo().Assembly;
                    byte[] bytes = new byte[1024*10];
                    using (Stream instream = assembly.GetManifestResourceStream(resourcePath))
                        int l;
                            l = instream.Read(bytes, 0, 1024*10);
                            await outstream.WriteAsync(bytes, 0, l);
                        while (l == 1024*10);
            catch (Exception)
        public static long GetResourceSize(string resourcePath)
                // the embedded file to read
                var assembly = typeof(GlobalViewModel).GetTypeInfo().Assembly;
                using (Stream stream = assembly.GetManifestResourceStream(resourcePath))
                    return stream.Length;
            catch (Exception)


  • PhilipGruebelePhilipGruebele USMember ✭✭
    edited September 2015

    Actually I get that AOT JIT exception in lots of different places, so this alpha seems to be DOA for me at least...Seems to be related to await/async and not the specific library being used.

    Happens regardless of IOS Build linker options (I tried Don't Link and Link SDK Assemblies only).

  • AdamHillAdamHill USBeta ✭✭

    I have a MBP 10.10.5 running Parallels as my VM running Windows 8.1 has the guest OS and a fresh upgrade to the new Cycle 6 Alpha.

    I am getting a "Could not authenticate the user using the existing ssh keys" when trying to build. I have disconnected and reconnected several times.

    I can ssh to the Mac just fine from the PC. The Remote Login is set to All users and firewalls on both sides are off.

    I have attached logs.

  • DavidSpeakDavidSpeak GBUniversity ✭✭


    Had a quick go over the weekend.

    Can connect to the Mac Ok via SSH after updating it and connecting with the same account as the local login. First attempt to deploy (existing known good app code) got an error similar to "library/cache/pList cannot be found" (sorry was short on time so didn't get the full error message), but after a couple of rebuilds and restarts of VS I could deploy to the device (simulator would not open on the mac when I clicked the button in VS btw - nothing happened). Build / deploy speed was about the same as the current version.

    App started Ok, but crashed in two places (which is as far as I could get.)
    1 Calling FadeTo(1) on a RelativeView
    2 Calling Azure MobileServiceClient.InvokeAsyncApi(...)

    Couldn't debug as in both cases I just got the "Exception in External Code" error screen in VS with no more info available.

    Had to revert to older version as I need to get on with the app.

    On the plus side, when I was debugging normally with the alpha it was very quick and stopped exactly where it should on the breakpoints in the code, which it doesn't always do in the current version.

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    Just for some quick cross-thread bookkeeping, I'll record here that the "InstallPackageAssemblies" exception mentioned above was reported by another user on the corresponding Xamarin.Android release announcement.

    See the following two posts for a little additional follow-up on that issue:

  • PhilipGruebelePhilipGruebele USMember ✭✭

    @BrendanZagaeski Thanks for the links.

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    Again for bookkeeping I will record here that I have sent an individual follow-up via email for the "System.ExecutionEngineException: Attempting to JIT compile method" from the comment on September 3. I did not find any existing bugs that matched those symptoms, and I wasn't able to reproduce the problem by pasting the code in that comment into a simple test case, but I will update this thread with any progress from the email discussion.

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
    edited September 2015

    AdamHill, thanks for the report. Interestingly, from the log files it looks like the SSH connection is succeeding, but then a the very end of the connection process there is an error in the log files:

    [2015-09-04 21:57:07.2212] There was an error while trying to evaluate the consistency between local build and conencted Mac build.

    The log files show one connection that appeared to be mostly successful (the XamarinVS team might need to add some additional logging), followed by a second connection where that "consistency" error was the last thing to appear.

    1. As a quick first check, does that time code of 21:57 sound approximately correct for the time of day when you observed the error?

    2. If by luck you get a chance to try to reproduce the error once more, if you could take a quick screenshot to show the state of whole Visual Studio window at the time when you see the error (including the error itself), that might come in handy.

    Thanks in advance!

  • PhilipGruebelePhilipGruebele USMember ✭✭

    @Marabunta Could you post the exception details for these exceptions you reported?

        1 Calling FadeTo(1) on a RelativeView
        2 Calling Azure MobileServiceClient.InvokeAsyncApi(...)

    That sounds like it could be the same AOT JIT exception I ran into. Would be good to know I'm now alone :)

    Unfortunately it will be some time before I can test this again so it would be very helpful if you did indeed duplicate this.

  • DavidSpeakDavidSpeak GBUniversity ✭✭


    Unfortunately there was no exception info - the app just collapsed, and the debugger in VS just says "Exception in External Code". Couldn't really give it much investigation as I had to back out the alpha to work on my app. Certainly feels like a low level JIT thing though.

  • Adam.HillAdam.Hill USMember


    Could a 2-3 minute time difference cause the problem? (I got bit by that one at work when they turned off the NTP servers to deal with the leap second and Xam would not build if >3 minute difference)

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    Could a 2-3 minute time difference cause the problem

    Adam.Hill, it's certainly an interesting question to test, especially since your logs show approximately a 1 hour difference between the Mac build host and the Visual Studio logs.

    But I have now tried several different amounts of discrepancy between the system clocks on the two systems, and I have not yet been able hit any problems in pairing, forgetting, re-pairing, building, deploying, or debugging with a blank test app.

    The primary requirement for synchronized clocks in the past was as part of the HTTPS authentication mechanism. That particular requirement is no longer present with the new SSH-based connection.

  • Nick_Nick_ USMember

    I'm getting this error message in my info.plist "unable to retrieve information from mac build host" Also there aren't any devices showing up but the xamarin mac agent says Connected.

  • Nick_Nick_ USMember

    @BrendanZagaeski Is there anyway to fix this error i'm having?

  • SKuklauSKuklau DEMember

    I can't seem to run XMA. In Visual Studio, the dialog says "couldn't connect" after a while. The logs are a bit more verbose:

    Checksum failed for '/Users/chucker/Library/Caches/Xamarin/XMA/Broker/'
    Installing Broker
    Disconnected from Mac SNK-L-4.local (
    Uploading Broker (352/3492 KB) 10%...
    Uploading Broker (704/3492 KB) 20%...
    Uploading Broker (1056/3492 KB) 30%...
    Uploading Broker (1408/3492 KB) 40%...
    Uploading Broker (1760/3492 KB) 50%...
    Uploading Broker (2096/3492 KB) 60%...
    Uploading Broker (2448/3492 KB) 70%...
    Uploading Broker (2800/3492 KB) 80%...
    Uploading Broker (3152/3492 KB) 90%...
    Uploaded Broker 100%
    Checksum failed for '/Users/chucker/Library/Caches/Xamarin/XMA/Broker/'
    Unable to install the Broker
    Couldn't connect to SNK-L-4.local. Please try again.

    (I do indeed get a Broker.exe on my Mac, and I can manually launch it, too.)

    Meanwhile, on the Mac:

    29/09/15 00:35:38,057 sshd[65019]: error: connect_to port 58424: failed.

    (The port is random.)

    What I find strange about the VS log is that, assuming it's chronological, it says "Disconnected from" before starting to actually upload the broker. Is this expected behavior?

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    @Nick_, @chucker many thanks for the reports and apologies for the slow follow-up. The Xamarin.iOS 9.0 Stable release pulled me away from these Alpha threads for the past couple of weeks. Moving forward I will adjust my recommendation on these pre-Stable feature release threads to encourage direct bug reports. That will help distribute the follow-up investigation among the Xamarin QA and engineering teams and allow for more detailed discussion of specific symptoms.

    As a side note, the XamarinVS team has now started writing a troubleshooting guide for the new SSH-based build host. So with a little luck, that should help address many of the common build host connectivity issues by the time Cycle 6 gets to Stable.

    Next steps: new Alpha version

    For now, I have updated the bug-filing recommendation on a new announcement for the latest Alpha builds from today:

    If you like, feel free to try these new builds to see if they improve the behavior on your system, and if not please do file a quick bug report to describe the symptoms. Thanks in advance!

    A few preliminary notes on chucker's symptoms

    Checksum failed for '/Users/chucker/Library/Caches/Xamarin/XMA/Broker/'

    It says "Disconnected from" before starting to actually upload the broker

    That is curious. In my very quick tests (using the latest Alphas) where I intentionally corrupted Broker.exe, the upload process completed successfully and the Broker launched without error.

    29/09/15 00:35:38,057 sshd[65019]: error: connect_to port 58424: failed.

    Based on some preliminary experiments it appears that this is purely a consequence (rather than a cause) of the primary Broker issue. I can reproduce this "connect_to" failure by intentionally killing the Broker.exe process on the Mac build host.

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    This thread has now been closed to direct all further updates about this release onto the latest announcement:

This discussion has been closed.