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:
-
Remove all versions of C1 assemblies from your computer and install just the latest one. Then update your project references to this particular version. This should fix all issues by replacing the assemblies in your GAC and Toolbox.
-
Update the items in your Toolbox to the latest version installed on the machine.
-
Change the referenced assemblies in your project to match the ones in your Toolbox.