The type initializer for 'System.DrawingCore.GDIPlus' threw an exception


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 安装完成后即可解决上面问题


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM