ActiveReports 18 .NET Edition
Developers / License ActiveReports / Licensing Compiled Code
In This Topic
    Licensing Compiled Code
    In This Topic

    This section describes how to generate the license for the compiled code or specifically for the applications deployed on Azure Functions application. By default, licensing is applied to your main application. In case ActiveReports is embedded in a custom library, that is called by another application, a "license not found" error is shown. Therefore, you need to generate a license file for the target application.

    For example, there is a 'UserControlLibrary' project with ActiveReports libraries embedded and a 'MainApp' project that references the 'UserControlLibrary'. To generate license for the specified target application, follow these steps:

    1. Open the command line on Windows and change the working directory to:
      C:\ProgramData\MESCIUS\gclm
                      
      
    2. Run the command as:
      gclm.exe "463c4179-288c-48fe-a4df-3b609586667d"  -lc [output dir].gclicx "[entry assembly name].[calling assembly name].dll"
                
      

      For example,
      C:\ProgramData\MESCIUS\gclm>gclm.exe "463c4179-288c-48fe-a4df-3b609586667d" -lc ./.gclicx "MainApp.UserControlLibrary.dll"
                
      

      To license an application on an Azure Functions application, run the following command:
      gclm.exe "463c4179-288c-48fe-a4df-3b609586667d" -lc .\.gclicx Microsoft.Azure.WebJobs.Script.WebHost.[assembly name].dll
              
      

      It generates a .gclicx file in the output directory.
      Note: You must specify the application name while generating a license. Also, the generated license can not be used in other applications with different names.
    3. Copy the .gclicx file and paste it into your application (in this case, UserControlLibrary) where ActiveReports assemblies are used, in any folder.
    4. Change the build action of .gclicx to Embedded Resource.
    5. Add the following line in the .csproj file:

      <PropertyGroup> 
        <DisableGclm>true</DisableGclm>
      </PropertyGroup>
    6. Rebuild the solution and run the project.
      Our control will now be able to lookup license for the 'MainApp' from the 'UserControlLibrary' assembly.
      In case of licensing the application on Azure Functions application, deploy the application on Azure Function.
      • This licensing process requires an internet connection.
      • For the license to apply at runtime, you must call gclm.exe with the target name, for example, 'AppName.PluginLibraryName.dll'.
      • The build action of .gclicx file in the project must set to Embedded Resource.