VahidN / EPPlus.Core

EPPlus.Core is an unofficial port of the EPPlus library to .NET Core
GNU Lesser General Public License v3.0
370 stars 93 forks source link

.Net Core on Linux #1

Closed hspeedy closed 7 years ago

hspeedy commented 7 years ago

Thanks for porting EPPlus to .Net Core! Great job! But I have encountered a little problem while testing on linux. One of it's dependencies seems to rely on on gdi32+ and so it doesn't load on linux.

VahidN commented 7 years ago

Hi, Thanks. After installing the libgdiplus I could run the functional tests on Ubuntu More info

sudo apt-get update
sudo apt-get install libgdiplus

vba

Failed tests are VBA related, because .NET Core lacks some of the encryption Algorithms.

hspeedy commented 7 years ago

Thanks for helping me. After installing libgduplus everything works fine. I'm using Linux Mint 18.

kinglionsoft commented 7 years ago

On Ubuntu 16.04, with installing libgduplus, it works fine. But on CentOS 7, after installing libgdiplus, it still can not load 'gdiplus' when I call 'AutoFitColumns()':

Error: The type initializer for 'System.Drawing.GDIPlus' threw an exception.
-->The type initializer for 'System.Drawing.GDIPlus' threw an exception.
-->Unable to load DLL 'gdiplus': The specified module could not be found.

By the way, gdipus is:

libgdiplus-2.10-9.el7.x86_64

I do not know how to fix it, just simply skip calling 'AutoFitColumns()' to avoid this error:

VahidN commented 7 years ago

libgdiplus is part of the Mono project and you can find more info about how to resolve DllNotFoundException here:

kinglionsoft commented 7 years ago

Thanks for reply.

drwharris commented 7 years ago

I ran into this using VS2017 with docker integration. Solution was to add the following to my dockerfile

FROM microsoft/aspnetcore:2.0 
ARG source
RUN apt-get update                      #Add this line
RUN apt-get install -y libgdiplus   #Add this line
yberstad commented 6 years ago

Thanks for helping out with this! I'm running on macOS, and I had to run the following command to get it to work: brew install mono-libgdiplus