Dotnet build license nag screen

Posted by: couturethierry on 13 January 2021, 10:30 pm EST

    • Post Options:
    • Link

    Posted 13 January 2021, 10:30 pm EST

    Hello,

    I am migrating my WPF app from .NET Framework to .NET 5.

    I have a licenses.licx file.

    Everything is working fine when I build my WPF app from within Visual Studio (Build>Rebuild Solution): I have no license nag screen when I run my app.

    Now I need to build my app from command line: dotnet build

    When I do that, I have an issue with LC.exe, this issue is explained here: https://github.com/dotnet/winforms/issues/1462

    So, I tried the workaround detailed here: https://github.com/dotnet/winforms/issues/1462#issuecomment-672640520

    I found the compiled *.licx file in the obj folder: *.dll.licenses, then I removed the *.licx file from my project and added the *.dll.licenses as an EmbeddedResource.

    The dotnet build command now runs successfully, but when I run my app, the license nag screen is displaying.

    I also tried to compile the *.licx file to obtain my *.licenses file from command line, but the result is the same: https://docs.microsoft.com/fr-fr/dotnet/framework/tools/lc-exe-license-compiler

    I need to build my app (.NET 5) from command line and make the C1 license working. How can I achieve that?

    Thank you,

    Thierry

  • Posted 14 January 2021, 10:12 pm EST

    Hi Thierry,

    Microsoft has discontinued the ‘licences.licx’ approach for newer platforms (.NET Core). Therefore, if possible you may use C1 controls from Nuget package which uses a build-time license validation model and generates a ‘.gclicx’ file instead of ‘licenses.licx’ file. You can find C1 nuget packages for WPF by name ‘C1.Xaml.WPF.*’

    Just in case required, I have attached a sample for reference. (see LicenseTest.zip)

    Please refer here for more information regarding the new licensing model:

    https://www.grapecity.com/blogs/componentone-2020-v2-licensing-updates

    Regards,

    Kartik

  • Posted 14 January 2021, 10:12 pm EST

  • Posted 26 January 2021, 12:44 am EST

    Thank you for your answer.

    Unfortunatly my licence is old (C1 2014), and it seems that this version is not available from Nuget.

    But I was finally able to build my .NET 5 app without license issue using the last version of MSbuild, just like before my migration to .NET 5.

  • Posted 26 January 2021, 3:42 pm EST

    Hi Thierry,

    I am happy to hear that your issue has been resolved.

    Regards,

    Kartik

Need extra support?

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

Learn More

Forum Channels