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.LoadLayout(path); report.Run(); // Exception is thrown here