Bug 14794 - Could not parse the command line arguments: Cannot bundle unregistered option --'
Summary: Could not parse the command line arguments: Cannot bundle unregistered option...
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: 7.0.4.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Future Cycle (TBD)
Assignee: Bugzilla
Depends on:
Reported: 2013-09-17 02:33 UTC by Pierce Boggan [MSFT]
Modified: 2013-12-23 13:00 UTC (History)
6 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 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.

Related Links:

Description Pierce Boggan [MSFT] 2013-09-17 02:33:45 UTC

Comment 1 Pierce Boggan [MSFT] 2013-09-17 02:34:53 UTC
Description of Issue: only happens for "Debug" builds, not "Release". I currently have no command-line arguments for my project.

Version Information:
=== Xamarin Studio ===

Version 4.1.11 (build 10)
Installation UUID: f93f5508-9e3f-4a10-a8c0-2392f406bcce
	Mono 3.2.2 ((no/a0fc6ba)
	GTK+ 2.24.20 theme: Raleigh
	GTK# (
	Package version: 302020000

=== Apple Developer Tools ===

Xcode 4.6.3 (2068)
Build 4H1503

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: 1336a36
Build date: 2013-10-09 11:14:45-0400

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Xamarin.Android ===

Version: 4.8.2 (Business Edition)
Android SDK: /Users/pierce/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0   (API level 14)
		4.0.3 (API level 15)
Java SDK: /usr
java version "1.6.0_51"
Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-11M4509)
Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01-457, mixed mode)

=== Build Information ===

Release ID: 401110010
Git revision: 6df7ab667918ee55a75f1adc93d53e3c9db392ae
Build date: 2013-09-14 00:09:49+0000
Xamarin addins: 7b3a1cd0b47c2a7b4530aaa2cc5e0077ee1001db

=== Operating System ===

Mac OS X 10.8.4
Darwin Pierce-Boggans-MacBook-Pro.local 12.4.0 Darwin Kernel Version 12.4.0
    Wed May  1 17:57:12 PDT 2013
    root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64
Comment 2 Pierce Boggan [MSFT] 2013-09-17 02:38:32 UTC
After some exploration, I figured out that -v -v -v was added as an argument (when I looked at the text representation of the .csproj), which wasn't showing in the IDE. I removed the code in the MtouchExtraArgs tag and now this works. Still seems like a bug is somewhere in there though!
Comment 3 Sebastien Pouliot 2013-09-17 08:14:12 UTC
Please attach your .csproj (or the whole project).
Comment 5 Sebastien Pouliot 2013-12-03 16:06:04 UTC
That's because "-v-v-v"* was added to the "Additional mtouch arguments".

I'll look why it's was reported as:

> Cannot bundle unregistered option '--'.

but the workaround is easy: remove the verbosity flags (or add a space between them).

* note the lack of spaces between options
Comment 6 Sebastien Pouliot 2013-12-05 16:37:29 UTC
Issue was in Options.cs and was fixed (by JonP) in mono/master a699e7444e8ff4426197d4bd3a9607d204ee7b0f

monotouch/master bumped in 097e4b4376c7e24c6c324893f75db7047a00bf0c
Comment 7 PJ 2013-12-11 18:45:48 UTC
This fix is planned to be released with Xamarin.iOS 7.0.6, which should hit the beta channel before December 23rd.
Comment 8 narayanp 2013-12-23 06:23:27 UTC
I have checked this issue with following builds:

All Mac
X.S 4.2.3(build 23)
Mono 3.2.6
X.iOS 7.0.6-166

I am still getting same error when having '-v-v-v' in "Additional mtouch arguments". This is the build output: https://gist.github.com/atin360/479e40dd3e915ad4edae

Hence, Reopening this issue,
Comment 9 Sebastien Pouliot 2013-12-23 13:00:53 UTC
You did not read the bug report carefully. An option like "-v-v-v" is _invalid_. The bug was that we reported back this error message:

> Cannot bundle unregistered option '--'.

which did not show the invalid option used (making it hard to identify/fix). Now the new error message is:

error MT0010: Could not parse the command line arguments: Cannot use unregistered option '-' in bundle '-v-v-v'.

and that's fine because it identify the option that could not be parsed.