Can not load file assembly

Posted by: victor_charles on 16 August 2019, 5:13 am EST

  • Posted 16 August 2019, 5:13 am EST

    Hi,

    How do I resolve the error below?

    'Could not load file or assembly 'C1.Win.C1Command.4' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)'

    Kind regards,

    Victor
  • Marked as Answer

    Replied 18 August 2019, 7:50 pm EST

    Hello,

    This error occurs because there still exists a reference to an older version of a C1 control in the project.
    Below given two solutions, you can try them to solve this issue :

    Solution 1 : Unblock the control’s dll and then try using it in your application. To unblock the dll, right click on the dll and select 'Properties'. In the 'General' tab of the Properties, select the 'Unblock' option. Refer to the attached image.

    Solution 2 :
    1 : Delete the old references from the References tab in Solution Explorer.
    2 : Delete the licenses.licx file and clean the solution.
    3 : Close Solution and Close VS because at times VS has some weird behavior to keep the cache to hold dll references.
    4 : Delete bin and obj folders from application folder.
    5 : Open VS and check application's framework- it should not be Client Profile version.
    6 : Add a new Form.
    7 : And then drag drop all the controls ( of the latest version) being used in your application. This will create licenses.licx file along with adding references in the solution explorer References tab.
    8 : Rebuild the project. And it should work.

    Note : Also, check the specific control’s dll version in GAC. It should be the same version which you want to use in your application.

    If you need any other help, please let us know.

    Thanks and Regards,
    Prabhat Sharma.
  • Replied 9 September 2019, 2:25 pm EST

    Thank you.
Need extra support?

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

Learn More

Forum Channels