'Microsoft.Toolkit.Forms.UI.Controls Could not find Windows Runtime type 'Microsoft.Toolkit.Win32.UI.XamlHost.IXamlMetadataContainer'

I have created a new "Windows Forms App":

enter image description here

enter image description here

Now I install the Microsoft.Toolkit.Forms.UI.Controls from NuGet.

enter image description here

It requires these dependencies:

enter image description here

After clicking "I accept", the next thing that happens is that an error message "Failed to lauch the design tools server process." is shown:

enter image description here

I select the Form1 designer in the tabs, and the ToolBox now shows the new tools:

enter image description here

However, the designer is gone, and when I try to bring it up again, the message "This item does not support previewing." appears each time I click Form1.vb -> View Designer:

enter image description here

enter image description here

I have repeated the process several times.

When I switch from Debug x86 to Debug AnyCPU, I can open up the designer again.

However, when I then try to drag one of the tools onto the form, an error occurs:

"Failed to create component 'InkCanvas'. The error message follows: 'Microsoft.DotnetNet.DesignTools.Client.DesignToolsServerException: Could not find Windows Runtime type 'Microsoft.Toolkit.Win32.UI.XamlHost.IXamlMetadataContainer'.

enter image description here

I am stuck.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source