Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

magicodes.ie.excel.aspnetcore 2.7.4.5在WindowServier 2012R2下运行The type initializer for 'SkiaSharp.SKFontStyle' threw an exception. #548

Open
5 tasks
Sheldon-NULL opened this issue Jan 19, 2024 · 6 comments

Comments

@Sheldon-NULL
Copy link

Sheldon-NULL commented Jan 19, 2024

Expected behaviour

生成Excel文件的时候报错
#463 #468 报错信息应该是一样的,但是服务器环境是WinServer;
ps:本地window10环境没有问题

  • Magicodes.IE.Excel
  • Magicodes.IE.Pdf
  • Magicodes.IE.Word
  • Magicodes.IE.Csv
  • Magicodes.IE.Html
  • [ *] Magicodes.IE.AspNetCore

package versions

Example: magicodes.ie.excel.aspnetcore 2.7.4.5

StackMsg:

错误消息: The type initializer for 'SkiaSharp.SKFontStyle' threw an exception.
堆栈信息: at OfficeOpenXml.ExcelRangeBase.GetAvailableFont(String text)
at OfficeOpenXml.ExcelRangeBase.AutoFitColumns(Double minimumWidth, Double maximumWidth)
at OfficeOpenXml.ExcelRangeBase.AutoFitColumns(Double MinimumWidth)
at OfficeOpenXml.ExcelRangeBase.AutoFitColumns()
at Magicodes.ExporterAndImporter.Excel.Utility.ExportHelper1.AddHeaderAndStyles() at Magicodes.ExporterAndImporter.Excel.Utility.ExportHelper1.Export(ICollection1 dataItems) at Magicodes.ExporterAndImporter.Excel.ExcelExporter.ExportAsByteArray[T](ICollection1 dataItems)

@Sheldon-NULL
Copy link
Author

单独安装SkiaSharp.NativeAssets.Win32,没有作用。
升级到magicodes.ie.excel.aspnetcore 2.7.4.5.1 ,没有作用

@hueifeng
Copy link
Member

windows server哪个版本?

@Sheldon-NULL
Copy link
Author

image

@Sheldon-NULL
Copy link
Author

Sheldon-NULL commented Jan 24, 2024

@hueifeng
image
DataCenter的版本可以,很奇怪。是包的兼容性问题吗

@hueifeng
Copy link
Member

hueifeng commented Feb 3, 2024

@Sheldon-NULL 是不是缺少runtimes文件?我试了下,并没有复现出来呢,可以创建一个最小化的Demo吗?https://github.com/dotnetcore/Magicodes.IE/tree/master/src/Magicodes.IE.Tools

@Sheldon-NULL
Copy link
Author

少哪个runtimes文件?libskiasharp这个dll也有的。不好复现,自己的云测试服务器都没复现出来,就是在生产环境出问题了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants