Error: No function was found with the name SetLogEvent with error code (127)

No function was found with the name SetLogEvent with error code (127)

The SetLogEvent mentioned in the error message refers to a method in the IronPDF library that failed to execute, resulting in this exception.

Possible Cause

This exception typically occurs when users upgrade the version of IronPdf.Slim in their project without updating its dependency packages, particularly IronPdf.Native.Chrome.Windows or IronPdf.Native.Chrome.Linux (for Linux-based systems). This version mismatch can lead to compatibility issues, resulting in the runtime error message mentioned above.

Solution

To avoid this issue, it is recommended to uninstall the old version of IronPDF via the NuGet Package Manager before installing the new version. This ensures that all remnants of the previous package are removed, preventing potential conflicts. Additionally, this approach will automatically update all dependency packages to versions compatible with the new IronPDF version.

Alternatively, if you are only using the IronPdf.Slim package, you can include the following code in your project:

IronPdf.Installation.AutomaticallyDownloadNativeBinaries = true;
IronPdf.Installation.AutomaticallyDownloadNativeBinaries = true;
IronPdf.Installation.AutomaticallyDownloadNativeBinaries = True
VB   C#

This code will automatically download the compatible versions of the dependency packages the first time your project runs. Once downloaded, they won't need to be downloaded again unless the session is restarted or completely reset.

For more information on compatible versions of IronPDF dependencies, refer to the NuGet pages for IronPdf and IronPdf.Slim.

If you need further assistance, please submit an Engineering Request.