【发布时间】:2020-12-07 00:40:31
【问题描述】:
我在 Dot Net Core 3.1 中使用 Aspose Cells for .Net 将 Excel 转换为 PDF。它在本地环境中完美运行,但是当我在 AWS 环境(AWS Lambda)中托管时,它会抛出一个错误提示,
{"fileName":"System.TypeInitializationException: 类型初始化器 对于 'Gdip' 抛出异常。 ---> System.DllNotFoundException: 无法加载共享库“libdl”或其依赖项之一。在 为了帮助诊断加载问题,请考虑设置 LD_DEBUG 环境变量:liblibdl:无法打开共享对象文件:否 此类文件或目录\n 在 Interop.Libdl.dlopen(String fileName, Int32 标志)\n 在 System.Drawing.SafeNativeMethods.Gdip.LoadNativeLibrary()\n at System.Drawing.SafeNativeMethods.Gdip..cctor()\n --- 内部结束 异常堆栈跟踪 ---\n at System.Drawing.SafeNativeMethods.Gdip.GdipNewPrivateFontCollection(IntPtr& fontCollection)\n 在 SelectPdf.Lib.ᡜ..ctor()\n.
我在我的项目中引用了“System.Drawing.Common”DLL 来解决这个问题。但是这个问题仍然没有得到解决。如何解决这个问题?
【问题讨论】:
标签: c# amazon-web-services asp.net-core aws-lambda aws-api-gateway