netcore 使用System.Drawing 出现如下错误:

Unhandled Exception: System.TypeInitializationException: The type initializer for 'Gdip' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'libgdiplus': The specified module could not be found.
   at System.Runtime.InteropServices.FunctionWrapper`1.get_Delegate()
   at System.Drawing.SafeNativeMethods.Gdip.GdiplusStartup(IntPtr& token, StartupInput& input, StartupOutput& output)
   at System.Drawing.SafeNativeMethods.Gdip..cctor()
   --- End of inner exception stack trace ---
   at System.Drawing.SafeNativeMethods.Gdip.GdipLoadImageFromFile(String filename, IntPtr& image)
   at System.Drawing.Image.FromFile(String filename, Boolean useEmbeddedColorManagement)
   at System.Drawing.Image.FromFile(String filename)

   安装 libgdiplus

  同样的问题 https://github.com/dotnet/corefx/issues/25157

       解决方法: https://q.cnblogs.com/q/103863/

 

      解决方法: https://q.cnblogs.com/q/107946/

相关文章:

  • 2021-07-31
  • 2022-12-23
  • 2022-03-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-09
  • 2021-08-10
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-12
  • 2021-11-06
  • 2021-10-02
  • 2022-12-23
相关资源
相似解决方案