Bug 3391 - Checking Emit Debugging Information in the compiler settings causes a CS1902 error due to a /debug:+ argument
Summary: Checking Emit Debugging Information in the compiler settings causes a CS1902 ...
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: 2.8.6
Hardware: PC Linux
: --- critical
Target Milestone: ---
Assignee: Mike Krüger
Depends on:
Reported: 2012-02-10 16:09 UTC by David Ferguson
Modified: 2012-02-13 01:40 UTC (History)
2 users (show)

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

fix (588 bytes, patch)
2012-02-12 23:15 UTC, Atsushi Eno

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 David Ferguson 2012-02-10 16:09:36 UTC
Build error from blank test project:
error CS1902: Invalid debug option `+'. Valid options are `full' or `pdbonly'

When using MD 2.8.6 and the latest (master) of mono, the compiler will throw a CS1902 error when compiling a project set to emit debugging information.

A /debug:+ argument is passed to the compiler, causing this error.  The proper /debug:full is also passed.

Here's an example of a portion of the arguments to dmcs:
/nologo /warn:4 /debug:+ /debug:full /optimize-

In addition, if I enable xbuild integration, this problem goes away. (I had to restart MD to get the xbuild integration to take effect).

$: mono --version
Mono JIT compiler version 2.11 (master/88fde5a Fri Feb 10 12:54:18 EST 2012)
Copyright (C) 2002-2011 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug 
	LLVM:          supported, not enabled.
	GC:            Included Boehm (with typed GC and Parallel Mark)

I can replicate this problem by creating a brand new console C# project and compiling it in debug with no changes.
Comment 1 Atsushi Eno 2012-02-12 13:41:52 UTC
This prevents any projects being built on MonoDevelop at all.
Comment 2 Atsushi Eno 2012-02-12 23:15:00 UTC
Created attachment 1350 [details]
Comment 3 Mike Krüger 2012-02-13 01:40:49 UTC
Already fixed. I cherry-picked the fix to the master branch as well.