Asp.net core 2.1發布后支持System.Drawing.Common繪圖,可以做一些圖片驗證碼之類的功能,應用程序在Windows上運行功能正常,但是部署到centos上就會報錯:
The type initializer for 'System.DrawingCore.GDIPlus' threw an exception;
解決辦法:
centos上安裝libgdiplus-devel;
命令如下:yum install libgdiplus-devel 安裝完成后即可解決上面問題