API developed on Windows OS works, but deployed to AWS getting Skia package dependency error

0 Answers 67 Views
.NET Core General Discussions
Trudy
Top achievements
Rank 1
Trudy asked on 21 Jan 2026, 01:35 PM

just need to confirm if I have to add the Telerik.Drawing.Skia package to my C# .NET Core (9.0) API to fix the error I'm getting when I test the Telerik Swagger endpoints after we deployed to AWS. The container is AWS Linux.

 

This is the error I'm seeing when I use the swagger endpoints that do not need any parameters set, like

https://reportsapi.qa.epidev.net/api/Reports/configuration
https://reportsapi.qa.epidev.net/api/Reports/clients/sessionTimeout

etc.

{
"message""An error has occurred.",
"exceptionMessage""Cannot load assembly Telerik.Drawing.Skia. Make sure it is accessible in the current application domain.",
"exceptionType""DrawingFactoryUnavailableException",
"stackTrace": null
}

Lance | Senior Manager Technical Support
Telerik team
commented on 22 Jan 2026, 10:28 PM

Hi Trudy, have you followed the container guidance and ensured that you have the ski dependencies in your base image? 

Ever since NET 6, Microsoft has slimmed down their base container and it no longer has the ski dependencies. The good news is that it is very easy to resolve by adding them yourself in your Dockerfile

The dotnet image build caveat

If you are using the .NET SDK to build the image without a Dockerfile, then you need to take an extra step and build you own base image that has the dependencies already installed, and then pass the image name in the  build args, See my exact dotnet publish command that creates the image for me here https://github.com/LanceMcCarthy/DevOpsExamples/blob/f8c02a63f9a214f54f522fc549084c22f0ec7ac6/.github/workflows/main_docker-blazor.yml#L106-L109 

Take special care to notice that the base image is "docker.io/lancemccarthy/skia-aspnet:10.0". I build a base image with the Skia dependencies for all the latest dotnet versions https://github.com/LanceMcCarthy/BaseImages, that are just the same image as Microsoft's aspnet base image, but with the skia dependencies installed, here's proof https://github.com/LanceMcCarthy/BaseImages/blob/main/BuildContexts/aspnet90/Dockerfile 

No answers yet. Maybe you can help?

Tags
.NET Core General Discussions
Asked by
Trudy
Top achievements
Rank 1
Share this question
or