Hi,
Ihave a strange problem: When compiling my project in debug mode, the embedded license gets loaded without any problems (in Application_Start). However, as soon as I compile in Release mode, I get an “Cannot find license ‘Aspose.Cells.lic’” error (System.IO.FileNotFoundException).
If I copy the license file into the directory where the dll resides, it’s working in release mode.
Are there any special considerations when compiling in release mode and using embedded resources?
Hi,
As stated in my initial post, this is about the licence file as embedded resource. When I put the file on disk, I don’t have any problem. But when included as embedded resource, it works when compiled in debug mode, but not when compiled in release mode.
Is there anything different about the license checking when compiling in release mode?
I already tried with v7.3.1.
Hi,
I included the license as described on one of your pages, by setting the build action to “Embedded Resource”.
I then retrieved the name of the resource by listing all the names of all resources like this (LinqPad):
Assembly myAssemblyList = Assembly.LoadFile(@“d:\pathTo\MySite.dll”);
string[] myResources = myAssemblyList.GetManifestResourceNames();
foreach (string resource in myResources) {
resource.Dump();
}
The name of the resource is “MySite.Aspose.Cells.lic”. When I use that as value for .SetLicense, I encounter the same issue as before: works when compiling in debug, does not work when compiling in release.
Hi,
Hi,
Please download and try the latest version:
Aspose.Cells
for .NET v7.3.2.4
and let us know your run results.
Please provide us sample project and screenshot(s) illustrating how to replicating your issue at our end.
We will look into it and log it in our database if we noticed any problem.
The solution of unchecking the “Optimize code” checkbox (Properties -> Build Tab) worked for me as well in my VS 2015, .NET 4.6 Class Library.
Hi,
Thanks for sharing the solution and using Aspose.Cells.
We provide different types of Aspose.Cells like the one compiled on .NET 2.0, .NET 3.5 and .NET ClientProfile etc. Mostly .NET 2.0 can be used for any .NET Framework greater than 2.0 and if you are using .NET 4.6 then you can also use .NET 3.5 too.