question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to open designer

See original GitHub issue

Environment

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:closed
  • Created a year ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
RussKiecommented, May 20, 2022
  1. add
<ItemGroup>
    <Reference Include="c:\winforms\artifacts\bin\System.Windows.Forms\Debug\net7.0\System.Windows.Forms.dll" />
    <Reference Include="c:\winforms\artifacts\bin\System.Windows.Forms.Primitives\Debug\net7.0\System.Windows.Forms.Primitives.dll" />
  </ItemGroup>

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.

0reactions
kant2002commented, May 17, 2022

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().

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found