When working with ComponentOne .NET Framework WinForms, WPF, or ASP.NET MVC controls in your application, you may come across a licensing prompt/nag that states you are using the evaluation version even though you have activated a valid license on your machine. In this blog, we will guide you through some common solutions to solve this annoying problem.
During your 30-day free trial, this is expected. But after you activated your key - you expected this to go away. At this point in time, you will scratch your head and start thinking about what you have done wrong.
The ComponentOne .NET Framework controls, Visual Studio, and the assembly on your machine all work together through a file called Licenses.licx. You may have never seen this file if you're new to using third-party controls. If you're working on a pre-existing project, it may be hiding in your Solution Explorer underneath the Project Name-> Properties-> Licenses.licx.
If you drag-drop our Winforms components out of your Visual Studio toolbox to Form designer, for example, the FlexGrid, then the Licenses.licx file would get created automatically with the entry like given below:
C1.Win.C1FlexGrid.C1FlexGrid, C1.Win.C1FlexGrid.4, Version=4.0.20222.566, Culture=neutral, PublicKeyToken=79882d576c6336da
Each of these five fields gets added to the file, but we are interested in only the following two entries:
The first field in this entry is Namespace.Class and the second entry is for the dll name. For each ComponentOne control used in the project, the same pattern will be followed for the entries in the Licenses.licx file. In the case of FlexGrid, the Namespace is C1.Win.C1FlexGrid, the class in the FlexGrid you are using is C1FlexGrid, and the DLL where all of this is coming from is C1.Win.C1FlexGrid.4.
But sometimes, you don’t create a control by dragging from the toolbox. You might instantiate in code or XAML. In these cases, Visual Studio is unaware that you are using a 3rd party control within your project. Therefore, you need to take matters into your own hands and create a Licenses.licx file yourself with an entry like below for each control being referenced.
You can also create the licenses.licx file yourself. Right-click on your project -> Add -> New Item will bring up the screen below. Create a new text file and name it licenses.licx (ensure there isn’t a txt extension).
You can also use the GrapeCity utility in the Visual Studio Tools menu to update the entries of the Licenses.licx file automatically.
As technology changes daily, and Microsoft released their latest .NET 6 LTA version last year, we are also constantly updating our control library to work with the latest .NET version. Starting with 2020 v2, GrapeCity issues a new 19-digit serial key and a new licensing scheme in which the new .gclicx file is required to license the project. You may get additional information about the same on this blog, where we will review a few scenarios when you could run into licensing problems with their potential solutions.
“License for ComponentOne WinForms Edition is not found. You must activate a license to continue.”
This problem happens when the system where you are using the ComponentOne controls is not licensed. To fix it, click "Activate or Deactivate a Serial Key" in the nag window. This will open the GrapeCity License Manager, where you can activate your license. This doc link has more information about how to license the machine.
“Your ComponentOne WinForms Edition license is expired or invalid.”
This issue occurs when the license activated on your system is of the older version, and it is not valid to use the control version that you are trying to use in your project. So, in this scenario, either you can downgrade your ComponentOne controls version, which is valid with your license via the ComponentOneControlPanel utility, or go for the latest version license and activate it on your system.
To purchase a new license, you can contact the Sales team on the information listed below and check out the product pricing here.
Tel: 1.800.858.2739 | 412.681.4343
“No license for ComponentOne WinForms Edition is found. Program execution is terminated.”
When working with ComponentOne controls in the .NET 6 application, the license file (.gclicx) is automatically created when the project is built. However, when working with the .NET framework application, this kind of nag screen can appear if the license file is missing from the project. To fix it, you need to generate the run time license (.gclicx) file as suggested here.
The issue occurs because of the change in licensing model, and as 2.0/4.0 FW controls are in maintenance mode, so they do not follow the new licensing model. For this, you need to first generate the old 27-digit serial key as suggested here and update the Licenses.licx file entries as suggested in the first section of this blog link.
Note: New features and bug fixes will only be included in FW 4.8, FW 4.5.2, and .NET 6 controls. Thus upgrading is highly advised. To upgrade to FW 4.8 controls, visit the following blog post here.
.NET permits the creation of user controls and class libraries, which are reusable components that may be produced in one project and used in other projects. With the change in the licensing model, the licensing of the user controls has also been modified. Here's a link to its documentation where you can learn how to license the user control.
If you have any questions or are still having nag screen issues, don't hesitate to ask; they will be happy to help resolve any issues you are experiencing.
Please leave any questions in the comments section below. Happy coding!