I am getting this error
Exception message: Unable to load ICU library.;
Inner exception: ;
StackTrace: at DevExpress.Text.Interop.ICUInterop.LoadSharedLibrary(NativeLibraryLoader libraryLoader)
at DevExpress.Text.Interop.ICUInterop.<>c.<.cctor>b__9_0()
during converting html to pdf in my app after migration to.Net 6
I am running .NET 6.0.7 in docker container alpine.3.16-x64
FROM mcr.microsoft.com/dotnet/aspnet:6.0.7-alpine3.16
ARG APP_DIRECTORY
WORKDIR /app
RUN apk add --no-cache harfbuzz-icu ttf-opensans && \
apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.8/main libcrypto1.0 libssl1.0 && \
apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing libgdiplus-dev && \
apk add --no-cache icu icu-libs icu-dev icu-data-full icu-static icu-doc harfbuzz-icu harfbuzz-dev && \
rm -rf /tmp/* /var/cache/apk/*
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true
My runtimeconfig.json
{
"configProperties": {
"System.Drawing.EnableUnixSupport": true,
"System.Globalization.Invariant": true
}
}
Does anybody faced the same problem during upgrading from 5.0 to 6.0?
The problem is in ICU library. Alpine3.16 has icu version 71
https://github.com/unicode-org/icu/releases/tag/release-71-1
So we downgraded to alpine3.15 which has icu version 69 and everything works.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.