Google Группы больше не поддерживают новые публикации и подписки в сети Usenet. Опубликованный ранее контент останется доступен.
Закрыть

Error while adding user control

0 просмотров
Перейти к первому непрочитанному сообщению

Tamir Khason

не прочитано,
18 нояб. 2003 г., 02:26:1418.11.2003
While I'm trying to add my custom control (that works) I receve the error
"An exception occured while trying to create an instance of [my control].
The exception was "The type initializer for [my control] threw an
exception""
This happens ONLY if I want to add control by Dreag and Drop - manually
creation works fine

So Whats the problem??

Thank you


Ying-Shen Yu[MSFT]

не прочитано,
18 нояб. 2003 г., 04:22:4318.11.2003
Hi Tamir,

Is this the same issue with your another post "MDI TabControl with design
time and properties"?

For now, it's not easy to say what's the cause of the problem, but the
problem is probably caused by an unexpected exception. We need investigate
more to find the cause and figure out how to work around it.
We can catch the first-chance exception before IDE handling it to get more
information,
Here is the steps to do it.:
1. In your current VS.NET IDE open the "Exceptions" dialog by
"Debug"->"Exceptions" menu.
2. click "Common Language Runtime Exceptions", and change the "When the
exception is throw" to "Break into the debugger". click ok close it.
3. start another VS.NET IDE and load a test WinForm application project.
4. In your previous IDE, click "Debug" -> "Processes"
selet "devenv.exe" and attach to it.
5. put your control onto the form in the new IDE, if the exception thrown,
the debugger will break in, then you will see where was the Exception from
and what exact type of it.

If you still have problem in fixing the exception, please be free to reply
to this thread to let me know.
Thanks!


Best regards,

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

This posting is provided "AS IS" with no warranties and confers no rights.
You should not reply this mail directly, "Online" should be removed before
sending.


Tamir Khason

не прочитано,
23 нояб. 2003 г., 03:50:0123.11.2003
According your mail request, here is my response:

It looks like some kind of bug in VS2003 EA. Sometimes it works, but
sometimes it does not (even if I do not change the code)

Debugging of devenv bring no affect - no error handled...


""Ying-Shen Yu[MSFT]"" <v-...@online.microsoft.com> wrote in message
news:i0UxPWbr...@cpmsftngxa06.phx.gbl...

Ying-Shen Yu[MSFT]

не прочитано,
25 нояб. 2003 г., 04:42:3425.11.2003
Hi Tamir,

From the error description, the exception is from the static constructor of
your control.
Could you give me some snippet of your static constructor?

Also I'd like you try catching the Native exception, C++Exception and Win32
Exceptions,
set "When the exception is thrown" to "Break into....".There must be an
exception in VS.NET since the IDE show the excetion dialog.
If you still have problem on it, please send me a small sample to repro the
problem on my system, thanks!

0 новых сообщений