【发布时间】:2018-04-16 08:04:53
【问题描述】:
我有一个 net core 2.0.3 项目,其 aspose 词为 18.0.1 和skiasharp 1.59.1,在我的计算机上运行良好,但我试图在 openshift 上运行我的项目并得到以下异常:
“SkiaSharp.SKImageInfo”的类型初始化器抛出异常。
我得到的内部异常是
无法加载 DLL ‘libSkiaSharp’:指定的模块或其上的 找不到依赖项
这是我的代码:
public string PostWord(IFormFile file)
{
try
{
using(MemoryStream postFile = new MemoryStream())
using(MemoryStream htmlStream = new MemoryStream())
using(MemoryStream xmlStream = new MemoryStream())
{
file.CopyTo(postFile);
Document doc = new Document(postFile);
doc.Save(xmlStream, SaveFormat.WordML);
doc.Save(htmlStream, new HtmlSaveOptions {
ExportImageAsBase64 = true,
Encoding = Encoding.UTF8,
SaveFormat = SaveFormat.Html });
return "succ";
}
}
catch (System.Exception e)
{ return e.Message; } }
知道为什么会这样吗?
【问题讨论】:
标签: c# aspose aspose.words skiasharp