Bug 389 - __MonoCS__ sections get highlighted erroneously
Summary: __MonoCS__ sections get highlighted erroneously
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Project Model ()
Version: 2.6 RC 1
Hardware: PC Mac OS
: Lowest trivial
Target Milestone: ---
Assignee: Lluis Sanchez
URL:
Depends on:
Blocks:
 
Reported: 2011-08-24 21:35 UTC by Vittorio G.
Modified: 2012-03-30 03:13 UTC (History)
4 users (show)

Tags:
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:
Status:
RESOLVED FIXED

Description Vittorio G. 2011-08-24 21:35:00 UTC
hi, mono defines a preprocessor symbol called __MonoCS__ and it is quite useful for conditional compilation

However i noticed that monodevelop hightlights the section as if it was commented out (electric blue by default), while it is actually included.

Would it be possible to fix it in 2.6?
Comment 1 Mikayla Hutchinson [MSFT] 2011-08-25 07:43:22 UTC
In general we would advise against the use of that define, since many people don't realize it only tells you whether your app was *compiled* with Mono, not whether it's *running* on Mono. Since assemblies can be compiled with .NET and run on Mono, and vice versa, runtime detection is generally better.
Comment 2 Mike Krüger 2012-03-30 03:13:09 UTC
I've thought about supporting that or not, but at the end I decided to support that - because it's there.

It's not up to me to decide, if people should use that :) - I would suggest doing that with a special configuration btw.