ActiveReport 16.3.1 - License error: it was built without a license for Section

Posted by: kostin.vyacheslav on 16 November 2022, 4:46 am EST

    • Post Options:
    • Link

    Posted 16 November 2022, 4:46 am EST - Updated 16 November 2022, 7:32 am EST

    The code was written with ActiveReport 16.2 (PRO) and used in .Net Core 6.0 WebAPI call - it works fine without any licensing files. The code resides in a BusinessLogic.Services.dll

    Now I upgraded to 16.3.1 and wrote an XUnit test. Got this error: “This application will be terminated because it was built without a license for the SectionReport”

    • I tried including licenses.licx file - same error
    • I tried this: C:\ProgramData\GrapeCity\gclm\gclm.exe “5e0b5f44-1a6b-4aff-a007-17b9224bca83” -lc ./license.gclicx “LifePlus.Gateway.Commissions.IntegrationTest.dll”

      I tried to put generated file as “Always copy” - same error

      I tried to include that file as EmbeddedResource - same error
    • I tried to add above command as post-build event - same error

    I was able to reproduce this issue on a different PC (also licensed for AR 16 PRO)- works fine when called from Web API, fails from the test.


    Steps to reproduce:

    I created a Console app and copy-pasted this code - it run without issues, no license file needed.

    I added a xUnit test project to that console app and copy pasted my code - license error. Even with generated license.gclicx


    nUnit and MStest throws same error

    I attached that VS2022 solution - test project throws license error. Even with connection strings removed

    using var report = new SectionReport();
    var path ="Adjustment.rpx";
    report.Run(); // Exception is thrown here

  • Posted 16 November 2022, 10:33 pm EST

    Hello Vyacheslav,

    For running a Unit Test in .Net Core, please use the following command to generate a license .gclicx file:

    C:\ProgramData\GrapeCity\gclm\gclm.exe "[AR GUID]" -lc "[output dir]/.gclicx" "testhost.[executing assembly name].dll"

    Then, Copy the “.gclicx” file and paste it into your project, in any folder and change the Build Action property for the “.gclicx” file to Embedded Resource. Now, rebuild the solution and run the project.

    For the attached sample I used this specific command to generate the gclicx license file:

    C:\ProgramData\GrapeCity\gclm>gclm.exe "5e0b5f44-1a6b-4aff-a007-17b9224bca83" -lc ./newLicense.gclicx "testhost.TestProject.dll"

    And attached it as mentioned above. The test then ran successfully.

    For .Net Framework, the command to generate the .gclicx file would be:

    C:\ProgramData\GrapeCity\gclm>gclm.exe "5e0b5f44-1a6b-4aff-a007-17b9224bca83" -lc ./newLicense.gclicx "TestProject.dll"
  • Posted 17 November 2022, 8:22 am EST

    That worked. Thanks

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels