Bug 44240 - IDB Agent won't start if Xamarin Studio on the Mac does not point to a valid iOS SDK.
Summary: IDB Agent won't start if Xamarin Studio on the Mac does not point to a valid ...
Status: RESOLVED DUPLICATE of bug 44071
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 4.2.0 (C8)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-09-13 00:07 UTC by Jon Goldberger [MSFT]
Modified: 2016-09-13 16:16 UTC (History)
4 users (show)

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

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 DUPLICATE of bug 44071

Description Jon Goldberger [MSFT] 2016-09-13 00:07:44 UTC
## Description

If the app preferences for Xamarin Studio on the Mac do not have a path to a valid iOS SDK (in Xamarin Studio->Preferences->Projects->SDK Locations->Apple) then the IDB agent won't start when an iOS project is loaded into Visual Studio. NOte that the Apple SDK Location is set properly in Visual Studio -> Tools->Options->Xamarin->iOS Settings.

So the issue here is:
It seems counter intuitive that connecting to the Mac should depend on preference settings in Xamarin Studio on the Mac, especially when the same setting is correct in Visual Studio. 
A better error message could be displayed. IN the build server IDB logs, the error message is: 
> Xamarin.MacDev.HostingException: This library only works with Xcode 7 or newer.

Which did lead to finding the issue that no SDK at all was specified in XS Mac, however this error was not displayed in the Xamarin output window in Visual Studio, just got a message that the IDB agent did not respond in a timely manner. 

> An error occured starting the IDB 4.2.0.675 agent: The IDB Agent initialization exceeded the timeout of 60000 millisecs without receiving confirmation from the Agent.

>The Xamarin Mac Agent could not be fully started. Agents not started: IDB 4.2.0.675. Please check the logs for more details.
Connected to the Mac Jons-MacBook-Pro.local (10.211.55.2) with Limited support.

## Steps to reproduce

1. Open Xamarin Studio on the Mac.

2. Open the Preferences->Projects->SDK Locations->Apple settings page.

3. Set the path for the SDK to a path that does not have the iOS SDK (e.g. /Applications/SomeNonExistentFolder/XCode.app ). Should get a message that no SDK was found at that location. 

4. Open Visual Studio and create a new iOS Single View app.

5. Watch the Xamarin output window. 

Expected result: All agents will start and VS will be fully connect to the Mac build host.

Actual result: IDB agent does not start thus only getting limited support for the VS-Mac connection. 

## Notes

It would seem like a good idea for the IDB agent to get the iOS SDK path from Visual Studio rather than Xamarin Studiom, and also to improve the error messaging that there is no iOS SDK at the path specified, along with where the path should be specified. IOW if there is no way to pass the path from the VS->Tools->Options->Xamarin->iOS Settings page then the error message should say to set that path in the Xamarin Studio preferences. 


##Environment

Windows:
Microsoft Visual Studio Enterprise 2015
Version 14.0.25425.01 Update 3
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Enterprise

Architecture and Modeling Tools   00322-80000-00000-AA208
Microsoft Architecture and Modeling Tools
    
UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

Visual Basic 2015   00322-80000-00000-AA208
Microsoft Visual Basic 2015

Visual C# 2015   00322-80000-00000-AA208
Microsoft Visual C# 2015

Visual C++ 2015   00322-80000-00000-AA208
Microsoft Visual C++ 2015

Visual F# 2015   00322-80000-00000-AA208
Microsoft Visual F# 2015

Windows Phone SDK 8.0 - ENU   00322-80000-00000-AA208
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   7.6.00907.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015 (RC1 Update 1)   14.1.20203.0
ASP.NET and Web Tools 2015 (RC1 Update 1)

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Azure App Service Tools v2.9   14.0.20316.0
Azure App Service Tools v2.9

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.0.6000.0
Microsoft Azure Data Lake Tools for Visual Studio

Command Bus, Event Stream and Async Manager   Merq
Provides ICommandBus, IEventStream and IAsyncManager MEF services for loosely coupled Visual Studio extension components communication and integration.

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

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

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

Microsoft Azure HDInsight HQL Service   2.0.6000.0
Language service for Hive query

Microsoft Azure HDInsight Tools for Visual Studio   2.0.6000.0
An integrated development environment for HDInsight application development.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.9.40323.3

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

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.60519.0
Microsoft SQL Server Data Tools

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript   1.8.36.0
TypeScript tools for Visual Studio

Visual Studio Tools for Universal Windows Apps   14.0.25527.01
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.

Xamarin   4.2.0.675 (c54ec37)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   7.0.0.15 (f4db8a5)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   10.0.0.4 (d1ee3ba)
Visual Studio extension to enable development for Xamarin.iOS.

Mac:
=== Xamarin Studio Enterprise ===

Version 6.1 (build 5436)
Installation UUID: ceaba76c-db06-4fbd-b326-f69ea53c3e01
Runtime:
	Mono 4.6.0 (mono-4.6.0-branch/dea2155) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 406000243

=== NuGet ===

Version: 3.4.3.0

=== Xamarin.Profiler ===

Version: 0.33.1
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Not Found

=== Xamarin.iOS ===

Version: 10.0.0.4 (Visual Studio Enterprise)
Hash: d1ee3ba
Branch: xcode8
Build date: 2016-09-08 02:32:05-0400

=== Xamarin.Android ===

Version: 7.0.0.15 (Visual Studio Enterprise)
Android SDK: /Users/jongoldberger/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
		5.0   (API level 21)
		5.1   (API level 22)
		6.0   (API level 23)

