I have a .NET Core MVC Web API that I’m trying to do some Aspose document conversion within. I grabbed the Aspose.Words_18.8 download of the dlls, and referenced the dll from the net2.0 folder. I get an exception on this line of code:
Document doc = new Document(fileLocation);
The exception says “The type initializer for '\u0003 ’ threw an exception.” and the inner exception says:
{System.TypeLoadException: Could not load type ‘System.Drawing.Drawing2D.HatchStyle’ from assembly ‘System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’.
at …cctor()}
I can’t find anything about this except a single page in japanese.
I tried switching the dll’s I’m using to the ones from the netstandard2.0 folder, and I get a different exception, which says:
“Could not load file or assembly ‘SkiaSharp, Version=1.60.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756’. The system cannot find the file specified.”