当前位置:网站首页>The type initializer for ‘Gdip‘ threw an exception

The type initializer for ‘Gdip‘ threw an exception

2022-04-23 18:47:00 jackletter

环境:

  • Debian
  • .net 6

问题: The type initializer for ‘Gdip’ threw an exception
因为代码中使用 SixLabors.ImageSharp去处理图片,在window上是正常的,在centos上就报错了:The type initializer for ‘Gdip’ threw an excepti。

解决办法:

执行如下命令:

sudo apt-get install libgdiplus

即可!

版权声明
本文为[jackletter]所创,转载请带上原文链接,感谢
https://blog.csdn.net/u010476739/article/details/124317037