Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / August 2006

Tip: Looking for answers? Try searching our database.

Very annoying Designer error message

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bob Costello - 30 Aug 2006 00:53 GMT
I am working on a solution which has a number of forms. At some point, mostly
during builds, I get an error message box displaying the following line of
text:

Array rank '2' is too high.

A search of the on-line doc reveals the following explanation:

"Visual Studio only supports single-dimension arrays in the code block that
is parsed by the designer. Multidimensional arrays are valid outside this
area."

The original error message box does not point to a code location where the
error occurred, presumably in a xxx.Designer.cs file. A text search in the
entire solution reveals nothing.

This is an apparently benign message in that execution proceeds as expected
but the behaviour is very annoying.

Anybody have any suggestions on how I might find the source of the problem?

To MS people, is there any reason why the message box can't be a little more
helpful.

Thanks in advance.

Bob Costello
Stoitcho Goutsev (100) - 30 Aug 2006 23:03 GMT
Bob,

That means you have a control, usercontrol or a form used as a base class
for other form(s) that has public propoerty of type multidimensional array.
VS designer tries to generate code in InitializeComponent method for all
public properties that have value different than the default value. As the
error message sugests VS doesn't support this type of properties.
You cannot find the problem using search because this code hasn't been
generated. If you don't have any problems at run-time this means the
property shouldn't be serialzied in the first place. Find this property(ies)
and mark it out with
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
attribute. This will remove the error message.

Signature

HTH
Stoitcho Goutsev (100)

>I am working on a solution which has a number of forms. At some point,
>mostly
[quoted text clipped - 28 lines]
>
> Bob Costello
Bob Costello - 31 Aug 2006 02:54 GMT
Stoitcho,

This may be the problem. We do have multi-dimensional arrays and some of
them may be in base form classes. I am at home now and don't have the source
code.  I will check it out tommorow at work. I think you are right.

Thanks and Best Regards,

Bob Costello

> Bob,
>
[quoted text clipped - 42 lines]
> >
> > Bob Costello

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.