I'm stucked since I meet the famous "Unable to load DLL 'libSkiaSharp' or one of its dependencies: The specified module could not be found. (0x8007007E)".
I'm running my asp.net core application within a windows docker image. My project is under .net 6.0
here is my dockerfile :
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS base
ENV DOTNET_VERSION=5.0.0
ENV ASPNETCORE_URLS=https://+:55003
ENV ASPNETCORE_ENVIRONMENT=Development
WORKDIR /app
EXPOSE 55003
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["Medsoft.Hair.PatientService/Medsoft.Hair.PatientService.csproj", "Medsoft.Hair.PatientService/"]
#COPY ["Medsoft.Hair.PatientService/Dependencies/opengl32.dll", "c:/Windows/System32/opengl32.dll"]
#COPY ["Medsoft.Hair.PatientService/Dependencies/glu32.dll", "c:/Windows/System32/glu32.dll"]
RUN dotnet restore "Medsoft.Hair.PatientService/Medsoft.Hair.PatientService.csproj"
COPY . .
WORKDIR "/src/Medsoft.Hair.PatientService"
RUN dotnet build "Medsoft.Hair.PatientService.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "Medsoft.Hair.PatientService.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Medsoft.Hair.PatientService.dll"]
Before the first "FROM" of the dockerfile was "mcr.microsoft.com/dotnet/aspnet:6.0" but with this my image doens't have any .net sdk installed. But it doesn't help here.
When I do dotnet --info on the image running, i have this :
.NET SDK (reflecting any global.json): Version: 6.0.400 Commit:
7771abd614Runtime Environment: OS Name: Windows OS Version: 10.0.17763 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\6.0.400\
global.json file: Not found
Host: Version: 6.0.8 Architecture: x64 Commit:
55fb7ef977.NET SDKs installed: 6.0.400 [C:\Program Files\dotnet\sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Download .NET: https://aka.ms/dotnet-download
Learn about .NET Runtimes and SDKs:
https://aka.ms/dotnet/runtimes-sdk-info
Looks like I have.net SDK loaded or installed. Others nugets as pomelo (mysql) are working like this.
Maybe I'm missing some redist to install ? My skiasharp version is 2.88.1.
What do I miss here? Someone can help ? If more information is needed, I'll provide it !