首页 > 解决方案 > Problem Mac autofit EPPLUS / Unity3d installed libgdiplus via Homebrew with no effect

问题描述

When trying to use auto fit columns in EPPLUS, in Unity3d on Mac, I get DllNotFoundException. It seems to be a known problem and I have found a few references like this: Similar problem

In the readme file installed:

*.NET Core uses a preview of System.Drawing.Common, so be aware of that. We will update it as Microsoft releases newer versions. System.Drawing.Common requires libgdiplus to be installed on non-Windows operating systems. Use your favorite package manager to install it. For example:

Homebrew on MacOS: brew install mono-libgdiplus

apt-get: apt-get install libgdiplus

EPPlus-A .NET Spreadsheet API*

I installed Homebrew, never heard of it before this, and it looks like it installed correctly. I then "brew install mono-libgdiplus" and that looked good as well.

Here is installation:

Last login: Mon Apr 22 21:15:06 on console
Peters-MBP:~ peterkallviks$ brew install mono-libgdiplus
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
 ==> New Formulae
boringtun
==> Updated Formulae
goreleaser          jump                lynis               nagios

Reinstalled:

Peters-MBP:~ peterkallviks$ brew reinstall mono-libgdiplus
==> Reinstalling mono-libgdiplus 
==> Downloading https://homebrew.bintray.com/bottles/mono-libgdiplus-5.6.mojave.
Already downloaded: /Users/peterkallviks/Library/Caches/Homebrew/downloads/a1212501645cb02bf6dd64e4a53f130bb447b1bc3a940010537edc2a1ebd88b4--mono-libgdiplus-5.6.mojave.bottle.tar.gz
==> Pouring mono-libgdiplus-5.6.mojave.bottle.tar.gz
  /usr/local/Cellar/mono-libgdiplus/5.6: 13 files, 935.7KB

I still get the same error and do not know what to do to fix it.

Code causing the problem:

worksheet.Column(1).AutoFit();

标签: c#unity3depplus

解决方案


推荐阅读