Bug 52320 - [VS2017] Xamarin.iOS.Windows.After.targets(63,5): error : Unable to start Build 4.3.0.664 agent. when building iOS apps
Summary: [VS2017] Xamarin.iOS.Windows.After.targets(63,5): error : Unable to start Bui...
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: XMA ()
Version: 4.3.0 (C9)
Hardware: PC Windows
: --- critical
Target Milestone: 4.3.0 (C9)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-02-06 15:30 UTC by Kyle White
Modified: 2017-03-21 15:01 UTC (History)
11 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
VerboseZipLogs (4.26 KB, application/x-zip-compressed)
2017-02-06 15:30 UTC, Kyle White
Details
Detailed and Diagnostic logs (12.96 KB, application/x-rar)
2017-03-21 14:26 UTC, Tanmay Bhattacharjee
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Kyle White 2017-02-06 15:30:59 UTC
Created attachment 19728 [details]
VerboseZipLogs

# Repro
1) Install VS2017RC 26204.00 on a *clean machine* (or at least a machine that *does not* have VS2015/Xamarin
2) Create a new iOS application
3) Wait for your XMA to connect
4) Build solution

Actual result:
Build quickly fails with
>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\iOS\Xamarin.iOS.Windows.After.targets(63,5): error : Unable to start Build 4.3.0.664 agent.

Expected result:
Should build

# About info
Microsoft Visual Studio Enterprise 2017 RC
Version 15.0.26204.0 D15REL
Microsoft .NET Framework
Version 4.6.01586

Xamarin   4.3.0.664 (f42aa37)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   7.1.0.31 (c9880f9)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.Android SDK   7.1.0.31 (c9880f9)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS   10.4.0.102 (20d957a)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS and Xamarin.Mac SDK   10.4.0.102 (20d957a)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Comment 1 Ben Beckley 2017-02-06 16:41:00 UTC
I have also hit the same bug by following the reproduction steps from the description.

Preconditions:
- VS 2017 26201.01
- Never had VS2015 installation

1) Updated VS2017 through the Notifications tab to version 26205.0 and XVS 4.3.0.664 (f42aa37)
2) Updated Mac agent with Xamarin.iOS 10.4.0.102 (20d957a)
3) Created new iOS app
4) Allowed connection to Mac agent
5) Rebuilt project

Actual behavior: Received the following error
>Unable to start Build 4.3.0.664 agent.	C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\iOS\Xamarin.iOS.Windows.After.targets	63	

env info: https://gist.github.com/BenBeckley/e045a947ed0f2b31ca48feb2282e93e7
Comment 4 Mark West 2017-02-08 05:43:54 UTC
I'm getting something very similar. 
Using Xamarin Studio 6.2(build 1809) on the Mac.
Using Visual Studio on Win10:

------------------------------------------------------

Microsoft Visual Studio Enterprise 2017 RC
Version 15.0.26206.0 D15REL
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Enterprise

Architecture Diagrams and Analysis Tools   00369-50000-00000-AA297
Microsoft Architecture Diagrams and Analysis Tools

Visual Basic 2017 RC   00369-50000-00000-AA297
Microsoft Visual Basic 2017 RC

Visual C# 2017 RC   00369-50000-00000-AA297
Microsoft Visual C# 2017 RC

Visual C++ 2017 RC   00369-50000-00000-AA297
Microsoft Visual C++ 2017 RC

Visual F# 4.1   00369-50000-00000-AA297
Microsoft Visual F# 4.1

Add New File   3.5
The fastest and easiest way to add new files to any project - including files that start with a dot

Arduino for Visual Studio   1.0
Arduino extension for Visual Studio. For more information please see docs, faq and forum at http://www.visualmicro.com

ASP.NET and Web Tools 2017   15.0.30206.0
ASP.NET and Web Tools 2017

ASP.NET Web Frameworks and Tools 2012   4.0.11203.0
For additional information, visit https://www.asp.net/

ASP.NET Web Frameworks and Tools 2017   5.2.50127.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   15.0.30126.0
Azure App Service Tools v3.0.0

Azure Data Lake Node   1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio   2.2.5000.0
Microsoft Azure Data Lake Tools for Visual Studio

Bundler & Minifier   2.2.307
Adds support for bundling and minifying JavaScript, CSS and HTML files in any project.

Common Azure Tools   1.9
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Dotfuscator Community Edition   5.27.0.4679-release+ce-vs15.e4937ba.20161216.158
PreEmptive Protection - Dotfuscator CE

Fabric.DiagnosticEvents   1.0
Fabric Diagnostic Events

File Icons   2.5
Adds icons for files that are not recognized by Solution Explorer

File Nesting   2.6.67
Automatically nest files based on file name and enables developers to nest and unnest any file manually

GitHub.VisualStudio   2.2.0.6
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

Image Optimizer   3.6.103
Uses industry standard tools to optimize any JPEG, PNG and Gifs - including animated Gifs. Can do both lossy and lossless optimization.

Image Sprites   1.4.47
Boost your website's performance by creating image sprites to reduce the amount of HTTP requests needed.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

JavaScript UWP Project System   2.0
JavaScript UWP Project System

JetBrains ReSharper Ultimate 2016.3.2    Build 107.0.20170126.120331
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2017 JetBrains, Inc.

KofePackagePackage Extension   1.0
KofePackagePackage Visual Studio Extension Detailed Info

Markdown Editor   1.10.186
A full featured Markdown editor with live preview and syntax highlighting. Supports GitHub flavored Markdown.

Merq   1.1.13-alpha (2f64b6d)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft Azure Hive Query Language Service   2.2.5000.0
Language service for Hive query

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.50131.1

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio   Mono.Debugging.VisualStudio
Support for debugging Mono processes with Visual Studio.

Node.js Tools   1.3.41102.00
Adds support for developing and debugging Node.js apps in Visual Studio

NuGet Package Manager   4.0.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Open Command Line   2.1.179
Opens a command line at the root of the project. Support for all consoles such as CMD, PowerShell, Bash etc. Provides syntax highlighting, Intellisense and execution of .cmd and .bat files.

Open in Visual Studio Code   1.3.21
Adds a menu command that lets you open any solution, project, folder and file in Visual Studio Code.

Package Installer   2.0.99
Makes it easier, faster and more convenient than ever to install Bower, npm, Yarn, JSPM, TSD, Typings and NuGet packages to any project

Redgate ReadyRoll   1.13.21.2875
Extend DevOps processes to your SQL Server databases and safely automate database deployments.
    
Visit https://www.red-gate.com/readyroll for more information.

Copyright (C) 2011 Red Gate Software Ltd. All rights reserved.
  
This software contains components from Component Owl.
SQL Server is a registered trademark of Microsoft Corporation. 
Visual Studio is a registered trademark of Microsoft Corporation. 

ReadyRoll contains code from the following open source software:

NuGet https://www.nuget.org/
SQL LocalDB Wrapper https://github.com/martincostello/sqllocaldb
Autofac https://autofac.org/
Json.NET https://json.net/
MahApps.Metro http://mahapps.com/
SemVer https://github.com/maxhauser/semver
Menees Diff Controls http://www.menees.com/
Log4Net http://logging.apache.org/log4net/
Extended WPF Toolkit https://wpftoolkit.codeplex.com/
Code InfoBox VSX http://www.codeproject.com/Articles/55196/Code-InfoBox-Visual-Studio-Extension-VSX
OctoPack https://github.com/OctopusDeploy/OctoPack
SQLite https://sqlite.org/

This product contains icons from http://www.visualpharm.com distributed under a free backlink license.

For license details or other notices relating to the above software, please see NOTICE.TXT and EULA.rtf in the ReadyRoll application folder.
    

Redgate SQL Prompt   7.4.0.464
Write, format, and refactor SQL effortlessly

SQL Server Data Tools   15.1.61701.270
Microsoft SQL Server Data Tools

SQLite & SQL Server Compact Toolbox   4.6.0
SQLite & SQL Server Compact Toolbox adds scripting, import, export, rename, query execution and much more to SQL Server Compact & SQLite Data Connections.

Syntax Highlighting Pack   2.5.113
Adds syntax highlighting and snippet support for a wide variety of programming languages such as Clojure, Go, Jade, Lua, Swift, Ruby and many more...

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript   2.1.5.0
TypeScript tools for Visual Studio

Visual C++ for Cross Platform Mobile Development (Android)   15.0.26206.00
Visual C++ for Cross Platform Mobile Development (Android)

Visual C++ for Cross Platform Mobile Development (iOS)   15.0.26206.00
Visual C++ for Cross Platform Mobile Development (iOS)

Visual C++ for Linux Development   1.0.6
Visual C++ for Linux Development

Visual Studio Tools for Apache Cordova   15.113.6201.1
Visual Studio Tools for Apache Cordova

Visual Studio tools for CMake   1.0
Visual Studio tools for CMake

Visual Studio Tools for Unity   3.0.0.1
Visual Studio Tools for Unity

Visual Studio Tools for Universal Windows Apps   15.0.26206.00
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

VisualGDB   5.2
Allows developing and debugging Embedded, Linux, Android and other GCC/GDB-based applications with Visual Studio.

Wax   1.0.21.0
WiX Setup Editor

Web Compiler   1.11.326
Compiler for LESS, Sass and CoffeeScript files

