You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have multiple WinForm projects that I've upgraded from .NET Framework 4.7.2 to .NET Core 5. The projects that referenced MetroModernUI controls failed to load in the designer - though they compiled and ran just fine.
If I tried to open the form in the designer it would open blank/white with no ability to interact with it.
I eventually found that if I removed my references to MetroButton, the form would load without issue.
If I drag the MetroButton control onto the form, I get the following error:
Failed to create component 'MetroButton'. The error message follows:
'System.InvalidCastException: Unable to cast object of type 'Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.ControlProxy`1[Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Bits`32[Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+On,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+On,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+On,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+On,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off,Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.EncodedNumberType+Off]]' to type 'System.Windows.Forms.Control'.
at System.Windows.Forms.Design.ControlDesigner.get_Control()
at System.Windows.Forms.Design.ControlDesigner.Initialize(IComponent component)
at System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo)
at System.ComponentModel.Design.DesignerHost.PerformAdd(IComponent component, String name)
at System.ComponentModel.Design.DesignerHost.Add(IComponent component, String name)
at Microsoft.VisualStudio.WinForms.RemoteClient.Utilities.ContainerHelpers.SynchronizeComponents(IContainer rootContainer, ComponentProxy[] components, String[] componentNames, String[] containerNames)
at Microsoft.VisualStudio.WinForms.DesignerHostShim.SynchronizeWithSnapshot(DesignerHostSnapshot snapshot)
at Microsoft.VisualStudio.WinForms.RemoteClient.Toolbox.WinFormsToolboxItem.CreateComponentsCore(IDesignerHost host, IDictionary defaultValues)
at System.Drawing.Design.ToolboxItem.CreateComponents(IDesignerHost host, IDictionary defaultValues)
at Microsoft.VisualStudio.Windows.Forms.Design.OleDragDropHandler.CreateTool(ToolboxItem tool, ControlProxy parent, Int32 x, Int32 y, Int32 width, Int32 height, Boolean hasLocation, Boolean hasSize, ToolboxSnapDragDropEventArgs snapDragDropEventArgs)'
I haven't tried other controls.
My form is a MetroForm.
The text was updated successfully, but these errors were encountered:
I have multiple WinForm projects that I've upgraded from .NET Framework 4.7.2 to .NET Core 5. The projects that referenced MetroModernUI controls failed to load in the designer - though they compiled and ran just fine.
If I tried to open the form in the designer it would open blank/white with no ability to interact with it.
I eventually found that if I removed my references to MetroButton, the form would load without issue.
If I drag the MetroButton control onto the form, I get the following error:
Failed to create component 'MetroButton'. The error message follows:
I haven't tried other controls.
My form is a MetroForm.
The text was updated successfully, but these errors were encountered: