unable to load dll 'gdiplus.dll' in docker

来源:互联网 发布:阿里云ecs上传文件 编辑:程序博客网 时间:2024/06/05 06:09

已经在.csproj文件里添加了CoreCompat.System.Drawing:

<PackageReference Include="CoreCompat.System.Drawing" Version="1.0.0-beta006" />

在VS可以运行,但在docker中报unable to load dll 'gdiplus.dll',

因为docker是linux环境,还需要安装一个库libgdiplus,在Dockerfile中添加一行:

RUN apt-get install -y libgdiplus

原创粉丝点击