SDK Tools Version: 25.1.7
SDK Platform Tools Version: 23.1
SDK Build Tools Version: 24.0.2

Java SDK: /usr
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.10.0.99 (Visual Studio Enterprise)

=== Xamarin Inspector ===

Version: 0.8.0.0
Hash: dc081aa
Branch: master
Build date: Tue Apr 26 23:07:44 UTC 2016

=== Build Information ===

Release ID: 601005436
Git revision: bc95b7878139d0971a3c55b5b9c4d604d9c6c6ec
Build date: 2016-09-07 16:44:19-04
Xamarin addins: bfc56f206c39fbf5929651ec42c98ab6aa5e8150
Build lane: monodevelop-lion-cycle8

=== Operating System ===

Mac OS X 10.11.6
Darwin Jons-MacBook-Pro.local 15.6.0 Darwin Kernel Version 15.6.0
    Mon Aug 29 20:21:34 PDT 2016
    root:xnu-3248.60.11~1/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

Xamarin Inspector 0.8.0.0
Comment 1 Jon Goldberger [MSFT] 2016-09-13 00:30:17 UTC
## Regression Status

This would appear to be a regression. I tested using the current stable versions (info below) and in this case I got a somewhat better error message on the Visual Studio side in the Xamarin Output window and the IDB agent did actually start, but error message below was displayed:

>Starting Agent IDB 4.1.2.18...
>Agent IDB 4.1.2.18 is running
>Xcode is not installed. Please install Xcode and try to reconnect to Xamarin Mac Agent server.

However note that this is still somewhat counter intuitive because if you check the iOS SDK location in Visual Studio, and the SDK location filed is blank, the use will note that the iOS SDK should be located at /Applications/XCode.app on the Mac, and XCode is at that location, and it is only because the iOS SDK location is not set correctly in Xamarin Studio on the Mac that you get the above error. 


## Environment (current stable)

Windows:
Microsoft Visual Studio Enterprise 2015
Version 14.0.25425.01 Update 3
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Enterprise

Architecture and Modeling Tools   00322-80000-00000-AA208
Microsoft Architecture and Modeling Tools
    
UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

Visual Basic 2015   00322-80000-00000-AA208
Microsoft Visual Basic 2015

Visual C# 2015   00322-80000-00000-AA208
Microsoft Visual C# 2015

Visual C++ 2015   00322-80000-00000-AA208
Microsoft Visual C++ 2015

Visual F# 2015   00322-80000-00000-AA208
Microsoft Visual F# 2015

Windows Phone SDK 8.0 - ENU   00322-80000-00000-AA208
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   7.6.00907.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015 (RC1 Update 1)   14.1.20203.0
ASP.NET and Web Tools 2015 (RC1 Update 1)

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Azure App Service Tools v2.9   14.0.20316.0
Azure App Service Tools v2.9

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.0.6000.0
Microsoft Azure Data Lake Tools for Visual Studio

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

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

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

Microsoft Azure HDInsight HQL Service   2.0.6000.0
Language service for Hive query

Microsoft Azure HDInsight Tools for Visual Studio   2.0.6000.0
An integrated development environment for HDInsight application development.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.9.40323.3

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

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.60519.0
Microsoft SQL Server Data Tools

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript   1.8.36.0
TypeScript tools for Visual Studio

Visual Studio Tools for Universal Windows Apps   14.0.25527.01
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.

Xamarin   4.1.2.18 (fcbe082)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   6.1.2.21 (1cf254d)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   9.8.2.22 (f37444a)
Visual Studio extension to enable development for Xamarin.iOS.


Mac:

=== Xamarin Studio Enterprise ===

Version 6.0.2 (build 73)
Installation UUID: ceaba76c-db06-4fbd-b326-f69ea53c3e01
Runtime:
	Mono 4.4.2 (mono-4.4.0-branch-c7sr1/f72fe45) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 404020011

=== Xamarin.Profiler ===

Version: 0.33.1
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Not Found

=== Xamarin.Mac ===

Version: 2.8.2.22 (Visual Studio Enterprise)

=== Xamarin.Android ===

Version: 6.1.2.21 (Visual Studio Enterprise)
Android SDK: /Users/jongoldberger/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
		5.0   (API level 21)
		5.1   (API level 22)
		6.0   (API level 23)

SDK Tools Version: 25.1.7
SDK Platform Tools Version: 23.1
SDK Build Tools Version: 24.0.2

Java SDK: /usr
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin.iOS ===

Version: 9.8.2.22 (Visual Studio Enterprise)
Hash: f37444a
Branch: cycle7-sr1
Build date: 2016-07-28 12:17:02-0400

=== Xamarin Inspector ===

Version: 0.8.0.0
Hash: dc081aa
Branch: master
Build date: Tue Apr 26 23:07:44 UTC 2016

=== Build Information ===

Release ID: 600020073
Git revision: a6f7a24a9723a2d4f5d33c176615b0d44703ab5b
Build date: 2016-07-26 13:36:15-04
Xamarin addins: f5acb37866a0141bc5ddbe95118f18dae4014568
Build lane: monodevelop-lion-cycle7-sr1

=== Operating System ===

Mac OS X 10.11.6
Darwin Jons-MacBook-Pro.local 15.6.0 Darwin Kernel Version 15.6.0
    Mon Aug 29 20:21:34 PDT 2016
    root:xnu-3248.60.11~1/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

Xamarin Inspector 0.8.0.0
Comment 2 Ben Beckley 2016-09-13 16:16:15 UTC

*** This bug has been marked as a duplicate of bug 44071 ***