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