[]
.NET allows you to create user controls and class libraries—reusable components that can be built in one project and used by other applications.
When a ComponentOne control is used inside a user control or class library, the final application must still be properly licensed. In some scenarios, the user control or library itself must also be licensed to ensure the application runs without licensing errors.
This topic explains the supported approaches.
Use the table below to determine which method applies to your scenario:
Scenario | Recommended Approach |
|---|---|
User control is always used by a known application | Strong-name signing |
Application name is known at build time | Generate a runtime license for the user control |
Application name is unknown (plugin scenario) | Plugin license |
If the user control (or class library) is signed with the same strong-name key as the calling application:
The application’s runtime license can be accepted by the user control
No separate runtime license file is required for the control
The same ComponentOne product licenses must be valid for both projects
In Visual Studio:
Open Project Properties for the user control project.
Open Project Properties for the main application project.
On the Signing tab, configure both projects to use the same strong-name key file.
This approach is recommended when the user control is always deployed with a known application.
If strong-name signing is not possible, you can generate a runtime license file specifically for the user control.
In Visual Studio, select
Tools > MESCIUS > License Manager > Create Run-time License
Select Custom as the project type.
Under App Name, enter the full file name that combines:
The application name
The user control or library name
Example:
MyApplication.MyUserControl.dll
Select any output location (you will move the file afterward).
Under Serial Key Type, select the licensed product.
Click Generate.
A runtime license file (for example, .gclicx) is generated.
Add the file to the Properties folder of the user control project and set its Build Action to Embedded Resource.
# Windows
C:\ProgramData\GrapeCity\gclm\gclm.exe "<product-id>" -lc ./.gclicx "app-name.library-name.dll"
# Linux / macOS
gclm "<product-id>" -lc ./.gclicx "app-name.library-name.dll"Where:
app-name is the application name
library-name is the user control or class library name
product-id is the ComponentOne product ID
Example:
C:\ProgramData\GrapeCity\gclm\gclm.exe "331cf6cd-b73c-429f-ba79-fa2f85eebd68" -lc ./.gclicx "MyApplication.MyUserControl.dll"If the user control or class library will be used by unknown or third-party applications, and:
The application name is not known at build time, and
Strong-name signing cannot be used
Then a plugin license is required.
With an activated plugin license, generate a runtime license using only the library name.
# Windows
C:\ProgramData\GrapeCity\gclm\gclm.exe "<product-id>" -lc ./.gclicx "MyUserControl.dll"
# Linux / macOS
gclm "<product-id>" -lc ./.gclicx "MyUserControl.dll"Select Tools > MESCIUS > License Manager > Create Run-time License
Select Custom
Under App Name, enter the user control library name (for example, MyUserControl.dll)
Select the Plugin licensed product
Generate the license and embed it as a resource
To obtain a plugin license, contact our support team.
Some legacy workflows use older licensing tools. These scenarios are documented separately to avoid confusion with modern licensing flows.