Skip to main content Skip to footer

A Step Ahead: Troubleshooting Common Errors - Part II

In Part I of this series, we talked about a few common errors that anyone can face while using WinForms components. Now is the time to add some more scenarios to them.

Error 1 Unable to resolve type 'C1.Win.C1Ribbon.C1Ribbon, C1.Win.C1Ribbon.4, Version=4.0.20151.38, Culture=neutral, PublicKeyToken=79882d576c6336da'

This error usually occurs when there is an entry of a C1 assembly in the licenses.licx file of the project, however the reference to the same assembly has not been added in the project. img_UnableToResolve Solution
Add the reference to the assembly mentioned in the error message (C1.Win.C1Ribbon.4, in this case) in the project and rebuild the solution. The problem should be resolved.

LC.EXE exited with code -1

This error generally occurs because a file is exclusively held open somewhere else and Visual Studio cannot update or even check the file. When updating version of controls, please close all Visual Studio instances in which the DLLs might have been used. Generally, any time any VS instance (any VS project) has the Form designer open, there can be problems when switching versions or updating versions. Also note that this issue does not seem specific to C1 controls. A control's licensing is very passive; it just has methods that the IDE / LC.exe call. If your machine is really locked down from a security point of view, there could be problems but not likely during design time and compile time, since Visual Studio requests FULL TRUST during these times. Solution 1

  1. Delete the existing C1 controls from the Toolbox.
  2. Delete the existing Licenses.licx file.
  3. Delete all C1 references.
  4. Add a new Form to your project.
  5. Drag and drop all the C1 controls onto this new Form. This should create a new Licenses.licx file with the correct entries.
  6. Re-build the solution.

Or,

  1. Close all the Form designers.
  2. Delete the license.licx file.
  3. Open the Form designer again.

Solution 2
Set CopyLocal property of all C1 assemblies to true.

Update to another Version or License of C1Studio

If you wish to upgrade your C1 assemblies to the latest licensed or available version and update all the existing projects, there are two utilities available: C1Live and c1ProjectUpdater. ComponentOne Studio Live (C1Live) is an update utility that searches and installs the latest version of ComponentOne assemblies. C1Live gets just the control assemblies (.dll) from a special server and the associated XML documentation files which contain property descriptions for Visual Studio. After upgrading to the latest licensed or available version, now is the time to update all the existing projects. You can use C1ProjectUpdater Utility to update existing C# and VB projects by removing all specific version information for ComponentOne assemblies from the licenses.licx file and the .csproj and .vbproj files. This allows the project to use any suitable version of ComponentOne assemblies for the updated project. The utility can update WinForms, ASP.NET, WPF and Silverlight projects. If you have ever faced any such error, please post your comments here. We would like to add that too :)

MESCIUS inc.

comments powered by Disqus