We are trying to upgrade our code to .net 6 however spire.doc is turning into a blocker in this case. On linux (not windows) when we are referencing the spire.doc nuget package (which is only available with a net5.0 version) it causes the following error:
- Code: Select all
Could not load type 'sprゃ' from assembly 'Spire.Pdf, Version=7.11.1.0, Culture=neutral, PublicKeyToken=663f351905198cb3'.
Here is the stack trace - the error is happening in the constructor of the Document class. It seems to be a problem with the loading of the Spire.PDF binary. I am using the latest nuget version of Spire.Doc.
- Code: Select all
at Spire.Doc.Document..ctor()
at Spire.Doc.Document..ctor(Stream stream)
at Kalix.Api.Infrastructure.Documents.DocumentConverter.ConvertDocxToPdf(PipeReader docx, PipeWriter output) in /agent/_work/1/s/Kalix.Api.Infrastructure/Documents/DocumentConverter.cs:line 120
...
Here is the code that is causing the error:
- Code: Select all
using var ms = new MemoryStream();
...
using var doc = new Document(ms); <-- fails on this line
Is there any chance to get a version of Spire.Doc compiled for net6? Unfortunately we have completed a bit of work so it would be a shame to have to roll it all back, we only picked this up in runtime tests.
Cheers,
Felix