Can't include class in project

Last post 03-16-2006 2:52 AM by GoranPersson. 0 replies.

Sort Posts:

  • Can't include class in project

    03-16-2006, 2:52 AM
    • Member
      282 point Member
    • GoranPersson
    • Member since 09-12-2003, 12:57 AM
    • Posts 109

    I can't include classes in ASP.NET projects.

    I put the class 'MyClass' with the namespace 'mynamespace' in the App_Code folder which is suggested by Visual Studio.

    In Default.aspx a have 'using mynamespace;'. Visual Studio makes some sort of connection because when a write MyClass and hits dot I see all classes in the dropdown help box.

    There's no problem building the project but when a browse to the web site a get:

    Compiler Error Message: CS0246: The type or namespace name 'mynamespace' could not be found (are you missing a using directive or an assembly reference?)

    I also tried "Add existing  item..." and choosing 'MyClass' but it didn't help either.

    Please, help me.

Page 1 of 1 (1 items)