Visual Studio 2022 Designer Errors with .NET Core Windows Forms apps

Paul McConnell 10 Reputation points
2023-02-02T21:12:59.0933333+00:00

I have noticed that as I am designing .NET Core Windows applications in Visual Studio 2022, it frequently yet randomly shows the error in the attached image. This usually comes up when I make changes to the form code (even if it doesn't affect any controls) or if I leave the VS instance sitting for a while (without making any changes at all). When this error happens, this message shows up in the Windows Forms Output window:

[15:41:05.528379] warn: Cannot update selection in server process as Session is not connected.

This is not happening in our VS 2019 installs, and I could not find any similar complaints. There is also no description of the error, no stack trace, nothing. What could be happening here?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,599 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Reza Aghaei 4,936 Reputation points MVP
    2023-02-03T02:11:38.8+00:00

    If you see the issue frequently then you need to report the issue, however I rarely have an issue with VS 2022 (17.4.4).

    But if you want to learn what's happening behind the scene (not a solution for your problem) and understand how new WinForms designer works for new .NET projects, take a look at State of the Windows Forms Designer for .NET Applications

    In your case, it's probably an issue with DesignToolsServer, you the following workarounds may help to recover from situation:

    • Clean/rebuild solution
    • Or, Close/reopen the Form
    • Or, Kill DesignToolServer, then close the Form, then reopen it.
    0 comments No comments