Bug 16689 - xamarin build host stuck in build state if mtouch fails
Summary: xamarin build host stuck in build state if mtouch fails
Status: RESOLVED DUPLICATE of bug 16066
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 1.8.x
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: 1.12 (Merge)
Assignee: Dominique Louis
URL:
Depends on:
Blocks:
 
Reported: 2013-12-10 03:04 UTC by softlion
Modified: 2014-01-22 09:11 UTC (History)
9 users (show)

Tags: error improvement
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:
Status:
RESOLVED DUPLICATE of bug 16066

Description softlion 2013-12-10 03:04:19 UTC
On build host side:

[10-déc.-2013 08:52:30] Starting /Developer/MonoTouch/usr/bin/mtouch -v -sdkroot "/Applications/Xcode.app/Contents/Developer" --cache "/Users/iben/Library/Caches/Xamarin/mtbs/builds/HelloWorld1/79bff343-ce97-4f92-af6f-351f4cd8b877/output/temp/mtouch-cache" --nomanifest --nosign -dev "/Users/iben/Library/Caches/Xamarin/mtbs/builds/HelloWorld1/79bff343-ce97-4f92-af6f-351f4cd8b877/output/Debug/iPhone/HelloWorld1.app" -r "/Users/iben/Library/Caches/Xamarin/mtbs/builds/HelloWorld1/79bff343-ce97-4f92-af6f-351f4cd8b877/assemblies/Newtonsoft.Json.dll" -debug -linksdkonly -sdk "7.0" -targetver "6.1" --abi=armv7 "/Users/iben/Library/Caches/Xamarin/mtbs/builds/HelloWorld1/79bff343-ce97-4f92-af6f-351f4cd8b877/assemblies/HelloWorld1.exe"
[10-déc.-2013 08:52:31] Command [Build: CommmandUrl=Build] finished (46)

Os vs side:

3>System.InvalidOperationException: The operation cannot be completed because a build is already in progress.
3>   at Microsoft.Build.Shared.ErrorUtilities.ThrowInvalidOperation(String resourceName, Object[] args)
3>   at Microsoft.Build.Execution.BuildManager.BeginBuild(BuildParameters parameters)
3>   at Microsoft.Build.Execution.BuildManager.Build(BuildParameters parameters, BuildRequestData requestData)
3>   at Mono.IOS.VisualStudio.MonoTouchDeploySession.RemoteBuild(VSBuildServerClient server, Project project, IVsOutputWindowPane outputPane, MonoTouchProgressNotifier notifier)========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

To reproduce:

- create a hello world app in vs2012
- add nuget package Newtonsoft.json
- add this code in constructor: 
using Newtonsoft.Json;
var o = new JsonSerializer();

Build, rebuild, rebuild, rebuild util it fails.
You'll also remark that the build details are not available in VS or in mtbserver.log
The only way to see the error message is to copy and run the mtouch command line into a terminal
You should see error MT2002: Failed to resolve assembly: 'System.Dynamic.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
Comment 1 softlion 2013-12-10 03:09:58 UTC
note: duplicate of https://bugzilla.xamarin.com/show_bug.cgi?id=16066

You should still take the "only way to see the error message" part of my message, as this information is very important to understand what is happening.
Comment 2 softlion 2013-12-10 17:05:51 UTC
Additional info: to fix the problem with System.Dynamic.Runtime, replace the newtonsoft.json reference in the project file so it uses net40 instead of  net45. This is a "bug" in their nuget package configuration which does not know how to target xamarin.* projects.
Comment 3 Marek Habersack 2014-01-22 09:11:05 UTC

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