System.IO.FileNotFoundException: Cannot find license 'Aspose.Total.lic'

Hi Support Team,

I am working on a Microsoft Windows Forms application with Visual Studio 2010.
I encountered the following error message during the use of my application : "System.IO.FileNotFoundException: Cannot find license 'Aspose.Total.lic'".
I am using Aspose.Total.lic version=2.1.
This error message appears only when I build my application in Release with VS 2010.
I have no error message with the Debug version of VS 2010.
See the screenshot attached.

Could you please help me ?

Thanks in advance.

Hi Ardian,

The reason is that license file is not present at your specified location when you build the application in release mode. You can try one of the following solutions.

Place license inside release folder.

or

Provide complete physical path to Aspose.Total.lic file in the SetLicense method.

or

Load your license file in a stream and then pass that stream to SetLicense method.

or

Set license as an embedded resource.

Please share your application in case you still see any issue.

Best Regards,