I have a license for Aspose.Total for .NET. I have the license file as an embedded resource in my visual studio project. I am able to set the license for PDF, Cells, Slides, Words, but it fails to find the license when I try to set it for Aspose.Barcode. This with version 18.7.0.0.
Any help would be appreciated. Thanks!
@jcapell,
Can you please share the exception details you see?
exception message
“Failed to set license. Details: Cannot find license ‘DocumentTest.Aspose.Total.lic’.”
exception stack trace
" at Aspose.BarCode.License.SetLicense(String licenseName)\r\n at DocumentTest.Program.Main(String[] args) in C:\Users\jcapell\Documents\Visual Studio 2017\Projects\DocumentStampTest\DocumentTest\Program.cs:line 20"
@jcapell,
We have managed to reproduce this issue with Aspose.BarCode for .NET API. Your thread will be linked to the appropriate issue (BARCODENET-36946) and you will also be notified via this thread as soon as this issue will be resolved. Sorry for the inconvenience.
As a workaround, please try using the following code:
var assembly = Assembly.GetExecutingAssembly();
var resourceName = "SomeNameSpace.LicenseFile.lic";
using (Stream stream = assembly.GetManifestResourceStream(resourceName))
{
Aspose.BarCode.License lic = new Aspose.BarCode.License();
lic.SetLicense(stream);
Console.WriteLine(lic.IsLicensed);
}
Thank you for the workaround. It appears to be working.
@jcapell,
The issue has also been fixed and will be included in the next release of Aspose.BarCode for .NET. You will be notified as soon as the release is published.
The issues you have found earlier (filed as BARCODENET-36946) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by muhammadahmad