Compiler Error Message: CS0138

  •  01-28-2009, 1:11 PM

    Compiler Error Message: CS0138

    I'm trying out the CuteEditor product for a .NET 2.0 application.  When I place the editor on a page, I get the following error message inside your editor:
     
    Compiler Error Message: CS0138: A using namespace directive can only be applied to namespaces; 'Robintek.Common'is a type not a namespace.
     
    Here's part of my web.config:
     
                <namespaces>
                    <clear/>
                    <add namespace="System"/>
                    <add namespace="System.Collections"/>
                    <add namespace="System.Collections.Specialized"/>
                    <add namespace="System.Configuration"/>
                    <add namespace="System.Text"/>
                    <add namespace="System.Text.RegularExpressions"/>
                    <add namespace="System.Web"/>
                    <add namespace="System.Web.Caching"/>
                    <add namespace="System.Web.SessionState"/>
                    <add namespace="System.Web.Security"/>
                    <add namespace="System.Web.Profile"/>
                    <add namespace="System.Web.UI"/>
                    <add namespace="System.Web.UI.WebControls"/>
                    <add namespace="System.Web.UI.WebControls.WebParts"/>
                    <add namespace="System.Web.UI.HtmlControls"/>
                    <add namespace="Robintek.Common"/>
                </namespaces>
     
    Here's part of my Robintek.Common namespace:
     
    Namespace Robintek
        Public Class Common
            Inherits Common_Application
     
    ...public shared functions etc...
     
        End Class

    End Namespace
     
    I understand that "common" is a class not a namespace, hence the error message.  What I don't understand is why this only errors inside your editor component and nowhere else in my application (and 20 other apps where I used the same technique).  I use this "Common" class for global functions used on nearly every page in my application.  It appears my only other option is to remove the line from web.config then add an Imports statement at the top of a hundred or so web pages.  Is there another option other than not buying your product? 
     
    Thanks!
     
     
     
     
     
     
     
View Complete Thread