Skip to main content Skip to footer

Troubleshooting the LC.EXE Error Message

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.