WebPack Task Runner   1.5.79
Adds support for WebPack in Visual Studio 2015's Task Runner Explorer.

Xamarin   4.3.0.664 (f42aa37)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   7.1.0.31 (c9880f9)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.Android SDK   7.1.0.31 (c9880f9)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS   10.4.0.102 (20d957a)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS and Xamarin.Mac SDK   10.4.0.102 (20d957a)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

-------------------------------------------------

When I load a Xamarin project I can see the status bar on the bottom of VStudio showing : 'Mac agent build 4.3.0.598 started', 'Successfully connected to the Mac!'

When I build the solution I get a one of these for each iOS specific project: 'Unable to start Build 4.3.0.664 agent'

-------------------------------------------------

This looks like a simple agent version mismatch.

I thought maybe I just needed to update the Xamarin Studio on the Mac but when I try it says I have the latest version.
Comment 5 ScottRFrost 2017-02-08 16:08:24 UTC
I'm blocked on this same issue.  Fully up to date Mac (alpha channel) as well as up to date VS 2017 RC.  I get a little tray icon saying updates are available, but clicking it doesn't do anything.

VS Xamarin: 10.4.0.102

Mac Xamarin.iOS: 10.4.0.114

Error I'm getting: Unable to start Build 4.3.0.664 agent.	

My Visual Studio 2017 RC version info at time bug reported: https://gist.github.com/ScottRFrost/a2b2c533fe648c103d21499b8e557736

Related Xamarin Forum discussion: https://forums.xamarin.com/discussion/87983/problems-updating-in-vs-2017-rc#latest
Comment 6 ScottRFrost 2017-02-08 16:10:51 UTC
Forgot to mention, but I've already tried completely removing Xamarin in Visual Studio Installer, letting it run, then adding it back in.  That left me with the same version.
Comment 7 vga 2017-02-08 18:07:36 UTC
We are currently investigating this issue. It appears to be an update issue where Willow is not removing one of the old folders.

You can workaround this by deleting the following folders:

Delete this folder:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\Xamarin

Delete this folder:
C:\Users\[UserAlias]\AppData\Local\Microsoft\VisualStudio\15.0_3bcaeaa8 (this hash needs to correspond to the instance of VS 2017 you are using)

After deleting this two folders, you should start VS 2017 and building iOS apps should work.

Please let me know if this worked for you.

thanks,
-VGA.
Comment 8 ScottRFrost 2017-02-08 18:47:13 UTC
This workaround caused the Visual Studio first run dialog to appear (as expected).    Other than that, it seems to have resolved the issue.  I'm able to rebuild all and debug (which fires up the emulator on my Mac) afterwards.
Comment 9 Brian Berry 2017-02-08 23:03:37 UTC
The same workaround results in an inability to connect to my was-functioning-before macOS agent.  Spinney progress wheel, no connection.

Was there supposed to be a release (macOS-side) of anything to match the latest VS2017RC update that just landed?
Comment 10 Brian Berry 2017-02-08 23:16:30 UTC
You can ignore my last.  Through deletion of the original remote host reference, restarting VS, re-adding it, restarting VS, (much hand waving?), it eventually came to its senses.

I can confirm the workaround allows at least one remote iOS build to succeed.
Comment 11 Mark West 2017-02-09 15:49:12 UTC
The workaround did not work for me at all. My original problem still exists.
Comment 12 Daniel Cazzulino 2017-02-09 17:57:29 UTC
@Mark this message:

> 'Mac agent build 4.3.0.598 started', 'Successfully connected to the Mac!'

Is very much the root cause. You have two versions of Xamarin, one left by a previous install that didn't uninstall properly.
Comment 13 Jerome Laban 2017-02-13 19:43:25 UTC
I've tried the few possible solutions here, none do fix the issue. I have installed the exact same versions specified for windows https://bugzilla.xamarin.com/show_bug.cgi?id=52320#c0. My Mac agent is 10.4.0.114.

Is there another possible workaround ?
Comment 14 micke 2017-02-13 21:32:40 UTC
I had the same problem, VS2017 and all latest updates on both sides (beta channel on mac though). Got the same build agent problem. Workaround fixed the problem. Thanks!
Comment 15 Jerome Laban 2017-02-20 13:48:43 UTC
I finally managed to apply the workaround, I originally renamed in-place the folder just in case I had to revert, but VS seems to scan the "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions" folder regardless of the sub folders names.

The invalid "Xamarin" folder must not be present at all.

I can debug now.
Comment 18 Jose Gallardo 2017-03-21 15:01:45 UTC
This issue was caused by an incomplete update, making the build client to not match the build agent.
The workaround is to **uninstall** the Xamarin workload from VS2017, and install it again.

The issue is already fixed targeting 15.1, and in VS 2017 RTW.

Thanks.