Licensing | ComponentOne
Additional Licensing Scenarios / License User Controls
In This Topic
    License User Controls
    In This Topic

    .NET allows you to create a user control or class library, reusable components which can be created in one project and can be used again in other projects.

    In order to properly license the final application, the user control (or class library) needs to be licensed as well. See licensing solutions below.

    Signing User Control with Strong Key

    If a user control or control assembly is signed with the same SN Key (strong key) as the calling application, then a valid application license is accepted by the user control.

    You can sign the user control and your main, calling application with the same strong name key file in Visual Studio through the Signing tab of the project properties.

    ComponentOne Licensing signing user control

    Generate Run-Time License for User Control

    If a strong name key solution will not work, you can manually generate a run-time license for the user control. This can be done through the MESCIUS Visual Studio menu, or by command line.

    Generate a Run-Time License through Visual Studio

    In Visual Studio select Tools > MESCIUS > License Manager > Create Run-time License.

    1. Select "Custom" project name
    2. Under App Name, enter the full file name of your user control including the known application name. For example MyApplication.MyUserControl.dll. The App Name may or may not include the file extension.
    3. Select a location to save the run-time license. The location does not matter because you will later add the file to your user control project.
    4. Under Serial Key Type, select your licensed product.
    5. Click Generate.

    This will generate a run-time license file (.gclicx) at the location you specified. Locate the generated .gclicx file and add the file to your Properties folder of the user control project, and set its BuildAction to EmbeddedResource.

    Generate a Run-Time License through Command Line

    The runtime license can be generated by command line:

    Add the generated .gclicx file to your Properties folder of the project, and set its BuildAction to EmbeddedResource.

    Notes:
    -[app-name] refers to the name of your application
    -[library-name] refers to the name of your user control or class library
    -[product-id] refers to the unique ComponentOne product ID. To find the list of product ids, see Activation by Command Line.

    For example, if you have an activated license for ComponentOne Studio Enterprise, your user control was named MyUserControl.dll and your application was MyApplication.exe, the Windows command line would be:

    • C:\ProgramData\GrapeCity\gclm\gclm.exe "331cf6cd-b73c-429f-ba79-fa2f85eebd68" -lc ./.gclicx "MyApplication.MyUserControl.dll"

    Licensing a User Control for an Unknown Application

    Licensing a user control or class library with a standard developer license as demonstrated above requires that the application name is known. If the application name is unknown, and you cannot use a strong named key, you may request a special plugin license. Please contact our sales or support team for more information.

    Generate a Run-Time License through Command Line

    With an activated plugin developer license you can generate a run-time license file by command line using the just the user control library name:

    Notes:
    -[library-name] refers to the name of your user control or class library
    -[product-id] refers to the unique ComponentOne product ID. To find the list of product ids, see Activation by Command Line.

    For example, if you have an activated license for ComponentOne Studio Enterprise, your user control was named MyUserControl.dll, the Windows command line would be:

    • C:\ProgramData\GrapeCity\gclm\gclm.exe "331cf6cd-b73c-429f-ba79-fa2f85eebd68" -lc ./.gclicx MyUserControl.dll

    Generate a Run-Time License through Visual Studio

    In Visual Studio select Tools > MESCIUS > License Manager > Create Run-time License.

    1. Select "Custom" project name
    2. Under App Name, enter the full file name of your user control library. For example MyUserControl.dll.
    3. Select a location to save the run-time license. The location does not matter because you will later add the file to your user control project.
    4. Under Serial Key Type, select your Plugin licensed product.
    5. Click Generate.