Failed to open designer
See original GitHub issueEnvironment
Version 17.3.0 Preview 1.0
.NET version
net7.0
Did this work in a previous version of Visual Studio and/or previous .NET release?
No response
Issue description
Seeing
[18:37:53.343110] fail: System.InvalidOperationException: Can't resolve types until ITypeIdentityResolutionService has started processing enqueued assemblies.
at Microsoft.DotNet.DesignTools.Protocol.Types.AssemblySearchingTypeIdentityResolutionService.TryGetType(TypeIdentity typeIdentity, Boolean ignoreCase, Type& type)
at Microsoft.DotNet.DesignTools.Protocol.Types.AssemblySearchingTypeIdentityResolutionService.ResolveNamedType(TypeIdentity typeIdentity, TypeIdentityResolutionOptions options)
at Microsoft.DotNet.DesignTools.Protocol.Types.TypeIdentityResolutionService.ResolveType(TypeIdentity typeIdentity, TypeIdentityResolutionOptions options)
at Microsoft.DotNet.DesignTools.Client.Types.BaseTypeResolutionService.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
For information on how to troubleshoot the designer refer to the guide at https://aka.ms/winforms/designer/troubleshooting.
[18:37:53.450100] fail: REQUEST FAILURES: Sessions/EndLoad
Microsoft.DotNet.DesignTools.Client.DesignToolsServerException: 'Site' must not be null in order to access a required service.
For information on how to troubleshoot the designer refer to the guide at https://aka.ms/winforms/designer/troubleshooting.
Steps to reproduce
Take sample app from https://github.com/dotnet/winforms/issues/6952 and open in the designer.
Diagnostics
No response
Issue Analytics
- State:
- Created a year ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
The Designer Could Not be Shown for this File in Visual Studio
SajawalKhanJadoon Are you encountering the error message "The designer could not be shown for this file because none of the classes within ...
Read more >Unable to open designer for certain gateways
Unable to launch from the designer launcher, but if I create a bat file with the following, it works. C:\Users\jae\.ignition\cache\resources\ ...
Read more >I am not able to start TIBCO Designer. Getting an error ...
go to the C:tibcodesigner5.5bin Check the files : designer.tra and designer.exe files are present. I didn't any file by name designer.hwd.tra ...
Read more >WinForm designer error open designer
Fail to compile (you can't use a control in the designer until it compiles successfully); Have been significantly changed/rewritten since they ...
Read more >Winforms Failed to launch the designer server process.
For Winforms which is running on .NetCore3.1, after referencing the uwp application then unable to open the WinForms designer.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This isn’t a supported use case, so we can’t really offer much help. I can sort of see how the SDK and VS can get confused here. If you wish to test the latest Windows Forms runtime with the designer you’d need to copy the changes to the SDK. I’ve written a script for this https://gist.github.com/RussKie/bb11e213f04729603e533856865922c1.
Feel free to reopen if you see the issue in an app without referencing the canary bits.
I would guess that issue here https://github.com/dotnet/winforms/blob/9ea06044776cd10bd1968ee141449bed1a8e6945/src/System.Windows.Forms/src/System/Windows/Forms/CursorConverter.cs#L88
This condition is false when Cursor comes from assembly with different identity(unsure). Because .NET can treat this is as different Cursor classes, it falls down to https://github.com/dotnet/winforms/blob/9ea06044776cd10bd1968ee141449bed1a8e6945/src/System.Windows.Forms/src/System/Windows/Forms/CursorConverter.cs#L146
which just calls
object.ToString()
.