Skip to content
Blog cá nhân của PhongTV

Blog cá nhân của PhongTV

  • Home
  • About
  • Skills
  • Resume
  • Contact
  • Bài viết

Sửa lỗi System.PlatformNotSupportedException : System.Drawing.Common is not supported on non-Windows platforms. See https://aka.ms/systemdrawingnonwindows for more information trên Ubuntu

pbk17 Tháng 1, 2024 No Comments

Khi chạy .NET 6 API trên Ubuntu, ta có thể gặp lỗi này khi thực hiện convert file xlsx sang file pdf nếu sử dụng thư viện Spire.XLS.

Để khắc phục, tại thư mục gốc của API, tạo file runtimeconfig.template.json với nội dung sau và lưu lại là xong:

{
   "configProperties": {
      "System.Drawing.EnableUnixSupport": true
   }
}

Điều hướng bài viết

Previous: Cách cài các font Calibri và Wingdings trên Ubuntu
Next: How to fix error “Duplicate key value violates unique constraint PK_xxx” when insert data into Postgres table

Để lại một bình luận Hủy

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

Proudly powered by WordPress | Theme: Smart Portfolio by Code Work Web.
Contact Us

    This form is powered by: Sticky Floating Forms Lite