Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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 or GitHub 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.
When I'm trying to build an Ad-Hoc version of my app, this error occurs :
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(747,3): warning MSB6002: The command-line for the "MTouch" task is too long. Command-lines longer than 32000 characters are likely to fail. Try reducing the length of the command-line by breaking down the call to "MTouch" into multiple calls with fewer parameters per call.
Visual Studio Community 2017 for Mac
Version 7.0 (build 3146)
Installation UUID: d614f455-2845-46f7-ab92-84e2ec5972e5
Mono 22.214.171.124 (2017-02/9667aa6) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Package version: 500000100
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.0.0/lib/mono/msbuild/15.0/bin/Sdks
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
Version: 126.96.36.199 (Visual Studio Community)
Android SDK: /Users/etlinfo/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
6.0 (API level 23)
SDK Tools Version: 25.1.2
SDK Platform Tools Version: 24.0.0
SDK Build Tools Version: 23.0.2
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
Android Designer EPL code available here:
Apple Developer Tools
Xcode 8.2.1 (11766.1)
Version: 188.8.131.52 (Visual Studio Community)
Build date: Fri, 21 Apr 2017 17:57:12 GMT
Version: 10.10.0.33 (Visual Studio Community)
Build date: 2017-05-05 18:11:38-0400
Release ID: 700003146
Git revision: 7553fda2e327d15807298d444007896e5b975dba
Build date: 2017-05-09 12:12:36-04
Xamarin addins: c3d580752be79fc902422f1d55d1cdc2d8b98799
Build lane: monodevelop-lion-d15-2
Mac OS X 10.11.6
Darwin 15.6.0 Darwin Kernel Version 15.6.0
Mon Jan 9 23:07:29 PST 2017
Created attachment 22205 [details]
I can confirm this bug from the logs, seems legit.
I believe the msbuild tasks could be updated to break down the command as suggested when it becomes too long (cc @rolf in case he sees something else):
"warning MSB6002: The command-line for the "MTouch" task is too long. Command-lines longer than 32000 characters are likely to fail. Try reducing the length of the command-line by breaking down the call to "MTouch" into multiple calls with fewer parameters per call."
@Frank, the warning is not related to the following mtouch 2001 error. The latter is a XF/xamlc issue -> https://bugzilla.xamarin.com/show_bug.cgi?id=56296
It's also a generic warning (from msbuild). The mtouch tool cannot be called multiple times to achieve the same result.
The command line limit on macOS is ~250k ("getconf ARG_MAX" => 262144 bytes), so this warning can safely be ignored for now.
The fix is to support response-files in mtouch:
echo "-r:abc.dll" > foo.rsp
and then have the msbuild tasks create that response file and pass it to mtouch instead of listing everything on the command line.
+1 a response file would be a great addition (and not just for the limit).
But it's content needs to be included part of the bug logs or we will lose important information to debug customers issues.
+1 for this, I'm getting it on my build system too
+1 for response files, I'm seeing this warning on the VSTS build agent. Currently my command line is about 47k
Step 1, support for response files, is in progress: https://github.com/xamarin/xamarin-macios/pull/2808
Step 1, support for response files, is now complete: https://github.com/xamarin/xamarin-macios/commit/e8d16c925bb74636366b00b5c6603514c94af763
Step 2, use a response file for references passed to mtouch is in progress:
Merged in https://github.com/xamarin/xamarin-macios/commit/97ef51bf8b3a0d3b5e16f62f9cfd579821db48ed