Errors when opening some forms with C1 components

Posted by: robert.chapman on 4 December 2017, 9:37 pm EST

  • Posted 4 December 2017, 9:37 pm EST

    Hi,

    We have been using WinForms Edition 4.0.20161.147 (with .NET Core 2.0) and are unable to open certain forms due to errors related to casting objects - e.g. unable to cast C1Command.C1ContextMenu to a Windows control. Also C1CommandHolder objects also seem to cause the errors. This is just using the designer generated code. If you elect to open the form and ignore the errors then when you press Save it wipes part of it. Appreciate if you could assist us in solving.

    Thanks,

    Rob

  • Posted 13 November 2019, 5:24 pm EST

    Hi Robert,

    Please note that .NET Core does not include WinForms libraries. Currently, it forms a base for non-UI based applications. Please refer the below mentioned blog post explaining the same in detail:

    https://www.grapecity.com/en/blogs/big-news-from-dotnetconf-asp-net-core-goes-rtm-june-27

    However, while using C1Command related controls in .NET, the error generally occurs when dlls version referenced in your project is different than the one installed on your machine. Therefore to resolve this issue, you need to remove C1.Win.C1Command.4.dll reference from your project and then re-add the reference from “C:\Program Files (x86)\ComponentOne\WinForms Edition\bin\v4.0” folder. And after this clean and rebuild the application.

    Also this issue occurs when the C1.Win.C1Command.4.Design.dll in your project is different than the version installed in your machine. Therefore to resolve this issue, you need to perform similar steps for C1.Win.C1Command.4.Design.dll as you did above for C1.Win.C1Command.4.dll.

    Also, here are few forum posts discussing this issue that should help you in resolving the issue:

    https://www.grapecity.com/en/forums/winforms-edition/c1command_1

    https://www.grapecity.com/en/forums/winforms-edition/form-designer-error_1

    Let me know if none of the above could resolve your issue.

    Best Regards,

    Esha

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels