471,591 Members | 1,515 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,591 software developers and data experts.

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

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.
Feb 22 '06 #1
1 2505
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.

"qwert" <no****@nospam.nl> wrote in message
news:S6********************@casema.nl...
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.

Feb 22 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Wendy Elizabeth | last post: by
54 posts views Thread by m.roello | last post: by
8 posts views Thread by WT | last post: by
2 posts views Thread by Marco Wedekind | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.