Licenses.licx error on build in netstandard2.0-windows

Posted by: gerardo on 25 June 2024, 9:40 am EST

    • Post Options:
    • Link

    Posted 25 June 2024, 9:40 am EST

    Hi, I’ve just create a new library type project targeting netstandard2.0-windows ( existing code will be migrated from .net47 to .net8)

    The problem is, compiling the following licenses.licx produces errors in both lines. Here is the licenses.licx content

    what’s causing the licenses.licx build to fail?

    GrapeCity.ActiveReports.SectionReport, MESCIUS.ActiveReports
    GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport, MESCIUS.ActiveReports.Export.Pdf

    line 1 produces this error:

    Error (active)	LC0004	Exception occurred creating type 'GrapeCity.ActiveReports.SectionReport, MESCIUS.ActiveReports, Version=18.0.0.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff' System.TypeInitializationException: The type initializer for 'GrapeCity.ActiveReports.Configuration.SettingsExtensions' threw an exception. 
    ---> System.TypeInitializationException: The type initializer for 'GrapeCity.ActiveReports.Configuration.DefaultConfigurationProvider' threw an exception. 
    ---> System.BadImageFormatException: Could not load file or assembly 'file:///C:\Users\XXXXXXXXX\.nuget\packages\microsoft.win32.registry\5.0.0\ref\netstandard2.0\Microsoft.Win32.Registry.dll' 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) 
    ---> System.BadImageFormatException: Cannot load a reference assembly for execution.	ReportsLibrary2015	C:\repos\core\SVC\SRV\Print\Reports Library2015\Properties\licenses.licx	1

    line 2 produces this error:

    
    Error (active)	LC0003	Unable to resolve type 'GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport, MESCIUS.ActiveReports.Export.Pdf'	ReportsLibrary2015	C:\repos\core\SVC\SRV\Print\Reports Library2015\Properties\licenses.licx	2	

  • Posted 25 June 2024, 7:26 pm EST

    Hi Gerardo,

    Could you please try and use the ActiveReports File Converter tool and see if that fixes the issue? Please refer to the following steps:

    1. Open the project in Visual Studio 2022.
    2. Go to **Tools>Convert To ActiveReports 18**.
    

    Once the conversion is done, try to clean and rebuild the application, and then run it.

    Although if you are building a class library (.dll) project, you’ll need to license your application using a ‘.gclicx’ license file. You can learn more about generating a ‘.gclicx’ license file here: Licensing Compiled Code.

    Please make sure to delete the ‘licenses.licx’ file in this case, as we are licensing the project using the ‘.gclicx’ license file.

    If the issue persists, please try sharing a sample stripped-down application replicating the issue so we can test it on our end and further investigate it.

Need extra support?

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

Learn More

Forum Channels