Hi, if anyone can help on this, please! This is driving me crazy.
I have a user control hierarchy several levels deep that derive for
UserControl (windows).
The class that is at the top level, has the following constructor (generated
by VS.NET)
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeCompo nent()
'Add any initialization after the InitializeCompo nent() call
End Sub
Sometimes (about half the time), when I recompile my solution (which
contains a project with this class, and a project with a form tester trying
out this user control), I get the error I put in the subject of this post.
Now, clearly, this class has a constructor.
If I change the code by removing the word 'Public', and recompile everything
is great.
Next time I need to recompile, I get this error again. In this case, I just
put the word 'Public' back in, and recompile - all is well again.
So I spend half my time removing 'Public' and then adding it back in - just
to get the compiler to change its mind.
Now, it doesn't do this all the time. Sometimes it recompiles OK.
I've checked the project build order - and the project with the user control
is compiled first.
I've tried manually compiling the first project - and then the second. And
the second always fails, because it thinks there is no constructor available
for the user control. Until that is, I take away or remove the 'Public'
keyword off of the constructor - in which case its fine.
Is this some ridiculous VB compiler problem? Some VS.NET bug. Anything I can
do about it?
Thanks
I have a user control hierarchy several levels deep that derive for
UserControl (windows).
The class that is at the top level, has the following constructor (generated
by VS.NET)
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeCompo nent()
'Add any initialization after the InitializeCompo nent() call
End Sub
Sometimes (about half the time), when I recompile my solution (which
contains a project with this class, and a project with a form tester trying
out this user control), I get the error I put in the subject of this post.
Now, clearly, this class has a constructor.
If I change the code by removing the word 'Public', and recompile everything
is great.
Next time I need to recompile, I get this error again. In this case, I just
put the word 'Public' back in, and recompile - all is well again.
So I spend half my time removing 'Public' and then adding it back in - just
to get the compiler to change its mind.
Now, it doesn't do this all the time. Sometimes it recompiles OK.
I've checked the project build order - and the project with the user control
is compiled first.
I've tried manually compiling the first project - and then the second. And
the second always fails, because it thinks there is no constructor available
for the user control. Until that is, I take away or remove the 'Public'
keyword off of the constructor - in which case its fine.
Is this some ridiculous VB compiler problem? Some VS.NET bug. Anything I can
do about it?
Thanks
Comment