Recently we updated Aspose PDF library(dll) from version 23.12 to 24.9 . I have taken dll from the zip folder -Aspose.PDF.24.9.net40.
and when I build, published and run my application, it is throwing exception saying " The type initializer for Module threw an exception"
If I revert back to the old library (23.12), it runs without any issue, how can I solve it for newer version of dll(24.9) We have licensed user and have valid latest license for the above.
Target version of our product is .Net Framework 4.8
support screenshot.png (16.8 KB)
The same we were using for earlier versions(say 23.12) of Aspose PDF dll.
@IqviaPal
Framework 4.8 support is discontinued in the latest versions. You can get a DLL with 4.8 support here.
Download .NET Component DLL to Process PDF | Aspose.PDF API…
Please note the warning (underlined on the screenshot).
I have downloaded the DLL from your mentioned path for the, .Net 4.8 Target version, and from the zip file extracted, I selected Aspose.PDF.dll from the folder, …\Bin\net4.8.1 and with the latest license for the same I included that in my application, but when I build the proect, getting the below compilation errors,
image.png (59.2 KB)
I have all those references in my project and
how to resolve it and use the dll in my project,
@IqviaPal
The downloaded archive has the name Aspose.PDF.24.9.net40.zip
, in its bin folder there is only the net4.0
folder - from it you should take the dll.
Yes, that I tried and able to compile the code, but when I run the application, exception got triggered for that, as shown below (that was my original post earlier)
image.png (7.9 KB)
Only if I use and compile with old version(23.12), it works without any issue.
not able to resolve it, can you help me to fix it
@IqviaPal
Could you attach a console application and a document with which this occurs? Based on the provided screenshot, it can be assumed that this error occurs when opening a pdf document.