Getting Started with IronWord on macOS

This article was translated from English: Does it need improvement?
Translated
View the article in English

IronWord allows .NET developers to read, create, and manipulate Word documents in C# without requiring Microsoft Office installed. While it’s typically used in Windows and Linux environments, IronWord also runs well on macOS with the right setup.

This guide walks you through installing dependencies and getting IronWord working in your macOS development environment.

Prerequisites for macOS

Before getting started with IronWord on macOS, make sure you have the following installed:

IronWord works best with .NET Core LTS versions or later .NET SDKs.

Install Native macOS Dependencies

IronWord depends on libgdiplus for graphical operations, such as rendering and processing DOCX content.

You can install this dependency using Homebrew:

brew install mono-libgdiplus

This installs the required native image rendering library. If you get errors related to System.Drawing.Common, this is usually the missing dependency.

NuGet Package Installation

IronWord works on both Apple Silicon and Intel Macs. We recommend the standard IronWord package for most users.

Install-Package IronWord

Compatibility with macOS ARM

IronWord is fully compatible with Apple Silicon chips. Developers using M1 or M2 machines can use the same IronWord NuGet package and setup instructions.

If you're using Visual Studio for Mac or JetBrains Rider, ensure you're targeting .NET 6 or higher for best compatibility.

常見問題解答

在 macOS 上使用 IronWord 需要哪些先決條件?

若要在 macOS 上使用 IronWord,請確保已安裝 .NET 6 或 .NET 7 SDK、Homebrew 以及 macOS 11 (Big Sur) 或更高版本。 IronWord 同時相容於 Apple Silicon 和 Intel Mac。

如何在 macOS 上安裝 IronWord 所需的依賴項?

您可以使用 Homebrew 透過指令「brew install mono-libgdiplus」安裝所需的本機相依性 libgdiplus。這有助於進行圖形操作,例如渲染和處理 DOCX 內容。

IronWord 是否相容於蘋果自研晶片?

是的,IronWord 完全相容於 Apple Silicon 晶片,例如 M1 和 M2 機型中的晶片。您可以使用與 Intel Mac 相同的 IronWord NuGet 套件和安裝說明。

如果遇到與 System.Drawing.Common 相關的錯誤,我該怎麼辦?

此類錯誤通常表示缺少依賴項。請確保已使用 Homebrew 安裝 libgdiplus,因為 IronWord 的圖形操作需要它。

在macOS上使用IronWord推薦使用哪些開發環境?

IronWord 可以與 Visual Studio for Mac 和 JetBrains Rider 搭配使用。為獲得最佳相容性,請確保目標框架為 .NET 6 或更高版本。

使用 IronWord 需要安裝 Microsoft Office 嗎?

不,IronWord 允許您使用 C# 讀取、建立和操作 Word 文檔,而無需在您的系統上安裝 Microsoft Office。

IronWord 能否在 macOS 以外的環境中使用?

是的,雖然本指南主要針對 macOS,但 IronWord 也設計用於在 Windows 和 Linux 環境下運作。

在macOS上使用IronWord時,我應該安裝哪個NuGet套件?

對於大多數用戶,我們建議安裝標準的 IronWord NuGet 套件,該套件同時支援 Apple Silicon 和 Intel Mac。

IronWord 在 macOS 上支援哪些 .NET 版本?

IronWord 與 .NET Core LTS 版本或更高版本的 .NET SDK 搭配使用效果最佳,可確保最佳效能和相容性。

A PHP Error was encountered

Severity: Warning

Message: Illegal string offset 'name'

Filename: sections/author_component.php

Line Number: 18

Backtrace:

File: /var/www/ironpdf.com/application/views/main/sections/author_component.php
Line: 18
Function: _error_handler

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 63
Function: view

File: /var/www/ironpdf.com/application/views/products/sections/three_column_docs_page_structure.php
Line: 64
Function: main_view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 88
Function: view

File: /var/www/ironpdf.com/application/views/products/get-started/index.php
Line: 2
Function: view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 88
Function: view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 552
Function: view

File: /var/www/ironpdf.com/application/controllers/Products/Getstarted.php
Line: 25
Function: render_products_view

File: /var/www/ironpdf.com/index.php
Line: 292
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Illegal string offset 'title'

Filename: sections/author_component.php

Line Number: 38

Backtrace:

File: /var/www/ironpdf.com/application/views/main/sections/author_component.php
Line: 38
Function: _error_handler

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 63
Function: view

File: /var/www/ironpdf.com/application/views/products/sections/three_column_docs_page_structure.php
Line: 64
Function: main_view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 88
Function: view

File: /var/www/ironpdf.com/application/views/products/get-started/index.php
Line: 2
Function: view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 88
Function: view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 552
Function: view

File: /var/www/ironpdf.com/application/controllers/Products/Getstarted.php
Line: 25
Function: render_products_view

File: /var/www/ironpdf.com/index.php
Line: 292
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Illegal string offset 'comment'

Filename: sections/author_component.php

Line Number: 48

Backtrace:

File: /var/www/ironpdf.com/application/views/main/sections/author_component.php
Line: 48
Function: _error_handler

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 63
Function: view

File: /var/www/ironpdf.com/application/views/products/sections/three_column_docs_page_structure.php
Line: 64
Function: main_view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 88
Function: view

File: /var/www/ironpdf.com/application/views/products/get-started/index.php
Line: 2
Function: view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 88
Function: view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 552
Function: view

File: /var/www/ironpdf.com/application/controllers/Products/Getstarted.php
Line: 25
Function: render_products_view

File: /var/www/ironpdf.com/index.php
Line: 292
Function: require_once

準備好開始了嗎?
Nuget 下載 25,807 | 版本: 2025.11 剛剛發布