Last post Oct 07, 2009 10:39 AM by ewgoforth
Oct 06, 2009 05:32 PM|ewgoforth|LINK
I'm getting a:
mypage.aspx.vb(390,0): error BC30002:Type 'MyNamespace.MyClass' is not defined \
when I try to compile, run, etc. my website.
What's really odd is that I don't have anything in my Error List before or after I do this. I wouldn't have an idea of what was wrong, except I have my compile verbosity turned way up.
The line it's failing on looks like:
Dim myObj As New MyNamespace.MyClass(intMyParm)
I have a project reference to the dll that MyNamespace.MyClass is in and it compiles just fine. The compile order has MyNamespace.MyClass before localhost. I've tried cleaning it and rebuilding several times.
If I click on MyClass in the above line and go to it's definition. It takes me to the
Public Class MyClass om the MyNamespace project. I have a constructor that takes the correct parm and if I delete "(intMyParm)" it shows me that the constructor is overloaded with one plain old
and one that takes my parameter. Everything looks right according to intellisense and going to the definition of MyNamespace and MyClass. MyNamespace is set in the Root namespace of of the vbproj file.
Any idea how to get this to compile?
Oct 07, 2009 10:39 AM|ewgoforth|LINK
I fixed my problem and thought I'd let everyone know what I did, in case someone had a similar problem in the future. I was sort of grasping at straws, but what I did was to remove the MyNamespace project from my solution. I then saw an error on the
Dim myObj As New MyNamespace.MyClass(intMyParm) line and the Intellisense recognized a problem as well. I then re-added the MyNamespace project to my solution and recreated my project reference to my website. This fixed the problems on the
Dim myObj As New MyNamespace.MyClass(intMyParm) line, but another error in a different project in my solution appeared in the errors list. I recreated the project reference in that project too, and my compilation problems were solved. I'm not sure
why nothing was showing up in my errors list, I had tried restarting VS 2008 and rebooting my machine, and neither helped.