.NET CoreでSystem.Drawingを使う Ubuntu編

Ubuntuにおいて、.NET CoreでSystem.Drawing配下のライブラリを扱う方法を記述します。
OpenTKにおいて、テクスチャなどを扱う際に必要です。

UbuntuでSystem.Drawing配下のライブラリ利用時に、以下のようなエラーが発生した場合の対処方法となります。

例外が発生しました: CLR/System.TypeInitializationException
An unhandled exception of type ‘System.TypeInitializationException’ occurred in System.Drawing.Common.dll: ‘The type initializer for ‘Gdip’ threw an exception.’
Inner exceptions found, see $exception in variables window for more details.
Innermost exception System.DllNotFoundException : Unable to load DLL ‘libgdiplus’: The specified module could not be found.


$ sudo apt-get update
$ sudo apt-get install libgdiplus

これだけ!
macに比べるととっても簡単です。

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です