1. 程式人生 > >System.DllNotFoundException: Unable to load DLL 'libgdiplus': The specified module could not be found.

System.DllNotFoundException: Unable to load DLL 'libgdiplus': The specified module could not be found.

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)

 

  同樣的問題 https://github.com/dotnet/corefx/issues/25157

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