Aspose Words and .NET Core 2.0 error

Checked 18.4 and it’s the same error. Any docx fails, attached project zip and simple test doc.

NetCoreDCPTestConsoleApp.zip (871 Bytes)

Hello.zip (9.0 KB)

@leftofcentre,

Thanks for your inquiry. We are working over your query and will get back to you soon.

@leftofcentre,

I am afraid, we are still unable to reproduce this issue on our end when using the latest version of Aspose.Words for .NET i.e. 18.4. Please try running the following .NET Core 2.0 Console App on your end:

DotNetCoreApp.zip (251.6 KB)

My project zip for sure was not working, but I know why now. Your project is using Aspose Words from NuGet which is adding several dependencies:
net_core_dependencies.png (9.8 KB)

When I added Aspose Words via NuGet all is OK, I was adding only Aspose Words dll from .NET Standard 2.0 folder, that’s why some dlls were missing.

Thanks

@leftofcentre,

Thanks for the additional information. We suggest you please always install Aspose.Words for .NET via NuGet.

Hi again,
currenty I have other issue. When I publish that .NET Core 2.0 app for any version of ubuntu.16.04-x64 I can not run it because I get an error that Aspose 18.4 was not found:
error (83.2 KB)

But Aspose dll is in publish folder:
aspose dll (75.3 KB)

Any clue why I get this error? .NET Core 2.0 was installed OK on Ubuntu …

Thanks

@leftofcentre,

How are you publishing your application on Ubuntu?

Considering the .NET Core 2.0 Console Application that I shared in my previous post, please list all steps that we can follow to reproduce the same problem on our end.

Hi,

  1. build .NET core 2.0 app with Aspose Words on Windows10 in VS 2017
  2. then open cmd line in folder where project file is and run this command:
    dotnet publish -r ubuntu.16.04-x64
  3. Copy output ubuntu build folder to Ubuntu 16.04 LTS
  4. After installing .NET Core 2.0 on ubuntu (info from here: https://github.com/dotnet/docs/blob/master/docs/core/linux-prerequisites.md) I run that app and get that error mentioned in previous message.

If you need more info let me know…

Thanks

@leftofcentre,

Thanks for sharing the detail. Could you please check Aspose.Words DLL in publish folder either it exists or not? If it exists and you still face problem on Ubuntu, we will setup .NET Core 2.0 on Ubuntu, test this scenario, and share our findings with you. Thanks for your cooperation.

Yes, Aspose.Words.dll is in publish folder. Please see my screenshot showing aspose dll in publish folder. Already sent it on April 06th.

PS. Build for Windows x64 .NET Core 2.0 works fine…

@leftofcentre,

Thanks for sharing the detail. Please spare us some time to setup Ubuntu operating system and .NET Core 2.0. We will investigate the issue on our side and provide you more information. Thanks for your cooperation.

@leftofcentre,

Thanks for your patience.

We have tested the scenario at Ubuntu and have not found the shared issue. Please check the attached image for detail. DOTNET_Core_Test.jpg (255.7 KB)

We executed the file “VS2017_Core” (the project name) that exists under publish folder. Please execute the “NetCoreDCPTestConsoleApp” file that is under publish folder.

Hello,
OK, it works when running app from publish folder. I’m new to .NET Core so I thought that I have to run app from main root folder. I did not notice the same app from publish folder. A bit confusing why app is in root and publish folder, I have to learn more about .NET Core :wink:

But I have got other issue now, see this error when converting docx with a least one image to html:
ubuntu_save_as_html_issue.jpg (155.1 KB)

Any ideas what’s wrong?

Thanks

@leftofcentre,

Thanks for your inquiry. The System.DllNotFoundException is thrown when a DLL specified in a DLL import cannot be found. Please make sure that you export your project for Ubuntu correctly. This exception is thrown due to missing of libSkiaSharp that is required for Aspose.Words for .NET.

I think my .NET Core build is published OK. Ubuntu publish folder has SkiaSharp.dll but there no libSkiaSharp.so in it. SkiaSharp.dll is looking for this file …
Maybe it’s .NET Core 2.0 issue on Ubuntu because all is OK on Windows…

Did you try converting a doc with image like I wrote?

@leftofcentre,

Thanks for your inquiry. Please ZIP and attach your input Word document here for testing. We will investigate the issue on our side and provide you more information.

@leftofcentre,

We have logged this problem in our issue tracking system as WORDSNET-16749. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

A post was split to a new topic: Unable to load DLL ‘libSkiaSharp’

@leftofcentre,

Thanks for your patience. This is not a bug. This is kind of limitation of SkiaSharp that is used by Aspose.Words .NET Standard version. SkiaSharp NuGet package does not contain native skia library for Linux, so it is required to add it manually.

  1. Create ne .NET Core Console Application
  2. Please install Aspose.Words for .NET through NuGet.
  3. Aspose.Words for .NET Standard uses SkiaSharp, which does not have native Skia library for Linux in its NuGet package yet. However, it is not a problem, because this native library is published with every SkiaSharp release on Github. Please note that Aspose.Words uses SkiaSharp 1.60.1, so download libHarfBuzzSharp.so file for this version. Once you download it, add it in your project and set “Copy to output directory”.
  4. Write code that uses Aspose.Words.
  5. Than open cmd line in folder where project file is and run this command:
  6. dotnet publish -r ubuntu.16.04-x64

    dotnet publish -r ubuntu.16.04-x64

  • Copy output ubuntu build folder to Ubuntu
  • Installing .NET Core 2.0 on Ubuntu (https://github.com/dotnet/docs/blob/master/docs/core/linux-prerequisites.md)
  • Open Ubuntu machine terminal (CLI) and Go to the project directory
  • Provide execute permissions:

    chmod 777 ./appname

  • Execute application

    ./appname

The issues you have found earlier (filed as WORDSNET-16749) have been fixed in this Aspose.Words for .NET 18.9 update and this Aspose.Words for Java 18.9 update.