Hi,
I attached a screenshot so you can see what is happening. I am developing on Dotnet6 in Windows 11. My plan is to deploy using linux containers.
I have now created two identical versions of this project in my solution. One is using nuget Spire.Office 7.3.2 with the System.Drawing dependency. The other is using Spire.Officefor.NETStandard 7.3.2 which leverages SkiaSharp. The version using Spire.Office works perfectly. The other crashes spectacularly.
Microsoft has relegated System.Drawing to Windows and via an xml switch will allow people to use unsupported System.Drawing on DotNet6 on linux, but has removed the switch entirely for DotNet7.
Curiously, looking at the targets for the two nuget packages, it appears that Spire.Office has taken the Windows only path for its cross platform dotnet6 support. There is a net6.0 target for Spire.Office, but not for Spire.Officefor.NETStandard. Generally, when a vendor offers multiple versions of a nuget package supporting different platforms, the nuget package with a target directly matching your target is the vendors preferred version which is why I say this. It also make me wonder if the choice to not target net6.0 in Spire.Officefor.NETStandard was informed by developers having issues like mine. My underlying question is really about how and in what configurations is DotNet6 supported by each of the nuget packages.
I am creating a document rather than reading a document and am going to email you a file version of the in memory xlsx file the code doing this is creating and ole embedding into an in memory docx that is is also creating.
I have found that if I don't set cellRange.Text or richText.Text or the Value properties of these objects, no crash occurs. When the same document does not crash, the image sometimes shows dates in the 500 A.D. range where numbers should appear. In all cases, when it does work, the image takes a long time to generate. If I change the text to only a few letters instead of the real text content, crashes occur much less frequently.
- Screenshot 2022-03-29 093101.jpg (98.43 KiB) Viewed 426 times
Cheers,
Alex