Many a times we get customers’ issues asking for the resolution of some design, assemblies and license related problems. Lets discuss few common scenarios and their solutions here which would help in times when you face these issues.
Sometimes after upgrading your WinForms projects containing ComponentOne controls you may get this error. It occurs because there still exists a reference to an older version of a C1 control (for example, C1Ribbon here) in the project. 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.
Solution 2
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 have changed the versions of Studio for WinForms assemblies you may have encountered this exception. It is caused when you have referenced C1 assemblies in your project versioned different than the ones in your Toolbox. E.g Your project references 2014 V1 while in your toolbox you have 2015 V1. When you drag an item from the Toolbox Visual Studio automatically attempts to add references to your project needed for the dragged component. However, since you already have this assembly referenced, but with different version, exception is thrown. Solution First thing first, you should know what versions are your assemblies. To see the version of the items in the Visual Studio Toolbox, move your mouse over any control of Studio for WinForms and a tool tip with the version information will appear. To get the version of your referenced assemblies you should expand the References of your project, click any dll and press F4, this will display the property window which contains information about the version of the file. Basically you need to make both versions of the assemblies match. To do the same, there are a few options:
After you update to a new version of the Studio for WinForms, you start seeing C1 controls in the component tray and you are not able to select them on the Form. Otherwise, you see errors as in the image below wherein, clicking 'Ignore and Continue' option removes all controls from the Form. Solution 1 The design-time layouts of WinForms controls are implemented in their Design dlls. If the WinForms suite is installed on the machine using the installer, these assemblies are automatically installed in the Global Assemly Cache. If you upgrade your controls using C1Live, then also the Design dlls are placed correctly in GAC. However, if you decide to upgrade assembly references manually by downloading the files that contains assemblies only, please be aware that these two approaches do not install the Design assembly in your GAC automatically. So, to resolve this case, you should simply install the Design dlls manually in your GAC. These Design dlls are shipped with every release build of WinForms assemblies which you might have downloaded. If this still does not resolve the issue, please make sure that all references to C1 assemblies point to the latest version installed on the machine. Solution 2 Just copy the same version of Design dll which you are using in the application, to folder where Visual Studio "devenv.exe" file exists. E.g. For VS.2010 --> C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE Close and open Visual Studio then. The issue will be resolved. For more tips on such issues, stay tuned...Blogs :)