Setting a License

I am trying to set my Aspose.Cells license. I have added it to the solution and changed the Build Action to Embedded Resource. I then included the following code to my project:

Aspose.Cells.License license = new Aspose.Cells.License();

license.SetLicense("Aspose.Cells.lic");

I get the following error when I run the application: FileNotFoundException: Cannot find license 'Aspose.Cells.lic'. Why is it looking for the file if I added it as a embedded resource?

Hi,

Thanks for considering Aspose.

Please make sure that you have added the valid "Aspose.Cells.lic" file into project using Add | Add Existing Item option by right-clicking on solution explorer and then select the file and set the Build Action as Embedded Resources.

Please check for reference:

If you still find any problem, do post your license file here, we will check it soon.

Thank you.