Open bh-sijtnic opened 9 months ago
@Olina-Zhang can your team take a look and reproduce the issue. Let us know if it is a regression and from when. If you narrow it down, go ahead and copy this over to the internal repo. Thanks!
@Olina-Zhang From the diagnostics information, it appears that server process crashed in this scenario. Once the issue reproes, please check if there is any error logged in system EventVwr
. Thanks.
Hi @Nico-1987 , @merriemcgaw, @Shyam-Gupta I am trying to reproduce it, but I cannot get the old DevExpress 22.2.4 version, it's 23.2.4 version now. So use the newer DevExpress 23.2.4 in Visual Studio 17.6.11 and 17.8.6, they work well: WinForms designer can be loaded successfully. @Nico-1987 Can you help confirm if I did the same steps as you(see following video), if yes, please use the latest DevExpress from https://www.devexpress.com/ to try again?
https://github.com/dotnet/winforms/assets/26474449/d385ce7e-6b74-4b7c-9e3c-36f6aa53c4b1
HI @Olina-Zhang
I tried with version 23.2.4 as well, here the DesignToolsServer is loaded instantly and very rapid
We have multiple users in our group that cannot load the designer with 22.2.4 referenced, but some can. We dont understand the difference between the users, we all have the same Visual Studio versions.
I drilled down a bit further into the package dependencies and found something interesting that fixes my test solution.
Inside the DevExpress.Wpf.Core 22.2.4 package they have a "DesignerRunner.exe"
in the 22.2.4 package this lives in \design\designerrunner.exe
In the 23.2.4 package they have moved this into a subfolder \Server.
In the 22.2.4 package, when i move the 3 files into a Server folder, the designer works again In the 23.2.4 package, when i move the files OUT of the server, mimicing the 22 structure, the designer stops working.
It looks like the existence of these files in this location makes the Visual Studio designer crash. Can you try to reproduce by changing the 23.2.4 packages structure on your machine?
Even with the 22.2.4 package change on my machine my production solution does not work yet, i will continue to look into that.
Edit: After making 2 more package changes, the designer started to work in production, while using 22.2.4 packages. For testing i moved some DevExpress design files into a subfolder
And the other wpf.core
Without these files, the designer loads again. I found these locations from the DesignToolsServer output
[09:57:06.564116] trce: Package path = C:\Users\user\.nuget\packages\devexpress.wpf.core\22.2.4
[09:57:06.564116] trce: Root directory selected for design assemblies = C:\Users\user\.nuget\packages\devexpress.wpf.core\22.2.4\lib\net6.0-windows\design
[09:57:06.571106] trce: Package path = C:\Users\user\.nuget\packages\devexpress.wpf.grid.core\22.2.4
[09:57:06.571106] trce: Root directory selected for design assemblies = C:\Users\user\.nuget\packages\devexpress.wpf.grid.core\22.2.4\lib\net6.0-windows\design
[09:57:06.577106] trce: Package path = C:\Users\user\.nuget\packages\devexpress.wpf.docking\22.2.4
[09:57:06.577106] trce: Root directory selected for design assemblies = C:\Users\user\.nuget\packages\devexpress.wpf.docking\22.2.4\lib\net6.0-windows\design
[09:57:06.584114] info: Start processing enqueued assemblies
Question now is, what makes the DesignToolsServer crash on these files
Can you try to reproduce by changing the 23.2.4 packages structure on your machine?
I tried to change the structure on my machine, it doesn't effect the designer loading.
I am not sure how these packages files affect designer loading(DesignToolsServer), hopeful @Shyam-Gupta give your some answer.
Broken:
Working:
@Shyam-Gupta will take a look at the causes here and reply.
Small update from my end. I managed to upgrade out application to the latest DevExpress, version 23.2.4 While i had good results in my sample project, it is not working in our production projects (that reference more packages)
I did some further digging and i can reproduce the problem in my sample project by using this single reference
<ItemGroup>
<PackageReference Include="DevExpress.Wpf.Grid.Core" Version="23.2.4" />
</ItemGroup>
Looking at the package, it seems this package still has the Interop files in the Design folder
If i (re)move the VS2019 files, the designer starts to work!
Environment
Using Windows 10 Version 22H2 (19045.3930) Microsoft Visual Studio Enterprise 2022 (64-bit) - LTSC 17.6 - Version 17.6.11 Repaired my Visual Studio 2022 installation, no change
.NET version
.NET6-Windows10.0.19041
Did this work in a previous version of Visual Studio and/or previous .NET release?
.NET Framework 4.7.2
Issue description
We have recently upgrade all out projects .NET 6. Many of our software developers experience that they are unable to use the WinForms designer in VS on the .NET 6 projects. For some users it does work. We followed the troubleshooting guide, but no luck.
We found the out-of-process documentation and enabled both the out of process designers
I have managed to reproduce my problems in a sample project, so i will report this behaviour. I set the Windows Forms log verbosity to detailed.
When creating a new solution in VS 2022, creating a Windows Forms net6.0-windows project with the default form, the designer can load, showing the default empty form. This produces below output (in diagnostics section) and properly shows the DesignToolsServer.exe as a child process of the Visual Studio instance.
To break this, all i need to do is add a PackageReference to one of the DevExpress WPF packages, which in our production code might happen using transitive dependencies.
After doing this, without even using any controls, the DesignToolServer is failing to load, producing this below log file.
If have also tested using the DevExpress.Win.Design package, when adding a reference to this the design still loads.
Sometimes, but not always, i am seeing this exception when closing the hanging designer
Steps to reproduce
Create new solution with NET 6 Windows Forms project Add PackageReference to DevExpress.Wpf.Core version 22.2.4 Open designer
Diagnostics