Howdy,
We are upgrading .net and our version of Aspose.pdf is throwing an exception when trying to set the license. I saw some threads about there being a fix for the newer versions, but thats not exactly an option right now. Do you know of any work arounds to get the license to set in 20.6.0 with .net8?
@dmerkle1
It seems you’re encountering an issue with setting the license for Aspose.PDF version 20.6.0 while upgrading to .NET 8. Unfortunately, there may not be a direct workaround for this specific version, but here are some general steps you can follow to ensure that the license is set correctly:
-
Initialize the License Object: Make sure you create an instance of the Aspose.Pdf.License
class. This is essential for loading the license.
-
Set the License Path: Specify the correct path to your license file. Ensure that the path is accurate and that the file is accessible by your application.
-
Load the License File: Use the SetLicense
method of the Aspose.Pdf.License
class to load the license file. This method requires the path to the license file as a parameter.
-
Verify the License: After attempting to set the license, it’s a good practice to confirm that it has been applied successfully. You can do this by checking for any exceptions or by outputting a confirmation message.
If you continue to face issues, consider checking the following:
- Ensure that the license file is compatible with the version of Aspose.PDF you are using.
- Look for any updates or patches that might address compatibility issues with .NET 8.
- If possible, consult the Aspose support forum for any similar cases or additional guidance.
If you need more detailed instructions on loading the license, you can refer to the official documentation on how to set the license in Aspose.PDF for .NET.
If you have any further questions or need assistance with specific code examples, feel free to ask!
Is there a work around? Its odd that Word, Powerpoint, and Cell licenses can all be set, but not pdf.
@dmerkle1
.NET 8.0 support was added recently in the API. We are afraid that it is not support in 20.x version of the API which is too old. We recommend that you upgrade the API version to the latest one i.e. 24.9 and see if issue still persists. You can evaluate the latest version with a free 30-days temporary license before upgrading your subscription.
@Professionalize.Discourse
All this you say is the code I already had but there must be some kind of error when upgrading projects to Net 8.
I was using version 21.5.0 and it was all working perfectly.
What is the problem?
@i.salazarcalle
As shared earlier, please upgrade the API version to the latest version because the .NET 8.0 support was added in higher versions of the API. In case issue still persists, please let us know.