views:

18

answers:

1

I just converted UberSite, a vb.net web site to a web application. I get run-time errors saying that there is no such thing as type foo. When I drill down to the page in the code-view, it gives me an error-correction suggestion: import namespace UberSite.

If I create a new web application and define foo there, there is no need to import any namespace to use foo in the new application.

How can this be? Why does my web application seemingly need to import its own namespace?

A: 

Did you look at the namespace that is defined in your foo class? It could be that it falls into a different namespace than your web application project, even though the class is included as part of that project in VS. For example:

namespace MySuperCoolNameSpace.Lib
{
    public class Foo
    {
        public Foo()
        {
        }
    }
}
Robot
It's not that... There are no namespace declarations within the project. It's just `public class Foo`. And it is vb, if that makes any difference.
Rice Flour Cookies
Sorry about the C# code...Does Foo conflict with a .NET framework class? That's about the only thing I can think of.
Robot
No, there is no such conflict. It worked fine in a prior version, which was a web application with no project file.
Rice Flour Cookies