Visual Studio requires that designers use the first class the the file.

Q

qwert

Hello,

when creating a user control with Visual Basic .NET (v2.0), I get the error:
"Visual Studio requires that designers use the first class the the file."
when I try it view it in Design mode. There is only one class in the file,
the user control.

The first line is "Namespace MyStuff". When I remove this line, all is well
and I can view the control in Design mode.

How do I put the user control in a namespace and still be able to use Design
mode? Not all the classes in the assembly are in the same namespace, so
setting the project properties won't do.

Thanks for any help.
 
Q

qwert

Nevermind,

have to update a file "controlname.Designer.vb". There's a partial class in
it that has to be in the same namespace,

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top