Click to See Complete Forum and Search --> : Type is not defined


DynamicArray
06-01-2006, 05:12 AM
Hi, I've been struggling with this problem for 3 days now - I'm sure its really straightforward to fix but I can't find any help on it.

The general structure is:
Solution a
- Web Project b
- Class Library c
- Class Library d

I had a working project in ASP.NET 1.1 and VS 2003. I converted it (using the conversion wizard) to ASP.NET 2.0 and V2 2005. I fixed all the errors and warnings I could, then compiled each project within the solution - each eventually compiled fine apart from the main web project.

Several .ascx.vb pages are coming up with compilation errors saying that Type 'tableTop' is not defined (this happens for a few other classes too) .

TableTop is a user control within the same namespace, and the same project, as the ascx.vb control trying to access it, yet the namespace (when using class browser and intellisense) only contains the classes from Class Libraries c and d; none of the controls in b are there.

This is all in the same project, and the same namespace, so it can't be related to dlls, and I haven't managed to compile it fully yet so it can't create the dll for the web app in the first place (or can it?)!

If you have any suggestions or need to see code, please help!

Thanks

DynamicArray
06-01-2006, 08:57 AM
I think I've fixed this myself - I downloaded the following two upgrades to VS 2005:
Microsoft Visual Studio 2005 - Update to Support Web Application Projects (http://www.microsoft.com/downloads/details.aspx?FamilyId=8B05EE00-9554-4733-8725-3CA89DD9BFCA&displaylang=en)
Visual Studio 2005 Web Application Projects (http://msdn.microsoft.com/asp.net/reference/infrastructure/wap/default.aspx)
and converted my Web Project to be a Web Application Project.

I then simply added my code library's namespaces into the project (open the new My Project folder) and it all seems much happier.

Easy when you know how... ;)