UserControl Designer problems

M

Markus Wildgruber

Hi!

We create an inherited user control and add it to a form. When we
successfully compile the project and switch to the designer of the form
again, the control disappears and we get 2 error messages in the task list:

There is already a component named 'dataGridControl1'. Components must
have unique names, and names must be case-insensitive. A name also cannot
conflict with the name of any component in an inherited class.

and

C:\FUSION\0.2\Source\Finance\skFinanceUI\UserRoleForm.cs(365): The variable
'dataGridControl1' is either undeclared or was never assigned.

Even if we change the name of the control before compiling the project, the
problem persists. So the name of the control cannot be the reason. We also
checked this out on different forms.
Does anyone know a solution?

TIA,

Markus
 
K

Kevin Yu [MSFT]

Hi Markus,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you've got 2 error messages in the task
list after you have built the control sucessfully. If there is any
misunderstanding, please feel free to let me know.

This problem seems to be a little strange and requires further debugging.
To resolve the problem faster, could you please send me a package that
would reproduce the problem by email? Remove 'online' from the no spam
alias is my email address.

If anything is unclear, please feel free to reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
M

Markus Wildgruber

Hi Kevin,

Thank you for your help. Unfortunately there seems to be a little
misunderstanding regarding the problem.

The problem is not the control itself but the use of it on a form. The
task-messages are related to the form. The control can be built without any
problems. It even is shown as expected at runtime, but the designer reports
the errors mentioned in our first posting. Note that the designer removes
the line containing Form.Controls.Add( sillyControl ).

We found a similar case using Google, but unfortunately the poster did not
get a resolution. Anyway, you may have a look at it:
http://groups.google.de/[email protected]

Unfortunately we were not able to reproduce the behavior in a small sample.
It seems to somehow be related to our project, that is too large to be
submitted.

Thanks again for your assistance,

Markus
 
Y

Ying-Shen Yu[MSFT]

Hi Markus,

Thanks for your reply.

From your description, I understood this is a design-time issue, the error
message comes up when you open the designer view of a Form which have this
user control.

I suspect these error message is generated when designer trying to
de-serialize the usercontrol, to further investigate on this issue, a
simple reproduction project would be a great help.

Since it's not able to reproduce this problem in a small sample, I'd like
to first analyze the stack trace information when the internal exception
throws. You may enable caching the first-chance exception in VS.IDE
debugger paste the stack trace information.
Note, in order to get correct and complete stack trace inforamtion you you
need load all the related symbols.

Here are the steps to enable first-chance exception in VS.NET IDE:
1.Open the Exceptions dialog, tell VS.NET break into the debugger when an
CLR exception happens, you may open the dialog by "Debug"->"Exception"
command.
select the "Common Language Runtime Exceptions" and select "Break into the
debugger".
2.run your program in release build, when exception happens, a dialog will
appear with message such as "A first chance exception of type....",
please write down the exception type name, then choose break. You may get a
warning says no source code, it's ok, click ok to close it.

For how to Load Symbol files in VS.NET IDE, you may referr to the KB
article below:
<HOW TO: Use a Symbol Server with the Visual Studio .NET Debugger>
http://support.microsoft.com/?id=319037

If you make an progress on this issue or meet problem when trying my
suggestions please feel free to reply this thread to let me know.

Thanks!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Community Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.
 
K

Kevin Yu [MSFT]

Hi Markus,

We have reviewed this issue and are currently contacting the product team.
We will update you ASAP. Thanks for your patience!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
K

Kevin Yu [MSFT]

Hi Markus,

Thank you for your patience!

Based on my research, this issue is similar to what KB article Q842706
describes. You can try to call Microsoft PSS for a hotfix on it. For more
information, please check the following link:

http://support.microsoft.com/?kbid=842706

If that still cannot have the problem resolved, feel free to let me know.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 

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