0
votes

I've inherited a VB.Net ASP.Net Website (not a Web Application) of questionable lineage.

While editing in Visual Studio: when a class ('App_Code\EditClass.vb') that lives in App_Code references a class ('App_Code\RefClass.vb') that also lives in App_Code, Visual Studio marks the class reference with a blue squiggle and error: Name 'RefClass' is not declared.

Intellisense is also not working on these references.

I have hundreds of these errors from the classes that live in App_Code. However, everything compiles just fine, and works.

If RefClass is referenced in a normal webpage code behind page (webpage.aspx.vb), I don't get the blue squiggle or the error, but Intellisense doesn't work on the class.

How do I get rid of these phantom errors, and get Intellisense working?

1

1 Answers

0
votes

It looks like the problem is the directory structure. The website is in C:\Site.com\Httpdocs, with all the normal ASP.Net directories under this. So, App_Code was at C:\Site.com\Httpdocs\App_Code.

As the website was opened in VS at C:\Site.com, the extra level down to App_Code was confusing it.

Changing the VS 'Open Website' to C:\Site.com\Httpdocs fixed the problem.

Ah, the joys of inheritance...