Hi all at Wisej,
please fix this annoying error.
When trying to open form or page or usercontrol, sometimes the designer does NOT open it, and it says “Unable to cast from NNN to IWisejControl, see attached screenshot. Then, after closing VS2019 and reopening it, problem is magically self-fixed. Well, I dont want to restart the VStudio many many times a day. Can you please have a look on it?
Thanks
Pavel Weiss
It is caused by Visual Studio designer loading an assembly used at design time more than once (copied to a shadow file). It usually happens when there are multiple versions or a custom component is used at design time and the assembly is recompiled.
It’s a known issues/features if Visual Studio and it’s most likely caused by the solution configuration in terms of references and custom controls. We work with solutions with more than 120 projects each and thousands of controls and managed to minimize this issue.
It’s not a Wisej issue. The error occurs before Wisej is even loaded by the designer and there is nothing for us to fix.
You can find several explanations and approaches here:
https://www.telerik.com/forums/invalidcastexception-on-displaying-radgrid-in-designer
https://www.infragistics.com/community/forums/f/ultimate-ui-for-windows-forms/27019/unable-to-cast-object-of-type-infragistics-win-checkboximageglyphinfo-to-type-infragistics-win-glyphinfobase#
It has nothing to do with adding wisej packages to project, nor adding anything new to the project. I just open existing solution, and, sometimes it shows the designer fine, sometimes not. It compiles without build errors all the time.
Thanks,
Pavel
Hi Pavel,
Does it happen all the time (i.e. when you add a new Page or Window) or only when you add Wisej’s package to a project?
Best,
Alaa
Please login first to submit.