【问题标题】:Aspose words on open shift在公开班次上设置单词
【发布时间】: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


    【解决方案1】:

    请从您的 Visual Studio 项目中卸载/删除所有旧的 Aspose.Words.dll 引用(以及 Bin 文件夹中的相关 DLL)。之后请使用NuGet Package Manager UIinstall Aspose.Words for .NET NuGet package。这还将为您的项目安装外部引用,例如 SkiaSharp。我与 Aspose 合作,担任开发人员宣传员。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-15
      • 2020-01-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多