Question

I'm working on an application that makes extensive use of ComponentOne's C1FlexGrid. Of the dozens we use, three are missing their licenses.licx file and cause the demo splash screen to pop up while I'm starting the application.

Is there any way to determine which forms are causing this behavior. Short of checking hundreds of directories by hand, I don't see a way.

Was it helpful?

Solution

According to Microsoft documentation only the executable assembly requires a licenses.licx. Dll assemblies with forms in them will still create one but it is ignored. This has been my experience as well. I would suggest opening each form in the designer view and rebuilding while in that view. This will usually add any missing license entries to the licenses.licx. It will not, however, update existing entries. This can be a problem if you've updated your components. For ComponentOne, you can usually edit the licenses.licx and remove the version information after the assembly name. Some other third party components are more finicky and touching their version info causes errors when you compile.

In my opinion the .NET licensing framework is cumbersome and an unnecessary burden on developers. There are far easier ways to ensure component licenses are respected.

OTHER TIPS

You don't have to open every form. Each project has a single licenses.licx file. Just make sure the C1FlexGrid is referenced in those files and then do a full rebuild (Build | Rebuild All).

That should take care of the issue.

Sometimes, opening forms and rebuilding whole solution even does not works. So in this situation. Just drag-drop some ComponentOne control from toolbox to your form (you may delete it afterwards). This drag-drop will generate licenses.licx automatically in Properties folder.

ComponentOne has a utility program which will (re)generate the licenses.licx file for an existing project.

Source article: https://www.grapecity.com/blogs/licensing-and-licenses-licx-file-licxgenerator-tool

Instructions:

The LicxGenerator tool

Fortunately [generating the license.licx file] can be automated, and many thanks to our customer Dom Sinclair for inspiration. The [linked below] LicxGenerator tool creates a license.licx file with license information entries for all controls found under a specified path. If you run it, it asks you to browse for the binaries folder and then put the generated file under the same path. If you need more control, you can run it with command line options. You can also run it with other automated tasks.

Usage:

LicxGenerator [-r] [-p prefix] [-s] [sourcePath] [outputPath]

Parameters:

  • -r : For recursive search in subfolders;

  • -p : Only search in files which names start from the specified prefix;

  • -s : Silent mode.

If both sourcePath and -s parameter are not set, the utility will show the folder selection dialog. If the outputPath is not set, it will be the same as sourcePath value.

To generate licenses.licx file for your project:

  1. Build your project first, so that output folder contains all binaries;

  2. Run LicxGenerator with path to the project output folder;

  3. Take generated license.licx file and add it to the project.

This free tool will save you a lot of time on digging into licensing issues.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top