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
GitHub or Developer Community 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.
I have this code which works perfectly everywhere else:
#pragma warning disable
if (ID == null)
Core.DebugLog("Invalid key for window: " + ID);
Info info = WindowInfo[ID];
info.X = this.Left;
info.Y = this.Top;
info.Width = this.Width;
info.Height = this.Height;
#pragma warning enable
but after I upgraded mono on my system (this happens now both on debian as well as ubuntu) I am getting errors from xbuild like this:
XBuild Engine Version 12.0
Mono, Version 126.96.36.199
Copyright (C) 2005-2013 Various Mono authors
GTK/PidgeonForm.cs(242,12): error CS1525: Unexpected symbol `catch'
GTK/PidgeonForm.cs(242,29): error CS1525: Unexpected symbol `fail'
GTK/PidgeonForm.cs(242,33): error CS1525: Unexpected symbol `)'
GTK/PidgeonForm.cs(248,8): error CS1524: Unexpected symbol `private', expecting `catch' or `finally'
GTK/PidgeonForm.cs(248,34): error CS1525: Unexpected symbol `(', expecting `catch' or `finally'
GTK/PidgeonForm.cs(250,27): error CS1525: Unexpected symbol `null', expecting `catch' or `finally'
removal of #pragma lines apparently fix the problem, but it should work, it does in visual studio and older xbuild / mono for sure
This is kind of expected.
"#pragma warning enable" is wrong syntax. You need to use #pragma warning restore.
Recent versions give better error message