Aspose.Imaging license not working in release mode

Hi there,

I am having problems loading license for Aspose.Imaging. When compiling my project in debug mode, the license loaded without any problems, but when I change it to release mode, it crashes. however, if I load Aspose.Pdf license and set Embeded=true, then it works in both release and debug mode.

I have a sample project but there isn’t any option for me to upload

@yydmay,

I have observed your comments. Can you please share source files along with environment details and version of Aspose.Imaging you are using on your end so that we may further investigate to help you out.

I can’t find an option to upload source, here is the link to download, I use Aspose.Imaging 18.6, I wiped out contents in license file, you’ll have to put a valid file in.

https://www.dropbox.com/s/4pqjzq38shxhski/AsposeTest.zip?dl=0

@yydmay,

I have worked with source file shared by you and have been able to observe issue. An issue with ID IMAGINGNET-3061 has been created in our issue tracking system to investigate the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be fixed.

@yydmay,

Can you please, do following corrections in your code to avoid method inlining in Release mode and share feedback with us if there is still an issue.

[MethodImplAttribute(MethodImplOptions.NoInlining)]
public void SetupLicense()
{
Aspose.Imaging.License imgLic = new Aspose.Imaging.License();
imgLic.SetLicense(“AsposeTestLib.Aspose.Total.lic”);
Aspose.Pdf.License pdfLic = new Aspose.Pdf.License();
pdfLic.SetLicense(“AsposeTestLib.Aspose.Total.lic”);
pdfLic.Embedded = true;
}