I just converted UberSite
, a vb.net web site to a web application. I get run-time e开发者_如何学JAVArrors 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?
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()
{
}
}
}
精彩评论