- Home
- Forum
- ASP.NET Core
- Unable to load DLL 'libSkiaSharp' | DocIORenderer.NETStandard | IIS
Unable to load DLL 'libSkiaSharp' | DocIORenderer.NETStandard | IIS
After published our project on a iis, I received in the stdout protocol the following exception:
System.TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'libSkiaSharp': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at SkiaSharp.SkiaApi.sk_colortype_get_default_8888()
at SkiaSharp.SKImageInfo..cctor()
--- End of inner exception stack trace ---
at Syncfusion.DocIORenderer.Drawing.RenderHelper.GetBitmap(Int32 width, Int32 height)
at Syncfusion.DocIORenderer.Rendering.PDFDrawingContext..ctor()
at Syncfusion.DocIORenderer.DocIORenderer.ConvertToPDF(WordDocument wordDocument)
at Server.UserCode.LibWordSeriendruck.WordToPDF(Byte[] WordArray) in D:\Users\User\Documents\Visual Studio 2017\Projects\OurProject\OurProject\Server\UserCode\LibWordSeriendruck.cs:line 86
at Server.ControllersZ.z_wordController.WordBriefNeu(z_wordParameter wordParameter) in D:\Users\User\Documents\Visual Studio 2017\Projects\OurProject\OurProject\Server\ControllersZ\z_wordController.cs:line 201
at lambda_method(Closure , Object , Object[] )
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Builder.RouterMiddleware.
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Builder.Extensions.UsePathBaseMiddleware.
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Frame`1.
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 150.5755ms 500
I found the missing libSkiaSharp.dll in this directory:
C:\inetpub\wwwroot\OurProject\runtimes\win7-x64\native
For information:
The server is an windows server 2012 R2.
After copyed the file from C:\inetpub\wwwroot\OurProject\runtimes\win7-x64\native to the root directory C:\inetpub\wwwroot\OurProject the application works fine.
We would be happy when the issue could be fixed in a newer version.
Regards
LastCodeDE
Thank you for contacting Syncfusion support.
We suspect that the issue might be due to the scenario of deploying the application at your end. A support incident to track the status of your query under your account has been created. Please log on to our support website to check for further updates,
https://www.syncfusion.com/account/login
Please let us know if you have any other questions.
Regards,
Mohanaselvam J
Hi
LastCodeDE,
Thank
you for contacting Syncfusion support.
We
suspect that the problem might be due to missing of required NuGet packages in
your application.
1.
If
you are performing Word to PDF conversion in Linux environment means, could you
please provide your confirmation on whether the SkiaSharp.Linux helper NuGet
package is added properly in your application as per mentioned in the documentation.
2.
If
you are using Linux in Docker container means, please ensure at your end
whether the below line is added in the Dockerfile of your application to
resolve the problem.
|
RUN
apt-get update && apt-get install -y libfontconfig1 |
If
the issue is still reproduced, then kindly share us your working Essential Studio
version and issue reproducing sample which will be helpful for us to provide you
the prompt solution.
Regards,
Prakash
Kumar
DllNotFoundException: Unable to load DLL 'libSkiaSharp' or one of its dependencies: Access is denied
TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.
Thank you for your update.
We suspect the issue may occur due to any of the following reason:
1. SkiaSharp initialization problem in server.
2. Publishing the ASP.NET Core application in Self- contained mode.
We suggest to use below steps to overcome this reported issue:
1. Check whether production machine have proper .NET Core runtime installed.
2. Check Visual C++ Redistributable for Visual Studio 2015 installed in the production which is need to run SkiaSharp.
Download link:
https://www.microsoft.com/en-us/download/details.aspx?id=53587
Download link for 2017 VC++:
https://visualstudio.microsoft.com/downloads/
1. Publish the ASP.NET Core application with SkiaSharp dependency in Self-Contained mode.
2. Download SkiaSharp v1.59.3 NuGet package from here.
3. Unzip the skiasharp.1.59.3. nupkg.
Regards,
Vijayasurya A
1. Hi Jose,
Thank you for your update.
We suspect the issue may occur due to any of the following reason:
1. SkiaSharp initialization problem in server.
2. Publishing the ASP.NET Core application in Self- contained mode.
We suggest to use below steps to overcome this reported issue:
1. Check whether production machine have proper .NET Core runtime installed.
2. Check Visual C++ Redistributable for Visual Studio 2015 installed in the production which is need to run SkiaSharp.
Download link:
https://www.microsoft.com/en-us/download/details.aspx?id=53587
Download link for 2017 VC++:
https://visualstudio.microsoft.com/downloads/If the issue still persists, to resolve this problem, we recommend copying the libSkiaSharp manually from the SkiaSharp NuGet package into published folder.
1. Publish the ASP.NET Core application with SkiaSharp dependency in Self-Contained mode.
2. Download SkiaSharp v1.59.3 NuGet package from here.
3. Unzip the skiasharp.1.59.3. nupkg.Please refer the below tabular column to get the libSkiaSharp for corresponding target runtime.Copy libSkiaSharp from below location in SkiaSharp NuGet package into published folder for each target runtime:win-x86 — runtimes\win7-x86\nativewin-x64 — runtimes\win7-x64\nativeosx-x64 — runtimes\osx\native
Please let us know whether the suggested solution resolves the issue in your end.
Regards,
Vijayasurya A
Dear,
DllNotFoundException: Unable to load DLL 'libSkiaSharp' or one of its dependencies: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
SkiaSharp.SkiaApi.sk_colortype_get_default_8888()
SkiaSharp.SKImageInfo..cctor()
System.DllNotFoundException: Unable to load DLL 'libSkiaSharp' or one of its dependencies: The specified module could not be found. (Exception from HRESULT: 0x8007007E) at SkiaSharp.SkiaApi.sk_colortype_get_default_8888() at SkiaSharp.SKImageInfo..cctor()
Thank you for your update.
Since you have mentioned in your previous update that the issue seems to be occur in Azure Service Fabric alone, we request to share the below details to proceed further in this.
1. Operating System used while creating an Azure service fabric cluster.
2. Visual Studio version
3. Sample with complete code example.
4. Machine configuration
Using the above details, we will set up similar environment in our end to reproduce the same issue which you have faced in your end while performing “Word to PDF conversion” in Azure service Fabric.
Please let us know if you have any questions.
Regards,
Vijayasurya A
i was working on this bug since 2 days. please let me know where should i correct.
Thank you for contacting Syncfusion support.
We suspect the issue may occur due to any of the following reason:
1. SkiaSharp initialization problem in server.
2. ASP.NET Core application is published in Self- contained mode.
We suggest to use below steps to resolve this reported issue:
1. Check whether production machine have proper .NET Core runtime installed.
2. Check Visual C++ Redistributable for Visual Studio 2015 installed in the production which is need to run SkiaSharp.
Download link:
https://www.microsoft.com/en-us/download/details.aspx?id=53587
Download link for 2017 VC++:
https://visualstudio.microsoft.com/downloads/
1. Publish the ASP.NET Core application with SkiaSharp dependency in Self-Contained mode.
2. Download SkiaSharp v1.59.3 NuGet package from here.
3. Unzip the skiasharp.1.59.3. nupkg.
|
win-x86 |
runtimes\win7-x86\native |
|
win-x64 |
runtimes\win7-x64\native |
|
osx-x64 |
runtimes\osx\native |
If you are still facing the same problem means, then kindly share us the below details from your side:
1. Sample application which used at your end.
2. Deployment procedure which you tried.
3. Published folder with all the files.
4. Details about the Syncfusion product version.
5. Details about the operating system which used at your end.
Please let us know if you have any other questions.
Regards,
Hemalatha C
I am facing the same issue after deploying the asp.net core app on server, can you please help me to resolve this issue?
Version :- 20.1.0.47
* Install-package Syncfusion.Presentation.Net.Core
* Install-package Syncfusion.PresentationRenderer.Net.Core
* Install-package Syncfusion.SkiaSharpHelper.Net.Core
I am doing deployment using Visual studio publish option to deploy on Azure Web app server
sever operating system is Linux.
In local its working fine
Hi Ankush,
From the given details, we suspect that you have missed to install the
dependent NuGet packages to perform Presentation to PDF conversion in your
application.
|
Version |
NuGet packages to install |
|
From v20.1.0.x |
Similar to DocIO, please find the NuGet packages
to be installed to perform Presentation to PDF conversion in Linux OS from
below,
https://help.syncfusion.com/file-formats/docio/faq#what-are-the-nuget-packages-to-be-installed-to-perform-word-to-pdf-conversion-in-linux-os
Could you please install the above mentioned
NuGet packages in your application and let us know whether the reported issue
gets resolved.
If you still facing the issue means, then kindly
provide us the complete runnable sample along with input Word document which
will helpful to provide you the appropriate solution at the earliest.
Similar to DocIO, please refer the below link to know about how to convert Presentation
to PDF in Azure App service on Linux,
https://www.syncfusion.com/kb/11888/how-to-convert-word-document-to-pdf-in-azure-app-service-on-linux
Regards,
Suriya Balamurugan.
- 13 Replies
- 12 Participants
-
LA LastCodeDE
- May 11, 2018 02:43 PM UTC
- Apr 25, 2022 10:52 AM UTC