Error when building .net8 console app with licenses.licx

Posted by: gerardo on 14 November 2024, 7:48 pm EST

    • Post Options:
    • Link

    Posted 14 November 2024, 7:48 pm EST - Updated 14 November 2024, 7:50 pm EST

    Hello,

    I have upgraded a console app from .net framework 4.7 to .net8

    The project includes a licenses.licx. When the file is empty the project is build successfuly (using VS2022) but as soon the file has the same content it had when compiled for .net framework a compile time error occurs.

    Below is the license.licx content and the error produced:

    GrapeCity.ActiveReports.SectionReport, MESCIUS.ActiveReports
    GrapeCity.ActiveReports.PageReport, MESCIUS.ActiveReports
    Severity	Code	Description	Project	File	Line	Suppression State
    Error (active)	LC0000	'Could not load file or assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Reference assemblies should not be loaded for execution.  They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058)'	PrintJobProcessor	E:\source\PrintJobProcessor\LC	1	

    I have removed the file and the content back and forth several times so I’m sure this is causing such error, what is the cause? or better what is the proper way to license such command line app?

  • Posted 18 November 2024, 4:03 am EST

    Hi Gerardo,

    There seems to be some issue related to a version mismatch. Please use the ActiveReports File Converter tool (from the Visual Studio Tools menu, select Convert to ActiveReports 18), and it will update all the required dependencies and not cause a difference between versions.

    Along with that, you may also try to remove the licenses.licx file from your project and add a new Section Report object to the project (.rpx). For that, right-click your project in Solution Explorer and go to Add > New Item > ActiveReports 18 Standalone Report > Section > Finish. After that, clean and rebuild the project to see if it helps.

    If the issue still persists, please share with us your sample stripped-down application so that we may investigate further and get back to you accordingly.

  • Posted 19 November 2024, 1:07 pm EST

    adding a new Section report worked, thanks

Need extra support?

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

Learn More

Forum Channels