Free Support Forum - aspose.com

System.InvalidOperationException Cannot find resource


#1

The license is correct and the code as well, the PATH is ok as it was working fine, it stops working and gives this error in the debugger

Exception: Exception thrown: ‘System.InvalidOperationException’ in Aspose.PDF.dll (“Cannot find resource ‘Aspose.Pdf.PP-TrackMaker…Aspose.Pdf.lic’.”). Exception thrown: ‘System.InvalidOperationException’ in Aspose.PDF.dll (“Cannot find resource ‘Aspose.Pdf.PP-TrackMaker…\Aspose.Pdf.lic’.”) 0.10s [10948]

NOTE: If I open the Project Solution on Visual Studio 2017, it works, but no on 2015. however, it was working before on 2015
Please help
CODE HERE:
public partial class MainForm : Form
{
string asposeLicFile = Path.Combine( “…\…\app_data\Aspose.Pdf.lic”);
public MainForm()
{
Aspose.Pdf.License aspLic = new Aspose.Pdf.License();
aspLic.Embedded = true;
aspLic.SetLicense(asposeLicFile); <----- ERROR OCURRS HERE, BUT CODE KEEPS RUNNING


#2

@eceballos

Thank you for contacting support.

You may try to specify full path to license file in SetLicense method or use other approaches for setting the license as explained in Licensing. Please ensure using latest version of Aspose.PDF for .NET in your environment.

In case the issue persists then share a narrowed down sample application with us so that we may try to reproduce and investigate it.


#3

Hi, as far as the Path, yes I had tried straight path C:\temp\Aspose.Pdf.lic
The error as you can see is not an I/O (the file is found) the error is in the:
Aspose.PDF.dll (“Cannot find resource ‘Aspose.Pdf.PP-TrackMaker…\Aspose.Pdf.lic’.”)
Denoted a resource
In other words, I don’t get a File Not Found Error, in fact, the Code runs and only when I tried to use the Aspose to do anything I won’t get it to run
NOTE AGAIN: It has been running fine but stopped working without me doing anything new or even open the project
ALSO: if I open the project AS IS on Visual Studio 2017, it runs Fine without error…

Thank you again


#4

@eceballos

Would you please share narrowed down sample application with us so that we may try to reproduce and investigate it in our environment.


#5

This is Resolved, Id figure out is a setting in VS2015 , I’d imported the settings from my other instance PC and worked fine


#6

@eceballos

Thank you for your kind feedback.

We are glad to know that your problem has been resolved. Please keep using our API and in event of any further query, feel free to ask.