Open andregiacomini opened 5 days ago
@Olina-Zhang - this issue looks familiar, but I didn't find it in the designer repo , it still repros on the latest. Could you please search for a dupe and create a new one if there is none.
I think there was a similar issue with #3739
@Tanya-Solyanik we have a designer issue: https://github.com/microsoft/winforms-designer/issues/1995 about UserControl with load event contained MessageBox.Show or Dialog.Show, tracked that issue in Winforms runtime 10677, fixed by PR: https://github.com/dotnet/winforms/pull/10710. Now MessageBox in UserControl load event is not popped up at design mode. Do we need to file another designer issue for Trace.WriteLine("Hello from User Control") in the Load event of this UserControl?
@Olina-Zhang - I can repro on Version 17.13.0 Preview 1.0 [35417.248.main], we fixed only a hang and the MessageBox invocation specifically. We'll triage this one in this repo.
@Tanya-Solyanik Yes, I can also repro this one.
The change to display the dialog for Debug.Fail
and Debug.Assert
was done as a response to this issue. Earlier the Debug.*
statements were causing Designer's server process to crash silently. Now these statements show up as text in the message box.
I will check if we can special case Trace.*
statements and just log them in VS output window instead of displaying them in the message box.
Environment
VS Version 17.11.5
.NET version
Tested both in .NET 6 and .NET 8
Did this work in a previous version of Visual Studio and/or previous .NET release?
No response
Issue description
When a UserControl has a Trace.WriteLine in the Load event, and this UserControl is added to a form, the following message is shown every time the form is opened.
Steps to reproduce
Diagnostics
No response