Bug 30645 - SayHello Should Return an Error On Failure to Connect and Halt the Build
Summary: SayHello Should Return an Error On Failure to Connect and Halt the Build
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 3.11 (C5)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-06-01 16:54 UTC by Ace Olszowka
Modified: 2016-05-11 18:05 UTC (History)
5 users (show)

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

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:

Description Ace Olszowka 2015-06-01 16:54:11 UTC
From https://forums.xamarin.com/discussion/42583/bug-sayhello-should-return-an-error-on-failure-to-connect-and-halt-the-build

When attempting to build an iOS Project, using the Remote Build Agent, building via MSBuild, and calling the "Clean" target you can intermittently encounter the following error:

      Opening control connection
      Build server control connection failed
      Another instance is using the server at x.x.x.x
      Fail to resolve address

The error is straight forward and correct; someone else is connected to the server (most likely you've forgotten and left a Visual Studio instance open on the local box). This is a good error message; however it does not halt execution of the build. Therefore when attempting to perform a clean it continues on its merry way as if nothing happened. This will usually expose itself in "producing" a binary that is in fact stale. We consider this behavior a bug as the "Clean" task is documented and expected to clean any previous build output/intermediates (https://msdn.microsoft.com/en-us/library/ms171480.aspx) the contents of the remote build server need to be cleaned as well (and are when this does not error).

Therefore we're requesting that the SayHello task be modified to return an error (IE the task itself returns false if it cannot connect) which should trigger the default MSBuild behavior to stop the build (https://msdn.microsoft.com/en-us/library/77f2hx1s.aspx that is unless ContinueOnError has been set to false, in which case you get what you asked for).
Comment 1 Adrian Alonso 2016-05-11 18:05:29 UTC
Fixed as part of the new Xamarin Mac Agent feature.