Unable to load DLL 'libdl' when using System.Drawing.Common NuGet package on AWS Lambda

前端 未结 4 1829
死守一世寂寞
死守一世寂寞 2020-12-30 02:28

We have a thumbnail generator lambda function which I\'m trying to update to .NET Core 2.0, but I\'ve encountered the following error when using Microsoft\'s System.Dr

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-30 03:07

    I found a solution for this issue which worked for me:

    At first i removed the System.Drawing.Common library from the project, then i installed the library you can find here. It uses the same classes.

    using System.Drawing
    ...
    var bmp = new Bitmap(100,100);
    

    At last I installed this other library which contains all the dll's necesary for using drawing libraries on Linux and Lambda as well. By doing this steps the code can be uploaded to AWS without any problem.

提交回复
热议问题