Bug 685 - Code in #if block appears as comment
Summary: Code in #if block appears as comment
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: 2.6 RC 1
Hardware: Macintosh Mac OS
: --- minor
Target Milestone: ---
Assignee: Mike Krüger
Depends on:
Reported: 2011-09-09 11:41 UTC by Stephen Martin
Modified: 2011-09-13 05:48 UTC (History)
2 users (show)

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

screenshot of problem (163.00 KB, image/png)
2011-09-09 12:30 UTC, Stephen Martin

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 Stephen Martin 2011-09-09 11:41:59 UTC
Code contained in a #if / #endif block appears in the editor as a comment.  Sometimes, although not always, commenting the #if statement, and then immediately erasing the '//' will restore the code highlighting.  Upon closing MonoDevelop and restarting, the code highlighting is once again lost and must be restored using the "comment, erase comment" trick.
Comment 1 Mikayla Hutchinson [MSFT] 2011-09-09 12:07:09 UTC
This is by design, if the #if evaluates to false.
Comment 2 Stephen Martin 2011-09-09 12:21:35 UTC
It's happening even if the #if evaluates true.  

Commenting the #if and then immediately removing the comment corrects the behavior, but that needs to be done every time MonoDevelop is started.
Comment 3 Stephen Martin 2011-09-09 12:30:38 UTC
Created attachment 268 [details]
screenshot of problem

This is immediately after loading monodevelop with a saved solution.  Note the PIONEER flag is set in the compiler symbols, but the code in the #if block appears as a comment.
Comment 4 Mikayla Hutchinson [MSFT] 2011-09-09 12:38:20 UTC
Ok, thanks for confirming it's a bug.
Comment 5 Stephen Martin 2011-09-09 12:40:33 UTC
NP - thanks for putting out a truly fantastic product.
Comment 6 Mike Krüger 2011-09-13 05:48:08 UTC