dotnet / winforms

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

Designer not working in VS 2022 preview #8448

Closed elachlan closed 1 year ago

elachlan commented 1 year ago

Environment

Edition Windows 10 Pro Version 21H2 Installed on ‎25-‎Mar-‎22 OS build 19044.2364 Experience Windows Feature Experience Pack 120.2212.4190.0

.NET version

.NET 8

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

I am unsure if the designer previously worked.

Issue description

The designer fails to open a form in any of the projects of Winforms.

Steps to reproduce

Installed latest VS Preview and opened a form in WinformsControlsTest.

Diagnostics

[12:39:03.634565] info: Creating VsDesignerLoader
[12:39:03.758140] info: [Thread 1] Creating design-time ITypeResolutionService.
[12:39:03.815189] trce: Current VS Version = 17.0
[12:39:03.817190] info: Start processing enqueued assemblies
[12:39:03.817190] trce: Loaded Microsoft.WinForms.DesignTools.Protocol in 00:00:00.0000120 [thread 89]
[12:39:03.818192] trce: Processed 'Microsoft.WinForms.DesignTools.Protocol' in 00:00:00.0011024
[12:39:03.821194] info: Added 'Microsoft.WinForms.DesignTools.Protocol'
[12:39:03.822194] trce: Loaded Microsoft.WinForms.DesignTools.Client in 00:00:00.0000136 [thread 98]
[12:39:03.849357] trce: Processed 'Microsoft.WinForms.DesignTools.Client' in 00:00:00.0274103
[12:39:03.851366] info: Added 'Microsoft.WinForms.DesignTools.Client'
[12:39:03.991797] info: Visual Studio culture: en-US (0x0409)
[12:39:03.991797] info: [Thread 61] Launching server...
[12:39:03.998072] info: Is processor architecture ARM64: False
[12:39:04.236863] info: Added 'mscorlib'
[12:39:04.236863] trce: Loaded System.Windows.Forms in 00:00:00.0000150 [thread 86]
[12:39:04.239866] trce: Processed 'System.Windows.Forms' in 00:00:00.0028147
[12:39:04.255879] info: Added 'System.Windows.Forms'
[12:39:04.255879] trce: Loaded System in 00:00:00.0000142 [thread 14]
[12:39:04.256882] trce: Processed 'System' in 00:00:00.0008085
[12:39:04.272894] info: Added 'System'
[12:39:04.272894] trce: Loaded System.Drawing in 00:00:00.0000131 [thread 14]
[12:39:04.272894] trce: Processed 'System.Drawing' in 00:00:00.0001257
[12:39:04.274896] info: Added 'System.Drawing'
[12:39:04.274896] trce: Loaded System.Design in 00:00:00.0000168 [thread 84]
[12:39:04.282076] trce: Processed 'System.Design' in 00:00:00.0065722
[12:39:04.292921] info: Added 'System.Design'
[12:39:04.292921] trce: Loaded System.Drawing.Design in 00:00:00.0000133 [thread 26]
[12:39:04.292921] trce: Processed 'System.Drawing.Design' in 00:00:00.0002616
[12:39:04.293912] info: Added 'System.Drawing.Design'
[12:39:05.569105] info: Shadow cache base directory: C:\Users\elach.DESKTOP-IP3KHO8\AppData\Local\Microsoft\VisualStudio\17.0_4c6607dd\WinFormsDesigner
[12:39:05.578112] info: [WinformsControlsTest]: Preparing shadow cache folder
[12:39:05.579112] info: [WinformsControlsTest]: NetCoreServerLayout - Platform: AnyCPU, Normalized PlatformName: x64
[12:39:05.582115] info: [WinformsControlsTest]: Copying design tools server common files from: 'c:\program files\microsoft visual studio\2022\preview\common7\ide\commonextensions\microsoft\windows.forms\DesignToolsServer\Common'
[12:39:05.628154] info: [WinformsControlsTest]: Copying design tool server platform-specific files from: 'c:\program files\microsoft visual studio\2022\preview\common7\ide\commonextensions\microsoft\windows.forms\DesignToolsServer\x64'
[12:39:05.634169] info: [WinformsControlsTest]: Copying project output file: 'D:\Development\winforms\artifacts\bin\WinformsControlsTest\Debug\net8.0\WinformsControlsTest.dll'
[12:39:05.641165] info: [WinformsControlsTest]: Copying 'D:\Development\winforms\artifacts\obj\WinformsControlsTest\Debug\net8.0\WinformsControlsTest.designer.deps.json' to 'DesignToolsServer.deps.json'
[12:39:05.643167] info: [WinformsControlsTest]: Copying 'D:\Development\winforms\artifacts\obj\WinformsControlsTest\Debug\net8.0\WinformsControlsTest.designer.runtimeconfig.json' to 'DesignToolsServer.runtimeconfig.json'
[12:39:05.645169] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\Accessibility\Debug\net8.0\Accessibility.dll'
[12:39:05.647172] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\Accessibility\Debug\net8.0\Accessibility.dll'
[12:39:05.647172] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\AxHosts\Debug\net472\AxInterop.WMPLib.dll'
[12:39:05.648172] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\AxHosts\Debug\net472\AxInterop.WMPLib.dll'
[12:39:05.648172] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\AxHosts\Debug\net472\Interop.WMPLib.dll'
[12:39:05.649172] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\AxHosts\Debug\net472\Interop.WMPLib.dll'
[12:39:05.649172] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Design.Facade\Debug\net8.0\System.Design.dll'
[12:39:05.650173] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Design.Facade\Debug\net8.0\System.Design.dll'
[12:39:05.650173] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\System.Windows.Forms.Design.dll'
[12:39:05.654186] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\System.Windows.Forms.Design.dll'
[12:39:05.654186] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\System.Windows.Forms.dll'
[12:39:05.662193] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\System.Windows.Forms.dll'
[12:39:05.662193] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.IntegrationTests.Common\Debug\net8.0\System.Windows.Forms.IntegrationTests.Common.dll'
[12:39:05.664186] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.IntegrationTests.Common\Debug\net8.0\System.Windows.Forms.IntegrationTests.Common.dll'
[12:39:05.664186] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\System.Windows.Forms.Primitives.dll'
[12:39:05.666197] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\System.Windows.Forms.Primitives.dll'
[12:39:05.667188] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\cs\System.Windows.Forms.Design.resources.dll'
[12:39:05.668188] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\cs\System.Windows.Forms.Design.resources.dll'
[12:39:05.668188] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\de\System.Windows.Forms.Design.resources.dll'
[12:39:05.669189] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\de\System.Windows.Forms.Design.resources.dll'
[12:39:05.669189] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\es\System.Windows.Forms.Design.resources.dll'
[12:39:05.670200] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\es\System.Windows.Forms.Design.resources.dll'
[12:39:05.670200] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\fr\System.Windows.Forms.Design.resources.dll'
[12:39:05.670200] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\fr\System.Windows.Forms.Design.resources.dll'
[12:39:05.671191] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\it\System.Windows.Forms.Design.resources.dll'
[12:39:05.672192] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\it\System.Windows.Forms.Design.resources.dll'
[12:39:05.672192] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\ja\System.Windows.Forms.Design.resources.dll'
[12:39:05.673193] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\ja\System.Windows.Forms.Design.resources.dll'
[12:39:05.673193] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\ko\System.Windows.Forms.Design.resources.dll'
[12:39:05.674193] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\ko\System.Windows.Forms.Design.resources.dll'
[12:39:05.674193] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\pl\System.Windows.Forms.Design.resources.dll'
[12:39:05.675196] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\pl\System.Windows.Forms.Design.resources.dll'
[12:39:05.675196] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\pt-BR\System.Windows.Forms.Design.resources.dll'
[12:39:05.676196] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\pt-BR\System.Windows.Forms.Design.resources.dll'
[12:39:05.676196] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\ru\System.Windows.Forms.Design.resources.dll'
[12:39:05.677197] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\ru\System.Windows.Forms.Design.resources.dll'
[12:39:05.677197] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\tr\System.Windows.Forms.Design.resources.dll'
[12:39:05.678198] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\tr\System.Windows.Forms.Design.resources.dll'
[12:39:05.678198] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\zh-Hans\System.Windows.Forms.Design.resources.dll'
[12:39:05.679199] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\zh-Hans\System.Windows.Forms.Design.resources.dll'
[12:39:05.679199] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\zh-Hant\System.Windows.Forms.Design.resources.dll'
[12:39:05.680200] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Design\Debug\net8.0\zh-Hant\System.Windows.Forms.Design.resources.dll'
[12:39:05.680200] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\cs\System.Windows.Forms.resources.dll'
[12:39:05.681210] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\cs\System.Windows.Forms.resources.dll'
[12:39:05.681210] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\de\System.Windows.Forms.resources.dll'
[12:39:05.682201] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\de\System.Windows.Forms.resources.dll'
[12:39:05.682201] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\es\System.Windows.Forms.resources.dll'
[12:39:05.683202] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\es\System.Windows.Forms.resources.dll'
[12:39:05.683202] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\fr\System.Windows.Forms.resources.dll'
[12:39:05.684203] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\fr\System.Windows.Forms.resources.dll'
[12:39:05.684203] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\it\System.Windows.Forms.resources.dll'
[12:39:05.685203] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\it\System.Windows.Forms.resources.dll'
[12:39:05.685203] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\ja\System.Windows.Forms.resources.dll'
[12:39:05.686204] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\ja\System.Windows.Forms.resources.dll'
[12:39:05.686204] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\ko\System.Windows.Forms.resources.dll'
[12:39:05.687205] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\ko\System.Windows.Forms.resources.dll'
[12:39:05.687205] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\pl\System.Windows.Forms.resources.dll'
[12:39:05.688206] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\pl\System.Windows.Forms.resources.dll'
[12:39:05.688206] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\pt-BR\System.Windows.Forms.resources.dll'
[12:39:05.689207] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\pt-BR\System.Windows.Forms.resources.dll'
[12:39:05.689207] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\ru\System.Windows.Forms.resources.dll'
[12:39:05.691208] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\ru\System.Windows.Forms.resources.dll'
[12:39:05.691208] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\tr\System.Windows.Forms.resources.dll'
[12:39:05.692209] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\tr\System.Windows.Forms.resources.dll'
[12:39:05.692209] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\zh-Hans\System.Windows.Forms.resources.dll'
[12:39:05.693210] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\zh-Hans\System.Windows.Forms.resources.dll'
[12:39:05.693210] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\zh-Hant\System.Windows.Forms.resources.dll'
[12:39:05.694211] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms\Debug\net8.0\zh-Hant\System.Windows.Forms.resources.dll'
[12:39:05.694211] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\cs\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.695212] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\cs\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.695212] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\de\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.696212] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\de\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.696212] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\es\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.696212] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\es\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.696212] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\fr\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.697213] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\fr\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.697213] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\it\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.698214] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\it\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.698214] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\ja\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.699214] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\ja\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.699214] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\ko\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.699214] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\ko\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.699214] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\pl\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.700216] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\pl\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.700216] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\pt-BR\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.701217] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\pt-BR\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.701217] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\ru\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.702217] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\ru\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.702217] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\tr\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.702217] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\tr\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.702217] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\zh-Hans\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.703218] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\zh-Hans\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.703218] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\zh-Hant\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.704219] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\zh-Hant\System.Windows.Forms.Primitives.resources.dll'
[12:39:05.704219] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Analyzers.CSharp\Debug\netstandard2.0\System.Windows.Forms.Analyzers.CSharp.dll'
[12:39:05.705220] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Analyzers.CSharp\Debug\netstandard2.0\System.Windows.Forms.Analyzers.CSharp.dll'
[12:39:05.705220] info: [WinformsControlsTest]: Copying project reference: 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Analyzers\Debug\netstandard2.0\System.Windows.Forms.Analyzers.dll'
[12:39:05.706221] info: [WinformsControlsTest]: Copied 'D:\Development\winforms\artifacts\bin\System.Windows.Forms.Analyzers\Debug\netstandard2.0\System.Windows.Forms.Analyzers.dll'
[12:39:06.603148] info: [WinformsControlsTest]: Launching design tools server process...
[12:39:07.179639] fail: [WinformsControlsTest]: Unhandled exception. System.TypeInitializationException: The type initializer for 'Microsoft.VisualStudio.WinForms.Server.WinFormsDesignTimeAssemblies' threw an exception.
[12:39:07.179639] fail: [WinformsControlsTest]:  ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.
[12:39:07.179639] fail: [WinformsControlsTest]: File name: 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
[12:39:07.180631] fail: [WinformsControlsTest]:    at Microsoft.VisualStudio.WinForms.Server.WinFormsDesignTimeAssemblies..cctor()
[12:39:07.180631] fail: [WinformsControlsTest]:    --- End of inner exception stack trace ---
[12:39:07.180631] fail: [WinformsControlsTest]:    at Microsoft.VisualStudio.WinForms.Server.WinFormsDesignTimeAssemblies.get_All()
[12:39:07.180631] fail: [WinformsControlsTest]:    at DesignToolsServerX64.Program.Main(String[] args)
[12:39:36.176720] trce: Suspend painting the design surface
[12:39:36.202734] fail: Exception occurred while disposing VSDesignSurface
                        System.InvalidOperationException: The service 'Microsoft.VisualStudio.Shell.Design.Serialization.DesignerDocDataService' must be installed for this feature to work.  Ensure that this service is available.
                           at System.ServiceExtensions.GetRequiredService[TService,TInterface](IServiceProvider provider)
                           at Microsoft.DotNet.DesignTools.Client.CodeDom.VsDesignerInfo.<CreateAsync>d__22.MoveNext()
                        --- End of stack trace from previous location where exception was thrown ---
                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                           at Microsoft.DotNet.DesignTools.Client.CodeDom.CodeModel.MergedCodeDomProvider.<CreateAsync>d__23.MoveNext()
                        --- End of stack trace from previous location where exception was thrown ---
                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                           at Microsoft.DotNet.DesignTools.Client.CodeDom.CodeDomSource.<CreateAsync>d__9.MoveNext()
                        --- End of stack trace from previous location where exception was thrown ---
                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                           at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
                           at Microsoft.VisualStudio.Threading.JoinableTask`1.CompleteOnCurrentThread()
                           at Microsoft.DotNet.DesignTools.Client.Loader.VsDesignerLoader.<get_CodeDomSource>g__Create|36_0()
                           at Microsoft.DotNet.DesignTools.Client.Loader.VsDesignerLoader.get_CodeDomSource()
                           at Microsoft.DotNet.DesignTools.Client.Loader.VsDesignerLoader.get_CodeDomManager()
                           at Microsoft.DotNet.DesignTools.Client.Loader.VsDesignerLoader.OnBeginUnload()
                           at Microsoft.DotNet.DesignTools.Client.Loader.BasicDesignerLoader.Dispose()
                           at Microsoft.DotNet.DesignTools.Client.Loader.VsDesignerLoader.Dispose()
                           at System.ComponentModel.Design.DesignerHost.DisposeHost()
                           at System.ComponentModel.Design.DesignSurface.Dispose(Boolean disposing)
                           at Microsoft.VisualStudio.WinForms.VSDesignSurface.Dispose(Boolean disposing)

                        For information on how to troubleshoot the designer refer to the guide at https://aka.ms/winforms/designer/troubleshooting.
elachlan commented 1 year ago

slightly related: #8381

dreddy-work commented 1 year ago

@Shyam-Gupta / @Tanya-Solyanik do you know if we have a known issue for this in the designer repo? @elachlan , is this consistent for any target apps or Just .NET 8? Can you try with latest SDK installed form here https://github.com/dotnet/installer

elachlan commented 1 year ago

Forgot to include my VS info:

Microsoft Visual Studio Community 2022
Version 17.5.0 Preview 2.0
VisualStudio.17.Preview/17.5.0-pre.2.0+33209.295
Microsoft .NET Framework
Version 4.8.04084

Installed Version: Community

Preview VS with .NET 7 works fine.

The issue has mostly been isolated to the Winforms project so far, when I try and open any of the forms/controls in the designer.

Installing the latest SDK did not stop the error. I am starting VS from winfroms via start-vs.cmd

elachlan commented 1 year ago

Starting visual studio directly against the solution file also results in an error.

Olina-Zhang commented 1 year ago

In the latest VS with .Net 7 or .Net 8, they have same result: tested forms in WinformsControlsTest are not loaded successfully by start-vs.cmd or opening Winforms.sln directly. Winforms designer repo has the same issue: https://github.com/microsoft/winforms-designer/issues/1901. .Net 7.0: just .Net 7.0 installed, and tested WinformsControlsTest app in Winforms release/7.0 branch image .Net 8.0: installed the latest .Net 8.0, and tested WinformsControlsTest app in Winforms main branch image

elachlan commented 1 year ago

@Olina-Zhang do you have an issue with BuildAssist having an error?

image

Olina-Zhang commented 1 year ago

@Olina-Zhang do you have an issue with BuildAssist having an error?

Is it? image

elachlan commented 1 year ago

Seems okay. Thanks. That isolates it a bit.

dreddy-work commented 1 year ago

FYI - @Shyam-Gupta , is investigating this issue.

Shyam-Gupta commented 1 year ago

The designer load failure is specific to WinformsControlsTest project in this repo. It doesn’t repro for new projects or other existing projects. Failure in WinformsControlsTest project is not a customer scenario because this project has project reference to System.Windows.Forms dll.

In normal customer scenario, CLR loads this dll from .NET SDK location and works fine. But for WinformsControlsTest project, it tries to look for this dll (version 42.42.42.42424) in the ShadowCache base folder (location of DesignToolsServer.exe), where it is not present and hence server process load fails. This dll is shadow cached inside UserAppData folder which is the correct location for project reference dlls.

There is no easy way to make designer work for this project without any perf impact. Hence IMO this bug is a won't fix.

cc: @merriemcgaw

elachlan commented 1 year ago

I get the exact same error opening a control in System.Windows.Forms/System.Windows.Forms.Design. Its not isolated to WinformsControlsTest for me.

Olina-Zhang commented 1 year ago

Seems okay. Thanks. That isolates it a bit.

It is the issue: https://github.com/dotnet/project-system/issues/8721

elachlan commented 1 year ago

Thank you!!! I have been going crazy without debug.

Shyam-Gupta commented 1 year ago

I get the exact same error opening a control in System.Windows.Forms/System.Windows.Forms.Design. Its not isolated to WinformsControlsTest for me.

It's the same root cause.