Skip to content

Visual Studio is Interactable and Becomes Unresponsive When Displaying a Custom Form via UITypeEditor using ShowDialog() in a .NET Core Client-Server approach #13366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
SreemonPremkumarMuthukrishnan opened this issue Apr 24, 2025 · 2 comments
Labels
area-VSDesigner Windows Forms out-of-proc designer related issues waiting-author-feedback The team requires more information from the author

Comments

@SreemonPremkumarMuthukrishnan

Environment

Microsoft Visual Studio Professional 2022 (64-bit) - Current
Version 17.13.6

.NET version

.NET80 and .NET90

Did this work in a previous version of Visual Studio and/or previous .NET release?

No response

Issue description

When displaying a custom form for the UITypeEditor using ShowDialog() within the server project of a client-server approach, the form is successfully shown but fails to prevent interaction with Visual Studio. Consequently, Visual Studio becomes unresponsive until the form is closed, at which point responsiveness is restored. This issue is specific to .NET Core and does not occur in .NET Framework.

Code to show the form:

 internal class CustomEditorFormHandler : RequestHandler<CustomEditorFormEndpoint.Request, CustomEditorFormEndpoint.Response>
 {
     public override CustomEditorFormEndpoint.Response HandleRequest(CustomEditorFormEndpoint.Request request)
     {
         CustomControl customControl = (CustomControl)request.CustomControl;
         new CustomEditorForm().ShowDialog();
         return new CustomEditorFormEndpoint.Response();
     }
 }

We would appreciate any guidance or suggestions on resolving this issue, particularly in restricting interactions with Visual Studio and addressing the unresponsiveness.

Demo sample:

CustomControlLibrary_WithSample.zip

Issue replication video:

VS_Interactable_Unresponsive.mp4

Steps to reproduce

  1. Open the Designer.
  2. Click on the CustomControl and open the Properties window.
  3. Open the custom form of the "MyCollection" property (via UITypeEditor).
  4. Click randomly within Visual Studio.

Expected Behavior:
Visual Studio should not be interactable and should not become unresponsive, like the .NET Framework.

Observed Behavior:
Visual Studio remains interactable and becomes unresponsive.

Diagnostics


@SreemonPremkumarMuthukrishnan SreemonPremkumarMuthukrishnan added the untriaged The team needs to look at this issue in the next triage label Apr 24, 2025
@github-actions github-actions bot added the area-VSDesigner Windows Forms out-of-proc designer related issues label Apr 24, 2025
@SreemonPremkumarMuthukrishnan
Copy link
Author

Is there any update regarding this issue?

@merriemcgaw
Copy link
Member

It is not supported to use ShowDialog() in the server process because the server must never do any UI or try to get input from the user because it freezes Visual Studio.

This blog describes how the server-client breakup should be done.

@JeremyKuhne JeremyKuhne added waiting-author-feedback The team requires more information from the author and removed untriaged The team needs to look at this issue in the next triage labels May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-VSDesigner Windows Forms out-of-proc designer related issues waiting-author-feedback The team requires more information from the author
Projects
None yet
Development

No branches or pull requests

3 participants