Hello all,

For my own curiousity, I tried to compile the ASP.NET MVC 1.0 source
code on Mono 2.4.3 (Ubuntu 9.10 x64).  When I do so under either
MonoDevelop or xbuild, I get this error message:

Mvc/FormCollection.cs(24,6):   error CS0246:  The type or namespace
name `FormCollectionBinder' could not be found. Are you missing a
using directive or an assembly reference?

Now, FormCollectionBinder is an attribute that adorns the class
System.Web.MVC.FormCollection.  The declaration of
FormCollectionBinderAttribute is a private sealed class inside of
FormCollection.  If I move the code for this attribute outside of the
class declaration for FormCollection and then try to compile, there
seems to be no problems.

Could this be a bug with the compiler?  A simpler case is this:

using System;

namespace Test
{
        [MyAttribute]
        public class MyClass
        {       
                private sealed class MyAttribute: Attribute
                {
                        
                }
                public void MyMethod()
                {
                        Console.WriteLine("Hello World!");
                }
        }
}

I could not get this to compile on Mono 2.4.3.  Or, is there something
special one must do to get this to compile?


-- 
http://www.opgenorth.net
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to