dotnet / winforms

Windows Forms is a .NET UI framework for building Windows desktop applications.
MIT License
4.42k stars 984 forks source link

Infinite designer loading since migration from .net 4.8 to .NET7 #9317

Closed alexdess closed 1 year ago

alexdess commented 1 year ago

Environment

Microsoft Visual Studio Professional 2022 Version 17.6.3 VisualStudio.17.Release/17.6.3+33801.468

.NET version

net7.0-windows

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

Yes, .NET48.

Issue description

I've had this window and warning since my migration to .NET7. image

The project builds and runs, the windows also work at runtime. The VBproj concerned:

  <PropertyGroup>
      <TargetFramework>net7.0-windows</TargetFramework>
    <AssemblyVersion>2023.5.31.1448</AssemblyVersion>
    <FileVersion>2023.5.31.1448</FileVersion>
    <Version>2023.5.31.1448</Version>
    <LangVersion>latest</LangVersion>
    <UseWindowsForms>true</UseWindowsForms>
    <MyType>WindowsForms</MyType>
  </PropertyGroup>

I've already spent more than 2 days trying to correct my problem and in particular tried all the steps in the guide https://github.com/dotnet/winforms/blob/main/docs/designer/troubleshooting.md

Steps to reproduce

Diagnostics

warn: Cannot update selection in server process as Session is not connected.
merriemcgaw commented 1 year ago

@alexdess Are you reproducing this with a blank project? What does the solution contain? Are there custom controls or 3rd party components?

There may be something there that is incompatible with the new out of process designer for WinForms .NET. In order to diagnose the problems we would need to have your solution and/or the verbose logs from opening your solution. If you aren't comfortable sharing them on GitHub you could use the VS Feedback tool which gives us a way to communicate privately and share files securely.

alexdess commented 1 year ago

Thank you for your quick answer.

I found the cause of my problems. It came from the DevExpress.Wpf.PdfViewer package in version 22.2.5, and updating this library solved my problems. Difficult to find, as the referencing is not direct and there are no explicit error messages.