[Mono-list] compiler errors in XMLDoc

Steve Lessard s_lessard at yahoo.com
Tue Mar 15 01:03:26 EDT 2011


I have a fairly large Visual Studio project that compiles cleanly on .NET. I 
took this project and built it on Mono 2.10.1 with xbuild. Among the many 
compilation issues I encountered there were a few real surprises. There were two 
cases where the compiler said I had XMLDoc on an invalid item, but I disagree 
and so does the .NET compiler. In one case the XMLDoc comment was on a public 
enum. Since I couldn't figure out what the problem was I enclosed the XMLDoc 
comment in a /* ...  */ block comment. Another issue was on a private static 
string property getter. I worked sround that problem by changing the three 
slashes to two slashes.

The most surprising issue of all was that anywhere there was a comment like the 
one below the compiler report an error saying I had an XMLDoc comment on an 
invalid item.

                /************************************************************/
                /* Check for all pre-conditions                             */
                /************************************************************/

The workaround in this case was to change the comment to 

                /* ********************************************************** */
                /*  Check for all pre-conditions                              */
                /* ********************************************************** */

The comment doesn't start with three slashes. Why does the compiler think that's 
an XMLDoc comment? 


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20110314/383e56de/attachment.html 


More information about the Mono-list mailing list