Cannot find license 'Aspose.Total.NET.lic' on Core

Hi.
Have a problem to set the license ‘Aspose.Total.NET.lic’.
We have a common library with Aspose nuget packages, which has static methods to set license, for example:
public static class SetAsposeLicense
{
public static void PdfLicense()
{
Aspose.Pdf.License license = new Aspose.Pdf.License();
license.SetLicense(“Aspose.Total.NET.lic”);
}

When calling the PdfLicense method(maybe Aspose.Cells.License or others) from other libraries, we often get the error: System.IO.FileNotFoundException: Cannot find license ‘Aspose.Total.NET.lic’.

How to fix it?

NET Core 6.0
Aspose version 23+

@PoweRDeaD,

I think you may set the license file’s path explicitly in your code to check if the problem still persists.
Such an exception occurs when Aspose.PDF could not find the license file with the specified name (“Aspose.Total.NET.lic” in your case). Please make sure the license file is there, it should not be renamed. Also, see the document on Licensing for your reference.

If in any case, you still find the issue, kindly do create a standalone sample application (please exclude your license file), zip the project and post us. We will check your issue soon.