Versions after 8.6.0 - October 30, 2026:
The below steps are tested with MacOS with DocumentUltimate AspNetCoreCS example project.
You can also add the same commands to a docker Linux container, by prefixing the commands with RUN
1. Install the .NET SDK (it also includes the .NET Runtime for same version):
chdir ~/Downloads
brew install wget
wget https://dot.net/v1/dotnet-install.sh
chmod +x dotnet-install.sh
./dotnet-install.sh
If you don't already have brew command (homebrew), get it with these lines:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
export PATH=$PATH:/opt/homebrew/bin
2. Install native dependencies for System.Drawing.Common as conversion and viewing for some document formats (e.g. Excel files) still depend on it as of current version:
brew install mono-libgdiplus
Note that starting with DocumentUltimate v8.6.0, we intentionally use 5.0.3 version of System.Drawing.Common nuget package because Microsoft decided to make this package "Windows only" in 6.0.0 and higher. It turns out PlatformNotSupportedException was being thrown in net6.0+ projects (e.g. net8.0 or net10.0) not from the runtime but from the DLLs in the 6.0.0 package itself. So as long as we stay at 5.0.3, we can still use libgdiplus on Linux/MacOS, we don't even need System.Drawing.EnableUnixSupport config option in our project.
If you also have a separate dependency in your project to System.Drawing.Common nuget package (via <PackageReference>), make sure it's kept at 5.0.3 as maximum (don't cause nuget to upgrade your project's dependency version).
3. Install some common fonts (especially Microsoft TrueType fonts) so that DocumentViewer and conversions to PDF, display accurate text:
# Tap colindean/homebrew-fonts-nonfree GitHub repository
brew tap colindean/homebrew-fonts-nonfree && \
brew trust colindean/homebrew-fonts-nonfree
# Install common fonts
brew install --cask font-microsoft-office font-microsoft-aptos font-microsoft-fluent
You can use ls command to check/list installed system fonts:
ls ~/Library/Fonts
If you still have font issues (wrong font, missing characters) when viewing or converting in DocumentUltimate after installing above fonts, you can copy the necessary/additional font files to /Library/Fonts
For example, use this command to install Micosoft Office and copy fonts from it:
# Install Cask
brew tap caskroom/cask
# Install Microsoft Office
brew cask install microsoft-office
# Copy the fonts
mkdir ~/Library/Fonts/Microsoft
cp -av /Applications/Microsoft\ Word.app/Contents/Resources/Fonts/* ~/Library/Fonts/Microsoft/
4. Now you are ready to run your project with dotnet run
Older Versions:
1. Install the .NET SDK (it also includes the .NET Runtime for same version):
a. Note that Microsoft no longer supports installing older versions of SDK or Runtime via installer. So for example, if your project target framework is net6.0, you should install it manually with script method provided by Microsoft:
If you don't already have wget command, get it with these lines (via homebrew):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
export PATH=$PATH:/opt/homebrew/bin
brew install wget
Now you can download the script and execute it:
chdir ~/Downloads
wget https://dot.net/v1/dotnet-install.sh
chmod +x dotnet-install.sh
./dotnet-install.sh --channel 6.0
Ref:
b. As we used the script method, edit bash profile file in your home directory and added these lines for being able to access dotnet commands (or if you run the lines in terminal, the env variables will exist until your terminal is closed):
export DOTNET_ROOT=$HOME/.dotnet
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
2. Install System.Drawing.Common dependencies as some conversions (e.g. Excel files) still depend on it as of current version:
brew install mono-libgdiplus
Microsoft decided to make package System.Drawing.Common "Windows only" in .NET 6 and higher.
Note: We mistakenly upgraded System.Drawing.Common dependency to 6.0.0 first in DocumentUltimate v7.4.0 - March 8, 2025 so if your app is using NET 7.0 or higher, the below fix will still not prevent PlatformNotSupportedException, upgrade to DocumentUltimate v8.6.0 - October 30, 2026 to fix it (which uses System.Drawing.Common 5.0.3).
So you need to opt-in to be able to use System.Drawing.Common package on MacOS.
Edit your project's .csproj file and add these lines:
<ItemGroup>
<RuntimeHostConfigurationOption Include="System.Drawing.EnableUnixSupport" Value="true" />
</ItemGroup>
4. Now you are ready to run your project with dotnet run