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
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.
Add a script with CDATA and <,> signs into an aspx page, for example:
<%@ Page Language="C#" Inherits="aspbug.Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script><![CDATA[ > <test ]]></script>
<form id="form1" runat="server">
<asp:Button id="button1" runat="server" Text="Click me!" OnClick="button1Clicked" />
The editor will underline the </script> and complain that
"Parser Error: Closing tag 'script' does not match opening tag 'test'."
Similarly, trying to compile the project gives a warning:
Default.aspx(31,31): Warning: Parser failed with error Closing tag 'script' does not match opening tag 'test'.. CodeBehind members for this file will not be added.
I believe the problem is in monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser.Internal/AspParser.cs.
Apparently the parser in MonoDevelop.AspNet.StateEngine is also broken, not sure what uses that, though.
The parse in MonoDevelop.AspNet.StateEngine is used for code completion and the indenter. This is the "new" parser.
MonoDevelop.AspNet.Parser.Internal/AspParser.cs is the old ASP.NET parser that was imported from Mono several years ago. It's used for folding, the document outline, and codebehind generation.
There is a pull request at https://github.com/mono/monodevelop/pull/223 to replace the old parser with the new one.
Thanks for the info. I have quickly tried that pull request, but the parser in that is also broken. For the above example it produces:
Default.aspx(1,1): Warning: Parser failed with error Unexpected '<' in unnamed tag.. CodeBehind members for this file will not be added.
It's highlighting the </head> tag on line 7 (notice the message says line 1 though).
Unable to reproduce this in Xamarin Studio 5.9 so it seems to have been fixed at some point.